summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
Diffstat (limited to 'macros')
-rw-r--r--macros/generic/markdown/CHANGES.md28
-rw-r--r--macros/generic/markdown/LICENSE415
-rw-r--r--macros/generic/markdown/Makefile205
-rw-r--r--macros/generic/markdown/README.md30
-rw-r--r--macros/generic/markdown/VERSION2
-rw-r--r--macros/generic/markdown/examples/README.md7
-rw-r--r--macros/generic/markdown/examples/context-mkii.pdfbin213638 -> 0 bytes
-rw-r--r--macros/generic/markdown/examples/context-mkiv.pdfbin57852 -> 0 bytes
-rw-r--r--macros/generic/markdown/examples/latex-luatex.pdfbin89912 -> 0 bytes
-rw-r--r--macros/generic/markdown/examples/latex-pdftex.pdfbin334207 -> 0 bytes
-rw-r--r--macros/generic/markdown/examples/latex-tex4ht.css219
-rw-r--r--macros/generic/markdown/examples/latex-tex4ht.html452
-rw-r--r--macros/generic/markdown/examples/latex-xetex.pdfbin61861 -> 0 bytes
-rw-r--r--macros/generic/markdown/latexmkrc5
-rw-r--r--macros/generic/markdown/markdown.dtx8421
-rw-r--r--macros/generic/markdown/markdown.html10424
-rw-r--r--macros/generic/markdown/markdown.pdfbin917637 -> 929724 bytes
-rw-r--r--macros/latex/contrib/pythonimmediate/DEPENDS.txt4
-rw-r--r--macros/latex/contrib/pythonimmediate/README24
-rw-r--r--macros/latex/contrib/pythonimmediate/pythonimmediate.pdfbin0 -> 402484 bytes
-rw-r--r--macros/latex/contrib/pythonimmediate/pythonimmediate.sty183
-rw-r--r--macros/latex/contrib/pythonimmediate/pythonimmediate.tex535
-rwxr-xr-xmacros/latex/contrib/pythonimmediate/pythonimmediate_script_pytotex.py57
-rwxr-xr-xmacros/latex/contrib/pythonimmediate/pythonimmediate_script_textopy.py2295
-rw-r--r--macros/latex/contrib/saveenv/saveenv.pdfbin384203 -> 395762 bytes
-rw-r--r--macros/latex/contrib/saveenv/saveenv.sty59
-rw-r--r--macros/latex/contrib/saveenv/saveenv.tex78
-rw-r--r--macros/latex/contrib/tagpdf/README.md4
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-backend.dtx45
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-checks.dtx70
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-code.pdfbin1240872 -> 1523569 bytes
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-data.dtx581
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx28
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-mc-luacode.dtx33
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-mc-shared.dtx4
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-roles.dtx1455
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-space.dtx4
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-struct.dtx207
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-tree.dtx133
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-user.dtx17
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf.dtx57
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf.ins21
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf.pdfbin492448 -> 738728 bytes
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf.tex559
-rw-r--r--macros/latex/contrib/tagpdf/tagpdfdocu-patches.sty285
-rw-r--r--macros/luatex/generic/luakeys/luakeys-debug.sty2
-rw-r--r--macros/luatex/generic/luakeys/luakeys-doc.pdfbin395011 -> 398632 bytes
-rw-r--r--macros/luatex/generic/luakeys/luakeys-doc.tex64
-rw-r--r--macros/luatex/generic/luakeys/luakeys.lua12
-rw-r--r--macros/luatex/generic/luakeys/luakeys.sty2
50 files changed, 15768 insertions, 11258 deletions
diff --git a/macros/generic/markdown/CHANGES.md b/macros/generic/markdown/CHANGES.md
index 7e6575d20d..5cbde41192 100644
--- a/macros/generic/markdown/CHANGES.md
+++ b/macros/generic/markdown/CHANGES.md
@@ -1,6 +1,32 @@
# Changes
-## 2.18.0 (2022-10-31)
+## 2.19.0 (2022-12-23)
+
+Development:
+
+- Add support for fenced divs and bracketed spans. (#207)
+
+Fixes:
+
+- Fix incorrect category codes in plain TeX renderer prototype definitions.
+ (f156f05)
+- Allow backticks in tilde code block infostrings. (#214, #219, #221)
+
+Refactoring:
+
+- Sort Lua options, token renderers, and built-in syntax extensions. (#208)
+
+Documentation:
+
+- Link article [*High-Level Languages for
+ TeX*](https://www.doi.org/10.5300/2022-1-4/35) (in Czech) from
+ CSTUG Bulletin 1–4/2022 to `README.md`. (authored by @witiko, a2bbdea)
+
+Continuous Integration:
+
+- Make latexmk treat warnings as errors. (#228)
+
+## 2.18.0 (2022-10-30)
Development:
diff --git a/macros/generic/markdown/LICENSE b/macros/generic/markdown/LICENSE
deleted file mode 100644
index 4db9b5af29..0000000000
--- a/macros/generic/markdown/LICENSE
+++ /dev/null
@@ -1,415 +0,0 @@
-The LaTeX Project Public License
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-
-LPPL Version 1.3c 2008-05-04
-
-Copyright 1999 2002-2008 LaTeX3 Project
- Everyone is allowed to distribute verbatim copies of this
- license document, but modification of it is not allowed.
-
-
-PREAMBLE
-========
-
-The LaTeX Project Public License (LPPL) is the primary license under
-which the LaTeX kernel and the base LaTeX packages are distributed.
-
-You may use this license for any work of which you hold the copyright
-and which you wish to distribute. This license may be particularly
-suitable if your work is TeX-related (such as a LaTeX package), but
-it is written in such a way that you can use it even if your work is
-unrelated to TeX.
-
-The section `WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE',
-below, gives instructions, examples, and recommendations for authors
-who are considering distributing their works under this license.
-
-This license gives conditions under which a work may be distributed
-and modified, as well as conditions under which modified versions of
-that work may be distributed.
-
-We, the LaTeX3 Project, believe that the conditions below give you
-the freedom to make and distribute modified versions of your work
-that conform with whatever technical specifications you wish while
-maintaining the availability, integrity, and reliability of
-that work. If you do not see how to achieve your goal while
-meeting these conditions, then read the document `cfgguide.tex'
-and `modguide.tex' in the base LaTeX distribution for suggestions.
-
-
-DEFINITIONS
-===========
-
-In this license document the following terms are used:
-
- `Work'
- Any work being distributed under this License.
-
- `Derived Work'
- Any work that under any applicable law is derived from the Work.
-
- `Modification'
- Any procedure that produces a Derived Work under any applicable
- law -- for example, the production of a file containing an
- original file associated with the Work or a significant portion of
- such a file, either verbatim or with modifications and/or
- translated into another language.
-
- `Modify'
- To apply any procedure that produces a Derived Work under any
- applicable law.
-
- `Distribution'
- Making copies of the Work available from one person to another, in
- whole or in part. Distribution includes (but is not limited to)
- making any electronic components of the Work accessible by
- file transfer protocols such as FTP or HTTP or by shared file
- systems such as Sun's Network File System (NFS).
-
- `Compiled Work'
- A version of the Work that has been processed into a form where it
- is directly usable on a computer system. This processing may
- include using installation facilities provided by the Work,
- transformations of the Work, copying of components of the Work, or
- other activities. Note that modification of any installation
- facilities provided by the Work constitutes modification of the Work.
-
- `Current Maintainer'
- A person or persons nominated as such within the Work. If there is
- no such explicit nomination then it is the `Copyright Holder' under
- any applicable law.
-
- `Base Interpreter'
- A program or process that is normally needed for running or
- interpreting a part or the whole of the Work.
-
- A Base Interpreter may depend on external components but these
- are not considered part of the Base Interpreter provided that each
- external component clearly identifies itself whenever it is used
- interactively. Unless explicitly specified when applying the
- license to the Work, the only applicable Base Interpreter is a
- `LaTeX-Format' or in the case of files belonging to the
- `LaTeX-format' a program implementing the `TeX language'.
-
-
-
-CONDITIONS ON DISTRIBUTION AND MODIFICATION
-===========================================
-
-1. Activities other than distribution and/or modification of the Work
-are not covered by this license; they are outside its scope. In
-particular, the act of running the Work is not restricted and no
-requirements are made concerning any offers of support for the Work.
-
-2. You may distribute a complete, unmodified copy of the Work as you
-received it. Distribution of only part of the Work is considered
-modification of the Work, and no right to distribute such a Derived
-Work may be assumed under the terms of this clause.
-
-3. You may distribute a Compiled Work that has been generated from a
-complete, unmodified copy of the Work as distributed under Clause 2
-above, as long as that Compiled Work is distributed in such a way that
-the recipients may install the Compiled Work on their system exactly
-as it would have been installed if they generated a Compiled Work
-directly from the Work.
-
-4. If you are the Current Maintainer of the Work, you may, without
-restriction, modify the Work, thus creating a Derived Work. You may
-also distribute the Derived Work without restriction, including
-Compiled Works generated from the Derived Work. Derived Works
-distributed in this manner by the Current Maintainer are considered to
-be updated versions of the Work.
-
-5. If you are not the Current Maintainer of the Work, you may modify
-your copy of the Work, thus creating a Derived Work based on the Work,
-and compile this Derived Work, thus creating a Compiled Work based on
-the Derived Work.
-
-6. If you are not the Current Maintainer of the Work, you may
-distribute a Derived Work provided the following conditions are met
-for every component of the Work unless that component clearly states
-in the copyright notice that it is exempt from that condition. Only
-the Current Maintainer is allowed to add such statements of exemption
-to a component of the Work.
-
- a. If a component of this Derived Work can be a direct replacement
- for a component of the Work when that component is used with the
- Base Interpreter, then, wherever this component of the Work
- identifies itself to the user when used interactively with that
- Base Interpreter, the replacement component of this Derived Work
- clearly and unambiguously identifies itself as a modified version
- of this component to the user when used interactively with that
- Base Interpreter.
-
- b. Every component of the Derived Work contains prominent notices
- detailing the nature of the changes to that component, or a
- prominent reference to another file that is distributed as part
- of the Derived Work and that contains a complete and accurate log
- of the changes.
-
- c. No information in the Derived Work implies that any persons,
- including (but not limited to) the authors of the original version
- of the Work, provide any support, including (but not limited to)
- the reporting and handling of errors, to recipients of the
- Derived Work unless those persons have stated explicitly that
- they do provide such support for the Derived Work.
-
- d. You distribute at least one of the following with the Derived Work:
-
- 1. A complete, unmodified copy of the Work;
- if your distribution of a modified component is made by
- offering access to copy the modified component from a
- designated place, then offering equivalent access to copy
- the Work from the same or some similar place meets this
- condition, even though third parties are not compelled to
- copy the Work along with the modified component;
-
- 2. Information that is sufficient to obtain a complete,
- unmodified copy of the Work.
-
-7. If you are not the Current Maintainer of the Work, you may
-distribute a Compiled Work generated from a Derived Work, as long as
-the Derived Work is distributed to all recipients of the Compiled
-Work, and as long as the conditions of Clause 6, above, are met with
-regard to the Derived Work.
-
-8. The conditions above are not intended to prohibit, and hence do not
-apply to, the modification, by any method, of any component so that it
-becomes identical to an updated version of that component of the Work as
-it is distributed by the Current Maintainer under Clause 4, above.
-
-9. Distribution of the Work or any Derived Work in an alternative
-format, where the Work or that Derived Work (in whole or in part) is
-then produced by applying some process to that format, does not relax or
-nullify any sections of this license as they pertain to the results of
-applying that process.
-
-10. a. A Derived Work may be distributed under a different license
- provided that license itself honors the conditions listed in
- Clause 6 above, in regard to the Work, though it does not have
- to honor the rest of the conditions in this license.
-
- b. If a Derived Work is distributed under a different license, that
- Derived Work must provide sufficient documentation as part of
- itself to allow each recipient of that Derived Work to honor the
- restrictions in Clause 6 above, concerning changes from the Work.
-
-11. This license places no restrictions on works that are unrelated to
-the Work, nor does this license place any restrictions on aggregating
-such works with the Work by any means.
-
-12. Nothing in this license is intended to, or may be used to, prevent
-complete compliance by all parties with all applicable laws.
-
-
-NO WARRANTY
-===========
-
-There is no warranty for the Work. Except when otherwise stated in
-writing, the Copyright Holder provides the Work `as is', without
-warranty of any kind, either expressed or implied, including, but not
-limited to, the implied warranties of merchantability and fitness for a
-particular purpose. The entire risk as to the quality and performance
-of the Work is with you. Should the Work prove defective, you assume
-the cost of all necessary servicing, repair, or correction.
-
-In no event unless required by applicable law or agreed to in writing
-will The Copyright Holder, or any author named in the components of the
-Work, or any other party who may distribute and/or modify the Work as
-permitted above, be liable to you for damages, including any general,
-special, incidental or consequential damages arising out of any use of
-the Work or out of inability to use the Work (including, but not limited
-to, loss of data, data being rendered inaccurate, or losses sustained by
-anyone as a result of any failure of the Work to operate with any other
-programs), even if the Copyright Holder or said author or said other
-party has been advised of the possibility of such damages.
-
-
-MAINTENANCE OF THE WORK
-=======================
-
-The Work has the status `author-maintained' if the Copyright Holder
-explicitly and prominently states near the primary copyright notice in
-the Work that the Work can only be maintained by the Copyright Holder
-or simply that it is `author-maintained'.
-
-The Work has the status `maintained' if there is a Current Maintainer
-who has indicated in the Work that they are willing to receive error
-reports for the Work (for example, by supplying a valid e-mail
-address). It is not required for the Current Maintainer to acknowledge
-or act upon these error reports.
-
-The Work changes from status `maintained' to `unmaintained' if there
-is no Current Maintainer, or the person stated to be Current
-Maintainer of the work cannot be reached through the indicated means
-of communication for a period of six months, and there are no other
-significant signs of active maintenance.
-
-You can become the Current Maintainer of the Work by agreement with
-any existing Current Maintainer to take over this role.
-
-If the Work is unmaintained, you can become the Current Maintainer of
-the Work through the following steps:
-
- 1. Make a reasonable attempt to trace the Current Maintainer (and
- the Copyright Holder, if the two differ) through the means of
- an Internet or similar search.
-
- 2. If this search is successful, then enquire whether the Work
- is still maintained.
-
- a. If it is being maintained, then ask the Current Maintainer
- to update their communication data within one month.
-
- b. If the search is unsuccessful or no action to resume active
- maintenance is taken by the Current Maintainer, then announce
- within the pertinent community your intention to take over
- maintenance. (If the Work is a LaTeX work, this could be
- done, for example, by posting to comp.text.tex.)
-
- 3a. If the Current Maintainer is reachable and agrees to pass
- maintenance of the Work to you, then this takes effect
- immediately upon announcement.
-
- b. If the Current Maintainer is not reachable and the Copyright
- Holder agrees that maintenance of the Work be passed to you,
- then this takes effect immediately upon announcement.
-
- 4. If you make an `intention announcement' as described in 2b. above
- and after three months your intention is challenged neither by
- the Current Maintainer nor by the Copyright Holder nor by other
- people, then you may arrange for the Work to be changed so as
- to name you as the (new) Current Maintainer.
-
- 5. If the previously unreachable Current Maintainer becomes
- reachable once more within three months of a change completed
- under the terms of 3b) or 4), then that Current Maintainer must
- become or remain the Current Maintainer upon request provided
- they then update their communication data within one month.
-
-A change in the Current Maintainer does not, of itself, alter the fact
-that the Work is distributed under the LPPL license.
-
-If you become the Current Maintainer of the Work, you should
-immediately provide, within the Work, a prominent and unambiguous
-statement of your status as Current Maintainer. You should also
-announce your new status to the same pertinent community as
-in 2b) above.
-
-
-WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE
-======================================================
-
-This section contains important instructions, examples, and
-recommendations for authors who are considering distributing their
-works under this license. These authors are addressed as `you' in
-this section.
-
-Choosing This License or Another License
-----------------------------------------
-
-If for any part of your work you want or need to use *distribution*
-conditions that differ significantly from those in this license, then
-do not refer to this license anywhere in your work but, instead,
-distribute your work under a different license. You may use the text
-of this license as a model for your own license, but your license
-should not refer to the LPPL or otherwise give the impression that
-your work is distributed under the LPPL.
-
-The document `modguide.tex' in the base LaTeX distribution explains
-the motivation behind the conditions of this license. It explains,
-for example, why distributing LaTeX under the GNU General Public
-License (GPL) was considered inappropriate. Even if your work is
-unrelated to LaTeX, the discussion in `modguide.tex' may still be
-relevant, and authors intending to distribute their works under any
-license are encouraged to read it.
-
-A Recommendation on Modification Without Distribution
------------------------------------------------------
-
-It is wise never to modify a component of the Work, even for your own
-personal use, without also meeting the above conditions for
-distributing the modified component. While you might intend that such
-modifications will never be distributed, often this will happen by
-accident -- you may forget that you have modified that component; or
-it may not occur to you when allowing others to access the modified
-version that you are thus distributing it and violating the conditions
-of this license in ways that could have legal implications and, worse,
-cause problems for the community. It is therefore usually in your
-best interest to keep your copy of the Work identical with the public
-one. Many works provide ways to control the behavior of that work
-without altering any of its licensed components.
-
-How to Use This License
------------------------
-
-To use this license, place in each of the components of your work both
-an explicit copyright notice including your name and the year the work
-was authored and/or last substantially modified. Include also a
-statement that the distribution and/or modification of that
-component is constrained by the conditions in this license.
-
-Here is an example of such a notice and statement:
-
- %% pig.dtx
- %% Copyright 2005 M. Y. Name
- %
- % This work may be distributed and/or modified under the
- % conditions of the LaTeX Project Public License, either version 1.3
- % of this license or (at your option) any later version.
- % The latest version of this license is in
- % http://www.latex-project.org/lppl.txt
- % and version 1.3 or later is part of all distributions of LaTeX
- % version 2005/12/01 or later.
- %
- % This work has the LPPL maintenance status `maintained'.
- %
- % The Current Maintainer of this work is M. Y. Name.
- %
- % This work consists of the files pig.dtx and pig.ins
- % and the derived file pig.sty.
-
-Given such a notice and statement in a file, the conditions
-given in this license document would apply, with the `Work' referring
-to the three files `pig.dtx', `pig.ins', and `pig.sty' (the last being
-generated from `pig.dtx' using `pig.ins'), the `Base Interpreter'
-referring to any `LaTeX-Format', and both `Copyright Holder' and
-`Current Maintainer' referring to the person `M. Y. Name'.
-
-If you do not want the Maintenance section of LPPL to apply to your
-Work, change `maintained' above into `author-maintained'.
-However, we recommend that you use `maintained', as the Maintenance
-section was added in order to ensure that your Work remains useful to
-the community even when you can no longer maintain and support it
-yourself.
-
-Derived Works That Are Not Replacements
----------------------------------------
-
-Several clauses of the LPPL specify means to provide reliability and
-stability for the user community. They therefore concern themselves
-with the case that a Derived Work is intended to be used as a
-(compatible or incompatible) replacement of the original Work. If
-this is not the case (e.g., if a few lines of code are reused for a
-completely different task), then clauses 6b and 6d shall not apply.
-
-
-Important Recommendations
--------------------------
-
- Defining What Constitutes the Work
-
- The LPPL requires that distributions of the Work contain all the
- files of the Work. It is therefore important that you provide a
- way for the licensee to determine which files constitute the Work.
- This could, for example, be achieved by explicitly listing all the
- files of the Work near the copyright notice of each file or by
- using a line such as:
-
- % This work consists of all files listed in manifest.txt.
-
- in that place. In the absence of an unequivocal list it might be
- impossible for the licensee to determine what is considered by you
- to comprise the Work and, in such a case, the licensee would be
- entitled to make reasonable conjectures as to which files comprise
- the Work.
diff --git a/macros/generic/markdown/Makefile b/macros/generic/markdown/Makefile
deleted file mode 100644
index fb68360821..0000000000
--- a/macros/generic/markdown/Makefile
+++ /dev/null
@@ -1,205 +0,0 @@
-.PHONY: all base clean implode dist test docker-image force
-
-SHELL=/bin/bash
-
-AUXFILES=markdown.bbl markdown.cb markdown.cb2 markdown.glo markdown.bbl \
- markdown.run.xml markdown.markdown.in markdown.markdown.lua \
- markdown.markdown.out markdown-interfaces.md markdown-miscellanea.md \
- markdown-options.md markdown-tokens.md $(TECHNICAL_DOCUMENTATION_RESOURCES) \
- $(VERSION_FILE)
-AUXDIRS=_minted-markdown _markdown_markdown markdown pkgcheck
-TDSARCHIVE=markdown.tds.zip
-CTANARCHIVE=markdown.ctan.zip
-DISTARCHIVE=markdown.zip
-ARCHIVES=$(TDSARCHIVE) $(CTANARCHIVE) $(DISTARCHIVE)
-EXAMPLES_RESOURCES=examples/example.md examples/scientists.csv
-EXAMPLES_SOURCES=examples/context-mkii.tex examples/context-mkiv.tex examples/latex.tex
-EXAMPLES=examples/context-mkii.pdf examples/context-mkiv.pdf \
- examples/latex-pdftex.pdf examples/latex-luatex.pdf examples/latex-xetex.pdf \
- examples/latex-tex4ht.html examples/latex-tex4ht.css
-TESTS=tests/test.sh tests/support/*.tex tests/templates/*/*.tex.m4 \
- tests/templates/*/COMMANDS.m4 tests/testfiles/*/*.test
-MAKES=Makefile $(addsuffix /Makefile, $(SUBDIRECTORIES)) latexmkrc
-ROOT_README=README.md markdown.png
-READMES=$(ROOT_README) LICENSE examples/README.md tests/README.md \
- tests/support/README.md tests/templates/README.md tests/testfiles/README.md \
- tests/templates/*/README.md tests/testfiles/*/README.md
-VERSION_FILE=VERSION
-CHANGES_FILE=CHANGES.md
-DTXARCHIVE=markdown.dtx
-INSTALLER=markdown.ins docstrip.cfg
-TECHNICAL_DOCUMENTATION_RESOURCES=markdown.bib markdown-figure-block-diagram.tex \
- markdownthemewitiko_markdown_techdoc.sty
-TECHNICAL_DOCUMENTATION=markdown.pdf
-MARKDOWN_USER_MANUAL=markdown.md markdown.css
-HTML_USER_MANUAL=markdown.html markdown.css
-USER_MANUAL=$(MARKDOWN_USER_MANUAL) $(HTML_USER_MANUAL)
-DOCUMENTATION=$(TECHNICAL_DOCUMENTATION) $(HTML_USER_MANUAL) $(ROOT_README) $(VERSION_FILE) \
- $(CHANGES_FILE)
-LIBRARIES=libraries/markdown-tinyyaml.lua
-INSTALLABLES=markdown.lua markdown-cli.lua markdown.tex markdown.sty t-markdown.tex \
- markdownthemewitiko_dot.sty markdownthemewitiko_graphicx_http.sty \
- markdownthemewitiko_tilde.sty
-EXTRACTABLES=$(INSTALLABLES) $(MARKDOWN_USER_MANUAL) $(TECHNICAL_DOCUMENTATION_RESOURCES)
-MAKEABLES=$(TECHNICAL_DOCUMENTATION) $(USER_MANUAL) $(INSTALLABLES) $(EXAMPLES)
-RESOURCES=$(DOCUMENTATION) $(EXAMPLES_RESOURCES) $(EXAMPLES_SOURCES) $(EXAMPLES) \
- $(MAKES) $(READMES) $(INSTALLER) $(DTXARCHIVE) $(TESTS)
-EVERYTHING=$(RESOURCES) $(INSTALLABLES) $(LIBRARIES)
-GITHUB_PAGES=gh-pages
-
-VERSION=$(shell git describe --tags --always --long --exclude latest)
-LASTMODIFIED=$(shell git log -1 --date=format:%Y-%m-%d --format=%ad)
-
-# This is the default pseudo-target. It typesets the manual,
-# the examples, and extracts the package files.
-all: $(MAKEABLES)
- $(MAKE) clean
-
-# This pseudo-target extracts the source files out of the DTX archive and
-# produces external Lua libraries.
-base: $(INSTALLABLES) $(LIBRARIES)
- $(MAKE) clean
-
-# This pseudo-target builds a witiko/markdown Docker image.
-docker-image:
- DOCKER_BUILDKIT=1 docker build --pull --build-arg TEXLIVE_TAG=$(TEXLIVE_TAG) \
- -t witiko/markdown:$(TEXLIVE_TAG) \
- -t witiko/markdown:$(VERSION)-$(TEXLIVE_TAG) .
-
-# This targets produces a directory with files for the GitHub Pages service.
-$(GITHUB_PAGES): $(HTML_USER_MANUAL)
- mkdir -p $@
- cp markdown.html $@/index.html
- cp markdown.css $@
-
-# This target extracts the source files out of the DTX archive.
-$(EXTRACTABLES): $(INSTALLER) $(DTXARCHIVE)
- xetex $<
- sed -i \
- -e 's#(((VERSION)))#$(VERSION)#g' \
- -e 's#(((LASTMODIFIED)))#$(LASTMODIFIED)#g' \
- $(INSTALLABLES)
-
-# This target produces the version file.
-$(VERSION_FILE): force
- printf '%s (%s)\n' $(VERSION) $(LASTMODIFIED) > $@
-
-# This target produces external Lua libraries.
-$(LIBRARIES): force
- $(MAKE) -C libraries $(notdir $@)
-
-# This target typesets the manual.
-$(TECHNICAL_DOCUMENTATION): $(DTXARCHIVE) $(TECHNICAL_DOCUMENTATION_RESOURCES)
- latexmk -silent $< || (cat $(basename $@).log 1>&2; exit 1)
- test `tail $(basename $<).log | sed -rn 's/.*\(([0-9]*) pages.*/\1/p'` -gt 150
-
-# These targets typeset the examples.
-$(EXAMPLES): $(EXAMPLE_SOURCES) examples/example.tex
- $(MAKE) -C examples $(notdir $@)
-
-examples/example.tex: force
- $(MAKE) -C examples $(notdir $@)
-
-# This target converts the markdown user manual to an HTML page.
-%.html: %.md %.css
- awk '{ \
- filename = gensub(/^\/(.*\.md)$$/, "\\1", "g"); \
- if(filename != $$0) \
- system("cat " filename); \
- else \
- print($$0); \
- }' <$< | \
- sed -e 's#\\markdownVersion{}#$(VERSION)#g' \
- -e 's#\\markdownLastModified{}#$(LASTMODIFIED)#g' \
- -e 's#\\TeX{}#<span class="tex">T<sub>e</sub>X</span>#g' \
- -e 's#\\LaTeX{}#<span class="latex">L<sup>a</sup>T<sub>e</sub>X</span>#g' \
- -e 's#\\Hologo{ConTeXt}#Con<span class="tex">T<sub>e</sub>X</span>t#g' \
- -e 's#\\Opt{\([^}]*\)}#**`\1`**#g' \
- -e 's#\\pkg{\([^}]*\)}#**`\1`**#g' \
- -e 's#\\,# #g' \
- -e 's#\\meta{\([^}]*\)}#\&LeftAngleBracket;*\1*\&RightAngleBracket;#g' \
- -e 's#\\acro{\([^}]*\)}#<abbr>\1</abbr>#g' \
- -e 's#😉#<i class="em em-wink"></i>#g' \
- -e 's#\\envm{\([^}]*\)}#`\1`#g' \
- -e 's#\\envmdef{\([^}]*\)}#`\1`#g' \
- -e 's#\\envmref{\([^}]*\)}#`\1`#g' \
- -e 's#\\m{\([^}]*\)}#`\\\1`#g' \
- -e 's#\\mdef{\([^}]*\)}#`\\\1`#g' \
- -e 's#\\mref{\([^}]*\)}#`\\\1`#g' \
- | \
- pandoc -f markdown -t html -N -s --toc --toc-depth=3 --css=$(word 2, $^) >$@
-
-# This pseudo-target runs all the tests in the `tests/` directory.
-test:
- $(MAKE) -C tests
-
-# This pseudo-target produces the distribution archives.
-dist: implode
- $(MAKE) $(ARCHIVES)
- git clone https://gitlab.com/Lotz/pkgcheck.git
- unzip $(CTANARCHIVE) -d markdown
- for RETRY in $$(seq 1 10); \
- do \
- if (( RETRY > 1 )); \
- then \
- sleep $$((RETRY * 15)); \
- fi; \
- if pkgcheck/bin/pkgcheck -d markdown/markdown -T $(TDSARCHIVE) --urlcheck; \
- then \
- EXIT_CODE=0; \
- break; \
- else \
- EXIT_CODE=$$?; \
- fi; \
- done; \
- exit $$EXIT_CODE
- $(MAKE) clean
-
-# This target produces the TeX directory structure archive.
-$(TDSARCHIVE): $(DTXARCHIVE) $(INSTALLER) $(INSTALLABLES) $(DOCUMENTATION) $(EXAMPLES_RESOURCES) $(EXAMPLES_SOURCES) $(LIBRARIES)
- @# Installing the macro package.
- mkdir -p tex/generic/markdown tex/luatex/markdown tex/latex/markdown \
- tex/context/third/markdown scripts/markdown
- cp markdown.lua $(LIBRARIES) tex/luatex/markdown/
- cp markdown-cli.lua scripts/markdown/
- cp markdown.sty markdownthemewitiko_dot.sty markdownthemewitiko_graphicx_http.sty \
- markdownthemewitiko_tilde.sty tex/latex/markdown/
- cp markdown.tex tex/generic/markdown/
- cp t-markdown.tex tex/context/third/markdown/
- @# Installing the documentation.
- mkdir -p doc/generic/markdown doc/latex/markdown/examples \
- doc/context/third/markdown/examples
- cp $(DOCUMENTATION) doc/generic/markdown/
- cp examples/context-mkii.tex examples/context-mkiv.tex $(EXAMPLES_RESOURCES) \
- doc/context/third/markdown/examples/
- cp examples/latex.tex $(EXAMPLES_RESOURCES) doc/latex/markdown/examples/
- @# Installing the sources.
- mkdir -p source/generic/markdown
- cp $(DTXARCHIVE) $(INSTALLER) source/generic/markdown
- zip -r -v -nw $@ doc scripts source tex
- rm -rf doc scripts source tex
-
-# This target produces the distribution archive.
-$(DISTARCHIVE): $(EVERYTHING) $(TDSARCHIVE)
- -ln -s . markdown
- zip -MM -r -v -nw $@ $(addprefix markdown/,$(EVERYTHING)) $(TDSARCHIVE)
- rm -f markdown
-
-# This target produces the CTAN archive.
-$(CTANARCHIVE): $(DTXARCHIVE) $(INSTALLER) $(DOCUMENTATION) $(EXAMPLES_RESOURCES) $(EXAMPLES_SOURCES) $(LIBRARIES) $(TDSARCHIVE)
- -ln -s . markdown
- zip -MM -r -v -nw $@ $(addprefix markdown/,$(DTXARCHIVE) $(INSTALLER) $(DOCUMENTATION) $(EXAMPLES_RESOURCES) $(EXAMPLES_SOURCES) $(LIBRARIES)) $(TDSARCHIVE)
- rm -f markdown
-
-# This pseudo-target removes any existing auxiliary files and directories.
-clean:
- latexmk -c $(DTXARCHIVE)
- rm -f $(AUXFILES)
- rm -rf ${AUXDIRS}
- $(MAKE) -C examples clean
-
-# This pseudo-target removes any makeable files.
-implode: clean
- rm -f $(MAKEABLES) $(ARCHIVES)
- $(MAKE) -C examples implode
- $(MAKE) -C libraries implode
diff --git a/macros/generic/markdown/README.md b/macros/generic/markdown/README.md
index d7423fa93b..a2504c3738 100644
--- a/macros/generic/markdown/README.md
+++ b/macros/generic/markdown/README.md
@@ -188,11 +188,12 @@ For further information, consult one of the following:
- [Markdown 2.10.0: LaTeX Themes & Snippets, Two Flavors of Comments, and LuaMetaTeX][tb131],
- [Markdown 2.15.0: What's New?][tb133], and
- [Markdown 2.17.1: What's New, What's Next?][tb135].
-5. Journal articles of me and my students published by [CSTUG][] (in Czech and Slovak):
+5. Journal articles of me and my students published by [CSTUG Bulletin][csbul] (in Czech and Slovak):
- [Rendering Markdown inside TeX Documents][10.5300/2016-1-4/78],
- [Markdown 2.8.1: Boldly Unto the Throne of Lightweight Markup in TeX][10.5300/2020-1-2/48],
- - [Markdown 2.10.0: LaTeX Themes & Snippets][10.5300/2021-1-4/76], and
- - [Direct Typesetting of Various Document Formats in TeX Using the Pandoc Utility][10.5300/2021-1-4/83].
+ - [Markdown 2.10.0: LaTeX Themes & Snippets][10.5300/2021-1-4/76],
+ - [Direct Typesetting of Various Document Formats in TeX Using the Pandoc Utility][10.5300/2021-1-4/83], and
+ - [High-Level Languages for TeX][10.5300/2022-1-4/35].
6. Talks by me and my students:
- [Five Years of Markdown in LaTeX: What, Why, How, and Whereto][pv212-fall2020] (in Czech), and
- [Markdown 2.10.0: LaTeX Themes & Snippets, Two Flavors of Comments, and LuaMetaTeX][tb131-video] ([slides][tb131-slides]).
@@ -205,12 +206,12 @@ For further information, consult one of the following:
[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/TUGboat/tb38-2/tb119novotny.pdf "Using Markdown inside TeX documents"
- [tb124]: https://www.tug.org/TUGboat/tb40-1/tb124novotny-markdown.pdf "Markdown 2.7.0: Towards lightweight markup in TeX"
- [tb129]: https://www.tug.org/TUGboat/tb41-3/tb129novotny-frozen.pdf "Making Markdown into a Microwave Meal"
- [tb131]: https://www.tug.org/TUGboat/tb42-2/tb131novotny-markdown.pdf "Markdown 2.10.0: LaTeX Themes & Snippets, Two Flavors of Comments, and LuaMetaTeX"
- [tb133]: https://www.tug.org/TUGboat/tb43-1/tb133novotny-markdown.pdf "Markdown 2.15.0: What's New?"
- [tb135]: https://www.tug.org/TUGboat/production/43-3/tb135novotny-markdown.pdf "Markdown 2.17.1: What's New, What's Next?"
+ [tb119]: https://www.tug.org/TUGboat/tb38-2/tb119novotny.pdf "Using Markdown inside TeX documents"
+ [tb124]: https://www.tug.org/TUGboat/tb40-1/tb124novotny-markdown.pdf "Markdown 2.7.0: Towards lightweight markup in TeX"
+ [tb129]: https://www.tug.org/TUGboat/tb41-3/tb129novotny-frozen.pdf "Making Markdown into a Microwave Meal"
+ [tb131]: https://www.tug.org/TUGboat/tb42-2/tb131novotny-markdown.pdf "Markdown 2.10.0: LaTeX Themes & Snippets, Two Flavors of Comments, and LuaMetaTeX"
+ [tb133]: https://www.tug.org/TUGboat/tb43-1/tb133novotny-markdown.pdf "Markdown 2.15.0: What's New?"
+ [tb135]: https://www.overleaf.com/read/pgwrhhskmgfm "Markdown 2.17.1: What's New, What's Next?"
[tb131-slides]: https://tug.org/tug2021/assets/pdf/tug2021-novotny-slides.pdf "Markdown 2.10.0: LaTeX Themes & Snippets, Two Flavors of Comments, and LuaMetaTeX"
[tb131-video]: https://youtu.be/THmPkAncMnc "Markdown 2.10.0: LaTeX Themes & Snippets, Two Flavors of Comments, and LuaMetaTeX"
@@ -218,10 +219,11 @@ For further information, consult one of the following:
[tb134-example]: https://tug.org/tug2022/assets/pdf/Tereza_Vrabcová-TUG2022-example.pdf "A Gentle Introduction to Markdown for Writers"
[tb134-video]: https://youtu.be/cqbKgjAlNjo?t=2h10m35s "A Gentle Introduction to Markdown for Writers"
- [10.5300/2016-1-4/78]: https://bulletin.cstug.cz/pdf/2016-1-4.pdf#page=80 "Rendering Markdown inside TeX Documents"
- [10.5300/2020-1-2/48]: https://bulletin.cstug.cz/pdf/2020-1-2.pdf#page=50 "Markdown 2.8.1: Boldly Unto the Throne of Lightweight Markup in TeX"
- [10.5300/2021-1-4/76]: https://bulletin.cstug.cz/pdf/2021-1-4.pdf#page=78 "Markdown 2.10.0: LaTeX Themes & Snippets"
- [10.5300/2021-1-4/83]: https://bulletin.cstug.cz/pdf/2021-1-4.pdf#page=85 "Direct Typesetting of Various Document Formats in TeX Using the Pandoc Utility"
+ [10.5300/2016-1-4/78]: https://www.doi.org/10.5300/2016-1-4/78 "Rendering Markdown inside TeX Documents"
+ [10.5300/2020-1-2/48]: https://www.doi.org/10.5300/2020-1-2/48 "Markdown 2.8.1: Boldly Unto the Throne of Lightweight Markup in TeX"
+ [10.5300/2021-1-4/76]: https://www.doi.org/10.5300/2021-1-4/76 "Markdown 2.10.0: LaTeX Themes & Snippets"
+ [10.5300/2021-1-4/83]: https://www.doi.org/10.5300/2021-1-4/83 "Direct Typesetting of Various Document Formats in TeX Using the Pandoc Utility"
+ [10.5300/2022-1-4/35]: https://www.doi.org/10.5300/2022-1-4/35 "High-Level Languages for TeX"
[pv212-fall2020]: https://is.muni.cz/elearning/warp?qurl=%2Fel%2Ffi%2Fpodzim2020%2FPV212%2Findex.qwarp;prejit=5595952
@@ -229,7 +231,7 @@ For further information, consult one of the following:
[liantze]: http://liantze.penguinattack.org/ "Rants from the Lab"
[overleaf]: https://www.overleaf.com/ "Overleaf: Real-time Collaborative Writing and Publishing Tools with Integrated PDF Preview"
[tugboat]: https://www.tug.org/tugboat/ "TUGboat - Communications of the TeX Users Group"
- [cstug]: https://www.cstug.cz/ "Československé sdružení uživatelů TeXu"
+ [csbul]: https://bulletin.cstug.cz/ "Zpravodaj Československého sdružení uživatelů TeXu"
[manual-latest]: https://witiko.github.io/markdown "Markdown Package User Manual"
[manual-tex-live]: https://mirrors.ctan.org/macros/generic/markdown/markdown.html "Markdown Package User Manual"
diff --git a/macros/generic/markdown/VERSION b/macros/generic/markdown/VERSION
index ca77f648f3..8d5f7708c3 100644
--- a/macros/generic/markdown/VERSION
+++ b/macros/generic/markdown/VERSION
@@ -1 +1 @@
-2.18.0-0-gd8ae860 (2022-10-30)
+2.19.0-0-g80fcf20 (2022-12-23)
diff --git a/macros/generic/markdown/examples/README.md b/macros/generic/markdown/examples/README.md
deleted file mode 100644
index 0d32d16ec4..0000000000
--- a/macros/generic/markdown/examples/README.md
+++ /dev/null
@@ -1,7 +0,0 @@
-This directory contains example LaTeX and ConTeXt documents. These documents
-can be typeset by running the GNU `make` program in this directory. It is
-expected that your TeX installation contains the `pdflatex`, `xelatex`,
-`lualatex`, `texexec`, and `context` executables.
-
-The `markdown.dtx` file in the root directory contains documentation in the
-markdown language and can also serve as an example LaTeX document.
diff --git a/macros/generic/markdown/examples/context-mkii.pdf b/macros/generic/markdown/examples/context-mkii.pdf
deleted file mode 100644
index 2f2f8e11cf..0000000000
--- a/macros/generic/markdown/examples/context-mkii.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/generic/markdown/examples/context-mkiv.pdf b/macros/generic/markdown/examples/context-mkiv.pdf
deleted file mode 100644
index 51246ff4a7..0000000000
--- a/macros/generic/markdown/examples/context-mkiv.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/generic/markdown/examples/latex-luatex.pdf b/macros/generic/markdown/examples/latex-luatex.pdf
deleted file mode 100644
index 7777fae525..0000000000
--- a/macros/generic/markdown/examples/latex-luatex.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/generic/markdown/examples/latex-pdftex.pdf b/macros/generic/markdown/examples/latex-pdftex.pdf
deleted file mode 100644
index 10024e87b2..0000000000
--- a/macros/generic/markdown/examples/latex-pdftex.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/generic/markdown/examples/latex-tex4ht.css b/macros/generic/markdown/examples/latex-tex4ht.css
deleted file mode 100644
index 1a76a03921..0000000000
--- a/macros/generic/markdown/examples/latex-tex4ht.css
+++ /dev/null
@@ -1,219 +0,0 @@
-
-/* start css.sty */
-.ec-lmr-17{font-size:170%;}
-.ec-lmri-12x-x-144{font-size:172%; font-style:italic;}
-.ec-lmri-12x-x-144{ font-style:italic;}
-.ec-lmri-12x-x-144{ font-style:italic;}
-.ec-lmri-12x-x-144{ font-style:italic;}
-.ec-lmri-12x-x-144{ font-style:italic;}
-.ec-lmri-12x-x-144{ font-style:italic;}
-.ec-lmri-12x-x-144{ font-style:italic;}
-.ec-lmri-12x-x-144{ font-style:italic;}
-.ec-lmri-12x-x-144{ font-style:italic;}
-.ec-lmri-12x-x-144{ font-style:italic;}
-.ec-lmr-12{font-size:120%;}
-.ec-lmtt-10{ font-family: monospace,monospace;}
-.ec-lmtt-10{ font-family: monospace,monospace;}
-.ec-lmtt-10{ font-family: monospace,monospace;}
-.ec-lmtt-10{ font-family: monospace,monospace;}
-.ec-lmtt-10{ font-family: monospace,monospace;}
-.ec-lmtt-10{ font-family: monospace,monospace;}
-.ec-lmtt-10{ font-family: monospace,monospace;}
-.ec-lmtt-10{ font-family: monospace,monospace;}
-.ec-lmtt-10{ font-family: monospace,monospace;}
-.ec-lmtt-10{ font-family: monospace,monospace;}
-.ec-lmbx-10{ font-weight: bold;}
-.ec-lmbx-10{ font-weight: bold;}
-.ec-lmbx-10{ font-weight: bold;}
-.ec-lmbx-10{ font-weight: bold;}
-.ec-lmbx-10{ font-weight: bold;}
-.ec-lmbx-10{ font-weight: bold;}
-.ec-lmbx-10{ font-weight: bold;}
-.ec-lmbx-10{ font-weight: bold;}
-.ec-lmbx-10{ font-weight: bold;}
-.ec-lmbx-10{ font-weight: bold;}
-.ec-lmr-9{font-size:90%;}
-.ec-lmr-8{font-size:80%;}
-.ec-lmtt-8{font-size:80%; font-family: monospace,monospace;}
-.ec-lmtt-8{ font-family: monospace,monospace;}
-.ec-lmtt-8{ font-family: monospace,monospace;}
-.ec-lmtt-8{ font-family: monospace,monospace;}
-.ec-lmtt-8{ font-family: monospace,monospace;}
-.ec-lmtt-8{ font-family: monospace,monospace;}
-.ec-lmtt-8{ font-family: monospace,monospace;}
-.ec-lmtt-8{ font-family: monospace,monospace;}
-.ec-lmtt-8{ font-family: monospace,monospace;}
-.ec-lmtt-8{ font-family: monospace,monospace;}
-.ec-lmri-10{ font-style:italic;}
-.ec-lmri-10{ font-style:italic;}
-.ec-lmri-10{ font-style:italic;}
-.ec-lmri-10{ font-style:italic;}
-.ec-lmri-10{ font-style:italic;}
-.ec-lmri-10{ font-style:italic;}
-.ec-lmri-10{ font-style:italic;}
-.ec-lmri-10{ font-style:italic;}
-.ec-lmri-10{ font-style:italic;}
-.ec-lmri-10{ font-style:italic;}
-.lmmi-7{font-size:70%;}
-p{margin-top:0;margin-bottom:0}
-p.indent{text-indent:0;}
-p + p{margin-top:1em;}
-p + div, p + pre {margin-top:1em;}
-div + p, pre + p {margin-top:1em;}
-a { overflow-wrap: break-word; word-wrap: break-word; word-break: break-word; hyphens: auto; }
-@media print {div.crosslinks {visibility:hidden;}}
-table.tabular{border-collapse: collapse; border-spacing: 0;}
-a img { border-top: 0; border-left: 0; border-right: 0; }
-center { margin-top:1em; margin-bottom:1em; }
-td center { margin-top:0em; margin-bottom:0em; }
-.Canvas { position:relative; }
-img.math{vertical-align:middle;}
-div.par-math-display, div.math-display{text-align:center;}
-li p.indent { text-indent: 0em }
-li p:first-child{ margin-top:0em; }
-li p:last-child, li div:last-child { margin-bottom:0.5em; }
-li p:first-child{ margin-bottom:0; }
-li p~ul:last-child, li p~ol:last-child{ margin-bottom:0.5em; }
-.enumerate1 {list-style-type:decimal;}
-.enumerate2 {list-style-type:lower-alpha;}
-.enumerate3 {list-style-type:lower-roman;}
-.enumerate4 {list-style-type:upper-alpha;}
-div.newtheorem { margin-bottom: 2em; margin-top: 2em;}
-div.newtheorem .head{font-weight: bold;}
-.obeylines-h,.obeylines-v {white-space: nowrap; }
-div.obeylines-v p { margin-top:0; margin-bottom:0; }
-.overline{ text-decoration:overline; }
-.overline img{ border-top: 1px solid black; }
-td.displaylines {text-align:center; white-space:nowrap;}
-.centerline {text-align:center;}
-.rightline {text-align:right;}
-pre.verbatim {font-family: monospace,monospace; text-align:left; clear:both; }
-.fbox {padding-left:3.0pt; padding-right:3.0pt; text-indent:0pt; border:solid black 0.4pt; }
-div.fbox {display:table}
-div.center div.fbox {text-align:center; clear:both; padding-left:3.0pt; padding-right:3.0pt; text-indent:0pt; border:solid black 0.4pt; }
-div.minipage{width:100%;}
-div.center, div.center div.center {text-align: center; margin-left:1em; margin-right:1em;}
-div.center div {text-align: left;}
-div.flushright, div.flushright div.flushright {text-align: right;}
-div.flushright div {text-align: left;}
-div.flushleft {text-align: left;}
-.underline{ text-decoration:underline; }
-.underline img{ border-bottom: 1px solid black; margin-bottom:1pt; }
-.framebox-c, .framebox-l, .framebox-r { padding-left:3.0pt; padding-right:3.0pt; text-indent:0pt; border:solid black 0.4pt; }
-.framebox-c {text-align:center;}
-.framebox-l {text-align:left;}
-.framebox-r {text-align:right;}
-span.thank-mark{ vertical-align: super }
-span.footnote-mark sup.textsuperscript, span.footnote-mark a sup.textsuperscript{ font-size:80%; }
-div.footnotes{border-top:solid 1px black; border-bottom:solid 1px black; padding-bottom:1ex; padding-top:0.5ex; margin-right:15%; margin-top:2ex; font-style:italic; font-size:85%;}
-div.footnotes p{margin-top:0; margin-bottom:0; text-indent:0;}
-div.tabular, div.center div.tabular {text-align: center; margin-top:0.5em; margin-bottom:0.5em; }
-table.tabular td p{margin-top:0em;}
-table.tabular {margin-left: auto; margin-right: auto;}
-td p:first-child{ margin-top:0em; }
-td p:last-child{ margin-bottom:0em; }
-div.td00{ margin-left:0pt; margin-right:0pt; }
-div.td01{ margin-left:0pt; margin-right:5pt; }
-div.td10{ margin-left:5pt; margin-right:0pt; }
-div.td11{ margin-left:5pt; margin-right:5pt; }
-table[rules] {border-left:solid black 0.4pt; border-right:solid black 0.4pt; }
-td.td00{ padding-left:0pt; padding-right:0pt; }
-td.td01{ padding-left:0pt; padding-right:5pt; }
-td.td10{ padding-left:5pt; padding-right:0pt; }
-td.td11{ padding-left:5pt; padding-right:5pt; }
-table[rules] {border-left:solid black 0.4pt; border-right:solid black 0.4pt; }
-.hline hr, .cline hr{ height : 0px; margin:0px; }
-.hline td, .cline td{ padding: 0; }
-.hline hr, .cline hr{border:none;border-top:1px solid black;}
-.hline {border-top: 1px solid black;}
-.tabbing-right {text-align:right;}
-div.float, div.figure {margin-left: auto; margin-right: auto;}
-div.float img {text-align:center;}
-div.figure img {text-align:center;}
-.marginpar,.reversemarginpar {width:20%; float:right; text-align:left; margin-left:auto; margin-top:0.5em; font-size:85%; text-decoration:underline;}
-.marginpar p,.reversemarginpar p{margin-top:0.4em; margin-bottom:0.4em;}
-.reversemarginpar{float:left;}
-table.equation {width:100%;}
-.equation td{text-align:center; }
-td.equation { margin-top:1em; margin-bottom:1em; }
-td.equation-label { width:5%; text-align:center; }
-td.eqnarray4 { width:5%; white-space: normal; }
-td.eqnarray2 { width:5%; }
-table.eqnarray-star, table.eqnarray {width:100%;}
-div.eqnarray{text-align:center;}
-div.array {text-align:center;}
-div.pmatrix {text-align:center;}
-table.pmatrix {width:100%;}
-span.pmatrix img{vertical-align:middle;}
-div.pmatrix {text-align:center;}
-table.pmatrix {width:100%;}
-span.bar-css {text-decoration:overline;}
-img.cdots{vertical-align:middle;}
-.partToc a, .partToc, .likepartToc a, .likepartToc {line-height: 200%; font-weight:bold; font-size:110%;}
-.chapterToc a, .chapterToc, .likechapterToc a, .likechapterToc, .appendixToc a, .appendixToc {line-height: 200%; font-weight:bold;}
-.index-item, .index-subitem, .index-subsubitem {display:block}
-div.caption {text-indent:-2em; margin-left:3em; margin-right:1em; text-align:left;}
-div.caption span.id{font-weight: bold; white-space: nowrap; }
-h1.partHead{text-align: center}
-p.bibitem { text-indent: -2em; margin-left: 2em; margin-top:0.6em; margin-bottom:0.6em; }
-p.bibitem-p { text-indent: 0em; margin-left: 2em; margin-top:0.6em; margin-bottom:0.6em; }
-.paragraphHead, .likeparagraphHead { margin-top:2em; font-weight: bold;}
-.subparagraphHead, .likesubparagraphHead { font-weight: bold;}
-.verse{white-space:nowrap; margin-left:2em}
-div.maketitle {text-align:center;}
-h2.titleHead{text-align:center;}
-div.maketitle{ margin-bottom: 2em; }
-div.author, div.date {text-align:center;}
-div.thanks{text-align:left; margin-left:10%; font-size:85%; font-style:italic; }
-h1.partHead{text-align: center}
- .chapterToc, .likechapterToc {margin-left:0em;}
- .chapterToc ~ .likesectionToc, .chapterToc ~ .sectionToc, .likechapterToc ~ .likesectionToc, .likechapterToc ~ .sectionToc {margin-left:2em;}
- .chapterToc ~ .likesectionToc ~ .likesubsectionToc, .chapterToc ~ .likesectionToc ~ .subsectionToc, .chapterToc ~ .sectionToc ~ .likesubsectionToc, .chapterToc ~ .sectionToc ~ .subsectionToc, .likechapterToc ~ .likesectionToc ~ .likesubsectionToc, .likechapterToc ~ .likesectionToc ~ .subsectionToc, .likechapterToc ~ .sectionToc ~ .likesubsectionToc, .likechapterToc ~ .sectionToc ~ .subsectionToc {margin-left:4em;}
-.chapterToc ~ .likesectionToc ~ .likesubsectionToc ~ .likesubsubsectionToc, .chapterToc ~ .likesectionToc ~ .likesubsectionToc ~ .subsubsectionToc, .chapterToc ~ .likesectionToc ~ .subsectionToc ~ .likesubsubsectionToc, .chapterToc ~ .likesectionToc ~ .subsectionToc ~ .subsubsectionToc, .chapterToc ~ .sectionToc ~ .likesubsectionToc ~ .likesubsubsectionToc, .chapterToc ~ .sectionToc ~ .likesubsectionToc ~ .subsubsectionToc, .chapterToc ~ .sectionToc ~ .subsectionToc ~ .likesubsubsectionToc, .chapterToc ~ .sectionToc ~ .subsectionToc ~ .subsubsectionToc, .likechapterToc ~ .likesectionToc ~ .likesubsectionToc ~ .likesubsubsectionToc, .likechapterToc ~ .likesectionToc ~ .likesubsectionToc ~ .subsubsectionToc, .likechapterToc ~ .likesectionToc ~ .subsectionToc ~ .likesubsubsectionToc, .likechapterToc ~ .likesectionToc ~ .subsectionToc ~ .subsubsectionToc, .likechapterToc ~ .sectionToc ~ .likesubsectionToc ~ .likesubsubsectionToc, .likechapterToc ~ .sectionToc ~ .likesubsectionToc ~ .subsubsectionToc, .likechapterToc ~ .sectionToc ~ .subsectionToc ~ .likesubsubsectionToc .likechapterToc ~ .sectionToc ~ .subsectionToc ~ .subsubsectionToc {margin-left:6em;}
- .likesectionToc , .sectionToc {margin-left:0em;}
- .likesectionToc ~ .likesubsectionToc, .likesectionToc ~ .subsectionToc, .sectionToc ~ .likesubsectionToc, .sectionToc ~ .subsectionToc {margin-left:2em;}
-.likesectionToc ~ .likesubsectionToc ~ .likesubsubsectionToc, .likesectionToc ~ .likesubsectionToc ~ .subsubsectionToc, .likesectionToc ~ .subsectionToc ~ .likesubsubsectionToc, .likesectionToc ~ .subsectionToc ~ .subsubsectionToc, .sectionToc ~ .likesubsectionToc ~ .likesubsubsectionToc, .sectionToc ~ .likesubsectionToc ~ .subsubsectionToc, .sectionToc ~ .subsectionToc ~ .likesubsubsectionToc, .sectionToc ~ .subsectionToc ~ .subsubsectionToc {margin-left:4em;}
- .likesubsectionToc, .subsectionToc {margin-left:0em;}
- .likesubsectionToc ~ .subsubsectionToc, .subsectionToc ~ .subsubsectionToc {margin-left:2em;}
-figure.float, div.figure {margin-left: auto; margin-right: auto;}
-figure.figure {text-align:center;}
-figcaption.caption {text-indent:-2em; margin-left:3em; margin-right:1em; text-align:center;}
-figcaption.caption span.id{font-weight: bold; white-space: nowrap; }
-p + figcaption, img + figcaption{margin-top: 1em;}
-dt.enumerate{float:left; clear:left; margin-right:0.2em; margin-left:2em;}
-dt.compactenum{float:left; clear:left; margin-right:0.2em; margin-left:2em;}
-.equation td{text-align:center; }
-.equation-star td{text-align:center; }
-table.equation-star { width:100%; }
-table.equation { width:100%; }
-table.align, table.alignat, table.xalignat, table.xxalignat, table.flalign {width:95%; margin-left:5%; white-space: nowrap;}
-table.align-star, table.alignat-star, table.xalignat-star, table.flalign-star {margin-left:auto; margin-right:auto; white-space: nowrap;}
-td.align-label { width:5%; text-align:center; }
-td.align-odd { text-align:right; padding-right:0.3em;}
-td.align-even { text-align:left; padding-right:0.6em;}
-table.multline, table.multline-star {width:100%;}
-td.gather {text-align:center; }
-table.gather {width:100%;}
-div.gather-star {text-align:center;}
-pre.fancyvrb {white-space: pre-wrap; margin:0em;font-family:monospace,monospace;}
-.rotatebox{display: inline-block;}
-span.textso{letter-spacing: 0.3em; word-spacing: 0.3em}
-span.textul{text-decoration:underline}
-span.textst{text-decoration:line-through}
-span.textcaps{font-variant:small-caps}
-#TBL-2-1{border-left: 1px solid black;}
-#TBL-2-1{border-right:1px solid black;}
-#TBL-2-2{border-right:1px solid black;}
-#TBL-2-3{border-right:1px solid black;}
-tr#TBL-3-1- {border-top:0.11197em solid #000;}
-tr#TBL-3-1- {border-bottom:0.06998em solid #000}
-tr#TBL-3-4- {border-bottom:0.11197em solid #000}
-#TBL-4-1{border-left: 1px solid black;}
-#TBL-4-1{border-right:1px solid black;}
-#TBL-4-2{border-right:1px solid black;}
-#TBL-4-3{border-right:1px solid black;}
-tr#TBL-5-1- {border-top:0.11197em solid #000;}
-tr#TBL-5-1- {border-bottom:0.06998em solid #000}
-tr#TBL-5-4- {border-bottom:0.11197em solid #000}
-/* end css.sty */
-
diff --git a/macros/generic/markdown/examples/latex-tex4ht.html b/macros/generic/markdown/examples/latex-tex4ht.html
deleted file mode 100644
index 225e65c8f7..0000000000
--- a/macros/generic/markdown/examples/latex-tex4ht.html
+++ /dev/null
@@ -1,452 +0,0 @@
-<div class='maketitle'>
-
-
-
-
-<h2 class='titleHead'>An Example Markdown Document</h2>
-<div class='author'><span class='ec-lmr-12'>Vít Novotný</span></div><br />
-<div class='date'><span class='ec-lmr-12'>October 30, 2022</span></div>
-
- </div><!DOCTYPE html>
-<html lang='en' xml:lang='en'>
-<head><title>An Example Markdown Document</title>
-<meta charset='utf-8' />
-<meta content='TeX4ht (https://tug.org/tex4ht/)' name='generator' />
-<meta content='width=device-width,initial-scale=1' name='viewport' />
-<link href='latex-tex4ht.css' rel='stylesheet' type='text/css' />
-<meta content='latex-tex4ht.tex' name='src' />
-</head><body>
-
- <h2 class='chapterHead' id='this-is-an-h'><span class='titlemark'>Chapter 1</span><br /><a id='x1-10001'></a>This is an H1</h2>
- <h3 class='sectionHead' id='this-is-an-h1'><span class='titlemark'>1.1 </span> <a id='x1-20001.1'></a>This is an H2</h3>
-<!-- l. 4 --><p class='noindent'>
-</p>
- <h4 class='subsectionHead' id='this-is-an-h2'><span class='titlemark'>1.1.1 </span> <a id='x1-30001.1.1'></a>This is an H3</h4>
-<!-- l. 5 --><p class='noindent'>
-</p>
- <h5 class='subsubsectionHead' id='this-is-an-h3'><a id='x1-4000'></a>This is an H4</h5>
-<!-- l. 6 --><p class='noindent'><span class='paragraphHead' id='this-is-an-h4'><a id='x1-5000'></a><span class='ec-lmbx-10'>This is an H5</span></span>
-</p>
-<!-- l. 7 --><p class='indent'> <span class='subparagraphHead' id='this-is-an-h5'> <a id='x1-6000'></a><span class='ec-lmbx-10'>This is an H6</span></span>
- This is a text paragraph containing an ellipsis … and followed by a thematic
-break.
-</p><!-- l. 9 --><p class='noindent'>__________________________________________________________________
-</p><!-- l. 10 --><p class='indent'> This is inline <span class='ec-lmtt-10'>code</span>. This is a link<span class='footnote-mark'><a href='#fn1x2' id='fn1x2-bk'><sup class='textsuperscript'>1</sup></a></span><a id='x1-6001f1'></a>.
-<span class='ec-lmri-10'>This is an </span>emphasized <span class='ec-lmri-10'>span of text</span>. <span class='ec-lmbx-10'>This is a </span>strongly emphasized <span class='ec-lmbx-10'>span of
-</span><span class='ec-lmbx-10'>text</span>.
-</p>
- <figure class='figure' id='-an-example-image-from-martin-scharrers-mwe-package'>
-
-
-<a id='x1-60021'></a>
-
-<div class='center'>
-<!-- l. 11 --><p class='noindent'>
-</p><!-- l. 11 --><p class='noindent'><img alt='PIC' src='example-image.png' /></p></div>
-<figcaption class='caption'><span class='id'>Figure 1.1: </span><span class='content'>An example image from Martin Scharrer’s mwe package</span></figcaption><!-- tex4ht:label?: x1-60021 -->
-
- </figure>
- <div class='table'>
-
-<!-- l. 12 --><p class='indent' id='-the-great-minds-of-the-th-century-rendered-via-a-content-block'> <a id='x1-60031'></a></p><figure class='float'>
-
-<div class='center'>
-<!-- l. 12 --><p class='noindent'>
-</p>
-<div class='tabular'> <table class='tabular' id='TBL-2'><colgroup id='TBL-2-1g'><col id='TBL-2-1' /></colgroup><colgroup id='TBL-2-2g'><col id='TBL-2-2' /></colgroup><colgroup id='TBL-2-3g'><col id='TBL-2-3' /></colgroup><tr class='hline'><td></td><td></td><td></td></tr><tr id='TBL-2-1-' style='vertical-align:baseline;'><td class='td11' id='TBL-2-1-1' style='white-space:nowrap; text-align:left;'>Name </td><td class='td11' id='TBL-2-1-2' style='white-space:nowrap; text-align:left;'>Surname</td><td class='td11' id='TBL-2-1-3' style='white-space:nowrap; text-align:left;'>Born</td></tr><tr class='hline'><td></td><td></td><td></td></tr><tr id='TBL-2-2-' style='vertical-align:baseline;'><td class='td11' id='TBL-2-2-1' style='white-space:nowrap; text-align:left;'>Albert </td><td class='td11' id='TBL-2-2-2' style='white-space:nowrap; text-align:left;'>Einstein </td><td class='td11' id='TBL-2-2-3' style='white-space:nowrap; text-align:left;'>1879</td>
-</tr><tr id='TBL-2-3-' style='vertical-align:baseline;'><td class='td11' id='TBL-2-3-1' style='white-space:nowrap; text-align:left;'>Marie </td><td class='td11' id='TBL-2-3-2' style='white-space:nowrap; text-align:left;'>Curie </td><td class='td11' id='TBL-2-3-3' style='white-space:nowrap; text-align:left;'>1867</td>
-</tr><tr id='TBL-2-4-' style='vertical-align:baseline;'><td class='td11' id='TBL-2-4-1' style='white-space:nowrap; text-align:left;'>Thomas</td><td class='td11' id='TBL-2-4-2' style='white-space:nowrap; text-align:left;'>Edison </td><td class='td11' id='TBL-2-4-3' style='white-space:nowrap; text-align:left;'>1847</td>
-</tr><tr class='hline'><td></td><td></td><td></td></tr></table> </div></div>
-<figcaption class='caption'><span class='id'>Table 1.1: </span><span class='content'>The great minds of the 19th century rendered via a content block</span></figcaption><!-- tex4ht:label?: x1-60031 -->
-
- </figure>
- </div>
-<!-- l. 13 --><p class='indent'> This is a fenced code block:
-</p>
- <pre class='fancyvrb' id='fancyvrb1'>
-<a id='x1-6005r1'></a><span class='ec-lmtt-10'>\documentclass{article}</span>
-
-<a id='x1-6007r2'></a><span class='ec-lmtt-10'>\begin{document}</span>
-
-<a id='x1-6009r3'></a><span class='ec-lmtt-10'>  Hello world!</span>
-
-<a id='x1-6011r4'></a><span class='ec-lmtt-10'>\end{document}</span>
- </pre>
-<!-- l. 15 --><p class='indent'> This is a table:
-</p>
- <div class='table'>
-
-<!-- l. 16 --><p class='indent' id='-demonstration-of-pipe-table-syntax'> <a id='x1-60122'></a></p><figure class='float'>
-
-<div class='tabular'>
- <table class='tabular' id='TBL-3'><colgroup id='TBL-3-1g'><col id='TBL-3-1' /><col id='TBL-3-2' /><col id='TBL-3-3' /><col id='TBL-3-4' /></colgroup><tr id='TBL-3-1-' style='vertical-align:baseline;'><td class='td11' id='TBL-3-1-1' style='white-space:nowrap; text-align:right;'>Right</td><td class='td11' id='TBL-3-1-2' style='white-space:nowrap; text-align:left;'>Left</td><td class='td11' id='TBL-3-1-3' style='white-space:nowrap; text-align:left;'>Default</td><td class='td11' id='TBL-3-1-4' style='white-space:nowrap; text-align:center;'>Center</td>
-</tr><tr id='TBL-3-2-' style='vertical-align:baseline;'><td class='td11' id='TBL-3-2-1' style='white-space:nowrap; text-align:right;'> 12</td><td class='td11' id='TBL-3-2-2' style='white-space:nowrap; text-align:left;'>12 </td><td class='td11' id='TBL-3-2-3' style='white-space:nowrap; text-align:left;'>12 </td><td class='td11' id='TBL-3-2-4' style='white-space:nowrap; text-align:center;'> 12 </td>
-</tr><tr id='TBL-3-3-' style='vertical-align:baseline;'><td class='td11' id='TBL-3-3-1' style='white-space:nowrap; text-align:right;'> 123</td><td class='td11' id='TBL-3-3-2' style='white-space:nowrap; text-align:left;'>123 </td><td class='td11' id='TBL-3-3-3' style='white-space:nowrap; text-align:left;'>123 </td><td class='td11' id='TBL-3-3-4' style='white-space:nowrap; text-align:center;'> 123 </td>
-</tr><tr id='TBL-3-4-' style='vertical-align:baseline;'><td class='td11' id='TBL-3-4-1' style='white-space:nowrap; text-align:right;'> 1</td><td class='td11' id='TBL-3-4-2' style='white-space:nowrap; text-align:left;'>1 </td><td class='td11' id='TBL-3-4-3' style='white-space:nowrap; text-align:left;'>1 </td><td class='td11' id='TBL-3-4-4' style='white-space:nowrap; text-align:center;'> 1 </td>
-</tr></table> </div>
-<figcaption class='caption'><span class='id'>Table 1.2: </span><span class='content'>Demonstration of pipe table syntax.</span></figcaption><!-- tex4ht:label?: x1-60122 -->
-
- </figure>
- </div>
-<!-- l. 17 --><p class='indent'> This is a bullet list:
- </p><ul>
- <li class='compactitem'>The first item of a bullet list</li></ul>
-<!-- l. 21 --><p class='indent'> that spans several paragraphs,
-</p>
- <ul class='itemize1'>
- <li class='itemize'>the second item of a bullet list,
- </li>
- <li class='itemize'>the third item of a bullet list.</li></ul>
-<!-- l. 26 --><p class='indent'> This is a compact bullet list:
- </p><ul>
- <li class='compactitem'>The first item of a bullet list,
- </li>
- <li class='compactitem'>the second item of a bullet list,
- </li>
- <li class='compactitem'>the third item of a bullet list.</li></ul>
-<!-- l. 32 --><p class='indent'> This is an ordered list:
- </p><dl class='compactenum'><dt class='compactenum'>
-5. </dt><dd class='compactenum'>The first item of an ordered list</dd></dl>
-<!-- l. 35 --><p class='indent'> that spans several paragraphs,
- </p><dl class='enumerate'><dt class='enumerate'>
-6. </dt><dd class='enumerate'>the second item of an ordered list,
- </dd><dt class='enumerate'>
-7. </dt><dd class='enumerate'>the third item of an ordered list.</dd></dl>
-<!-- l. 39 --><p class='indent'> This is a fancy ordered list:
- </p><dl class='compactenum'><dt class='compactenum'>
-e) </dt><dd class='compactenum'>The first item of an ordered list</dd></dl>
-<!-- l. 42 --><p class='indent'> that spans several paragraphs,
- </p><dl class='enumerate'><dt class='enumerate'>
- f) </dt><dd class='enumerate'>the second item of an ordered list,
- </dd><dt class='enumerate'>
-g) </dt><dd class='enumerate'>the third item of an ordered list.</dd></dl>
-<!-- l. 46 --><p class='indent'> This is an ordered list using hash enumerators:
- </p><dl class='compactenum'><dt class='compactenum'>
-1. </dt><dd class='compactenum'>The first item of an ordered list</dd></dl>
-
-<!-- l. 49 --><p class='indent'> that spans several paragraphs,
- </p><dl class='enumerate'><dt class='enumerate'>
-1. </dt><dd class='enumerate'>the second item of an ordered list,
- </dd><dt class='enumerate'>
-2. </dt><dd class='enumerate'>the third item of an ordered list.</dd></dl>
-<!-- l. 53 --><p class='indent'> This is a compact ordered list:
- </p><dl class='compactenum'><dt class='compactenum'>
-5. </dt><dd class='compactenum'>The first item of an ordered list,
- </dd><dt class='compactenum'>
-6. </dt><dd class='compactenum'>the second item of an ordered list,
- </dd><dt class='compactenum'>
-7. </dt><dd class='compactenum'>the third item of an ordered list.</dd></dl>
-<!-- l. 58 --><p class='indent'> This is a compact ordered list using hash enumerators:
- </p><dl class='compactenum'><dt class='compactenum'>
-1. </dt><dd class='compactenum'>The first item of an ordered list,
- </dd><dt class='compactenum'>
-2. </dt><dd class='compactenum'>the second item of an ordered list,
- </dd><dt class='compactenum'>
-3. </dt><dd class='compactenum'>the third item of an ordered list.</dd></dl>
-<!-- l. 63 --><p class='indent'> This is a compact fancy ordered list using hash enumerators:
- </p><dl class='compactenum'><dt class='compactenum'>
-1. </dt><dd class='compactenum'>The first item of an ordered list,
- </dd><dt class='compactenum'>
-2. </dt><dd class='compactenum'>the second item of an ordered list,
- </dd><dt class='compactenum'>
-3. </dt><dd class='compactenum'>the third item of an ordered list.</dd></dl>
-<!-- l. 68 --><p class='indent'> This is a task list:
- </p><ul>
- <li class='compactitem'> Some unfinished task
- </li>
- <li class='compactitem'> Some half-finished task
- </li>
- <li class='compactitem'> Some finished task
- </li>
- <li class='compactitem'>An item of an unordered list
- <dl class='compactenum'><dt class='compactenum'>
- 1. </dt><dd class='compactenum'><span class='msam-10'>□ </span>Some unfinished subtask
- </dd><dt class='compactenum'>
- 2. </dt><dd class='compactenum'><span class='msam-10'>⊡ </span>Some half-finished subtask
- </dd><dt class='compactenum'>
- 3. </dt><dd class='compactenum'><span class='msam-10'>⊠ </span>Some finished subtask
- </dd><dt class='compactenum'>
- 4. </dt><dd class='compactenum'>An item of an ordered list</dd></dl>
- </li></ul>
-
-<!-- l. 80 --><p class='indent'> This is a definition list:
- </p><dl class='description'><dt class='description'>
- <!-- l. 82 --><p class='noindent'>
-<span class='ec-lmbx-10'>Term 1</span> </p></dt><dd class='description'>
- <!-- l. 82 --><p class='noindent'>Definition 1 with some <span class='textst'>removed text</span>
- </p></dd><dt class='description'>
- <!-- l. 82 --><p class='noindent'>
-<span class='ec-lmbx-10'>Term 2</span> </p></dt><dd class='description'>
- <!-- l. 82 --><p class='noindent'>Definition 2
-</p>
- <pre class='fancyvrb' id='fancyvrb2'>
-<a id='x1-6014r1'></a><span class='ec-lmtt-10'>Some code, part of Definition 2</span>
-</pre>
- <!-- l. 84 --><p class='noindent'>Third paragraph of Definition 2.
- </p><!-- l. 84 --><p class='noindent'>Definition 3
-</p>
- </dd></dl>
-<!-- l. 86 --><p class='indent'> This is a compact definition list:
- </p><dl class='compactdesc'><dt class='compactdesc'>
-<span class='ec-lmbx-10'>Term 1</span> </dt><dd class='compactdesc'>Definition 1
- </dd><dt class='compactdesc'>
-<span class='ec-lmbx-10'>Term 2</span> </dt><dd class='compactdesc'>Definition 2
- <!-- l. 88 --><p class='noindent'>Definition 3
-</p>
- </dd></dl>
-<!-- l. 90 --><p class='indent'> This is a <sup class='textsuperscript'><span class='ec-lmr-9'>superscript</span></sup> and a <sub class='textsubscript'><span class='ec-lmr-9'>subscript</span></sub>.
-</p><!-- l. 91 --><p class='indent'> This is a block quote:
- </p><blockquote class='quotation'>
- <!-- l. 93 --><p class='indent'> This is the first level of quoting.
- </p><blockquote class='quotation'>
- <!-- l. 95 --><p class='indent'> This is nested blockquote.</p></blockquote>
- <!-- l. 97 --><p class='indent'> Back to the first level.</p></blockquote>
-
-<!-- l. 99 --><p class='indent'> Here is a note reference<span class='footnote-mark'><a href='#fn2x2' id='fn2x2-bk'><sup class='textsuperscript'>2</sup></a></span><a id='x1-6015f2'></a>
-and another.<span class='footnote-mark'><a href='#fn3x2' id='fn3x2-bk'><sup class='textsuperscript'>3</sup></a></span><a id='x1-6016f3'></a> Here
-is an inline note.<span class='footnote-mark'><a href='#fn4x2' id='fn4x2-bk'><sup class='textsuperscript'>4</sup></a></span><a id='x1-6019f4'></a>
-</p><!-- l. 103 --><p class='indent'> This is raw TeX code:
-</p><!-- l. 1 --><p class='indent'>
-</p>
- <div class='math-display'>
-<img alt='xn + yn = zn
-' class='math-display' src='latex-tex4ht0x.png' /></div>
-
-<!-- l. 2 --><p class='indent'>
-
-</p>
- <h2 class='chapterHead' id='this-is-an-h6'><span class='titlemark'>Chapter 2</span><br /><a id='x1-70002'></a>This is an H1</h2>
- <h3 class='sectionHead' id='this-is-an-h7'><span class='titlemark'>2.1 </span> <a id='x1-80002.1'></a>This is an H2</h3>
-<!-- l. 4 --><p class='noindent'>
-</p>
- <h4 class='subsectionHead' id='this-is-an-h8'><span class='titlemark'>2.1.1 </span> <a id='x1-90002.1.1'></a>This is an H3</h4>
-<!-- l. 5 --><p class='noindent'>
-</p>
- <h5 class='subsubsectionHead' id='this-is-an-h9'><a id='x1-10000'></a>This is an H4</h5>
-<!-- l. 6 --><p class='noindent'><span class='paragraphHead' id='this-is-an-h10'><a id='x1-11000'></a><span class='ec-lmbx-10'>This is an H5</span></span>
-</p>
-<!-- l. 7 --><p class='indent'> <span class='subparagraphHead' id='this-is-an-h11'> <a id='x1-12000'></a><span class='ec-lmbx-10'>This is an H6</span></span>
- This is a text paragraph containing an ellipsis … and followed by a thematic
-break.
-</p><!-- l. 9 --><p class='noindent'>__________________________________________________________________
-</p><!-- l. 10 --><p class='indent'> This is inline <span class='ec-lmtt-10'>code</span>. This is a link<span class='footnote-mark'><a href='#fn1x3' id='fn1x3-bk'><sup class='textsuperscript'>1</sup></a></span><a id='x1-12001f1'></a>.
-<span class='ec-lmri-10'>This is an </span>emphasized <span class='ec-lmri-10'>span of text</span>. <span class='ec-lmbx-10'>This is a </span>strongly emphasized <span class='ec-lmbx-10'>span of
-</span><span class='ec-lmbx-10'>text</span>.
-</p>
- <figure class='figure' id='-an-example-image-from-martin-scharrers-mwe-package1'>
-
-
-<a id='x1-120021'></a>
-
-<div class='center'>
-<!-- l. 11 --><p class='noindent'>
-</p><!-- l. 11 --><p class='noindent'><img alt='PIC' src='example-image.png' /></p></div>
-<figcaption class='caption'><span class='id'>Figure 2.1: </span><span class='content'>An example image from Martin Scharrer’s mwe package</span></figcaption><!-- tex4ht:label?: x1-120021 -->
-
- </figure>
- <div class='table'>
-
-<!-- l. 12 --><p class='indent' id='-the-great-minds-of-the-th-century-rendered-via-a-content-block1'> <a id='x1-120031'></a></p><figure class='float'>
-
-<div class='center'>
-<!-- l. 12 --><p class='noindent'>
-</p>
-<div class='tabular'> <table class='tabular' id='TBL-4'><colgroup id='TBL-4-1g'><col id='TBL-4-1' /></colgroup><colgroup id='TBL-4-2g'><col id='TBL-4-2' /></colgroup><colgroup id='TBL-4-3g'><col id='TBL-4-3' /></colgroup><tr class='hline'><td></td><td></td><td></td></tr><tr id='TBL-4-1-' style='vertical-align:baseline;'><td class='td11' id='TBL-4-1-1' style='white-space:nowrap; text-align:left;'>Name </td><td class='td11' id='TBL-4-1-2' style='white-space:nowrap; text-align:left;'>Surname</td><td class='td11' id='TBL-4-1-3' style='white-space:nowrap; text-align:left;'>Born</td></tr><tr class='hline'><td></td><td></td><td></td></tr><tr id='TBL-4-2-' style='vertical-align:baseline;'><td class='td11' id='TBL-4-2-1' style='white-space:nowrap; text-align:left;'>Albert </td><td class='td11' id='TBL-4-2-2' style='white-space:nowrap; text-align:left;'>Einstein </td><td class='td11' id='TBL-4-2-3' style='white-space:nowrap; text-align:left;'>1879</td>
-</tr><tr id='TBL-4-3-' style='vertical-align:baseline;'><td class='td11' id='TBL-4-3-1' style='white-space:nowrap; text-align:left;'>Marie </td><td class='td11' id='TBL-4-3-2' style='white-space:nowrap; text-align:left;'>Curie </td><td class='td11' id='TBL-4-3-3' style='white-space:nowrap; text-align:left;'>1867</td>
-</tr><tr id='TBL-4-4-' style='vertical-align:baseline;'><td class='td11' id='TBL-4-4-1' style='white-space:nowrap; text-align:left;'>Thomas</td><td class='td11' id='TBL-4-4-2' style='white-space:nowrap; text-align:left;'>Edison </td><td class='td11' id='TBL-4-4-3' style='white-space:nowrap; text-align:left;'>1847</td>
-</tr><tr class='hline'><td></td><td></td><td></td></tr></table> </div></div>
-<figcaption class='caption'><span class='id'>Table 2.1: </span><span class='content'>The great minds of the 19th century rendered via a content block</span></figcaption><!-- tex4ht:label?: x1-120031 -->
-
- </figure>
- </div>
-<!-- l. 13 --><p class='indent'> This is a fenced code block:
-</p>
- <pre class='fancyvrb' id='fancyvrb4'>
-<a id='x1-12005r1'></a><span class='ec-lmtt-10'>\documentclass{article}</span>
-
-<a id='x1-12007r2'></a><span class='ec-lmtt-10'>\begin{document}</span>
-
-<a id='x1-12009r3'></a><span class='ec-lmtt-10'>  Hello world!</span>
-
-<a id='x1-12011r4'></a><span class='ec-lmtt-10'>\end{document}</span>
- </pre>
-<!-- l. 15 --><p class='indent'> This is a table:
-</p>
- <div class='table'>
-
-<!-- l. 16 --><p class='indent' id='-demonstration-of-pipe-table-syntax1'> <a id='x1-120122'></a></p><figure class='float'>
-
-<div class='tabular'>
- <table class='tabular' id='TBL-5'><colgroup id='TBL-5-1g'><col id='TBL-5-1' /><col id='TBL-5-2' /><col id='TBL-5-3' /><col id='TBL-5-4' /></colgroup><tr id='TBL-5-1-' style='vertical-align:baseline;'><td class='td11' id='TBL-5-1-1' style='white-space:nowrap; text-align:right;'>Right</td><td class='td11' id='TBL-5-1-2' style='white-space:nowrap; text-align:left;'>Left</td><td class='td11' id='TBL-5-1-3' style='white-space:nowrap; text-align:left;'>Default</td><td class='td11' id='TBL-5-1-4' style='white-space:nowrap; text-align:center;'>Center</td>
-</tr><tr id='TBL-5-2-' style='vertical-align:baseline;'><td class='td11' id='TBL-5-2-1' style='white-space:nowrap; text-align:right;'> 12</td><td class='td11' id='TBL-5-2-2' style='white-space:nowrap; text-align:left;'>12 </td><td class='td11' id='TBL-5-2-3' style='white-space:nowrap; text-align:left;'>12 </td><td class='td11' id='TBL-5-2-4' style='white-space:nowrap; text-align:center;'> 12 </td>
-</tr><tr id='TBL-5-3-' style='vertical-align:baseline;'><td class='td11' id='TBL-5-3-1' style='white-space:nowrap; text-align:right;'> 123</td><td class='td11' id='TBL-5-3-2' style='white-space:nowrap; text-align:left;'>123 </td><td class='td11' id='TBL-5-3-3' style='white-space:nowrap; text-align:left;'>123 </td><td class='td11' id='TBL-5-3-4' style='white-space:nowrap; text-align:center;'> 123 </td>
-</tr><tr id='TBL-5-4-' style='vertical-align:baseline;'><td class='td11' id='TBL-5-4-1' style='white-space:nowrap; text-align:right;'> 1</td><td class='td11' id='TBL-5-4-2' style='white-space:nowrap; text-align:left;'>1 </td><td class='td11' id='TBL-5-4-3' style='white-space:nowrap; text-align:left;'>1 </td><td class='td11' id='TBL-5-4-4' style='white-space:nowrap; text-align:center;'> 1 </td>
-</tr></table> </div>
-<figcaption class='caption'><span class='id'>Table 2.2: </span><span class='content'>Demonstration of pipe table syntax.</span></figcaption><!-- tex4ht:label?: x1-120122 -->
-
- </figure>
- </div>
-<!-- l. 17 --><p class='indent'> This is a bullet list:
- </p><ul>
- <li class='compactitem'>The first item of a bullet list</li></ul>
-<!-- l. 21 --><p class='indent'> that spans several paragraphs,
-</p>
- <ul class='itemize1'>
- <li class='itemize'>the second item of a bullet list,
- </li>
- <li class='itemize'>the third item of a bullet list.</li></ul>
-<!-- l. 26 --><p class='indent'> This is a compact bullet list:
- </p><ul>
- <li class='compactitem'>The first item of a bullet list,
- </li>
- <li class='compactitem'>the second item of a bullet list,
- </li>
- <li class='compactitem'>the third item of a bullet list.</li></ul>
-<!-- l. 32 --><p class='indent'> This is an ordered list:
- </p><dl class='compactenum'><dt class='compactenum'>
-5. </dt><dd class='compactenum'>The first item of an ordered list</dd></dl>
-<!-- l. 35 --><p class='indent'> that spans several paragraphs,
- </p><dl class='enumerate'><dt class='enumerate'>
-6. </dt><dd class='enumerate'>the second item of an ordered list,
- </dd><dt class='enumerate'>
-7. </dt><dd class='enumerate'>the third item of an ordered list.</dd></dl>
-<!-- l. 39 --><p class='indent'> This is a fancy ordered list:
- </p><dl class='compactenum'><dt class='compactenum'>
-e) </dt><dd class='compactenum'>The first item of an ordered list</dd></dl>
-<!-- l. 42 --><p class='indent'> that spans several paragraphs,
- </p><dl class='enumerate'><dt class='enumerate'>
- f) </dt><dd class='enumerate'>the second item of an ordered list,
- </dd><dt class='enumerate'>
-g) </dt><dd class='enumerate'>the third item of an ordered list.</dd></dl>
-<!-- l. 46 --><p class='indent'> This is an ordered list using hash enumerators:
- </p><dl class='compactenum'><dt class='compactenum'>
-1. </dt><dd class='compactenum'>The first item of an ordered list</dd></dl>
-
-<!-- l. 49 --><p class='indent'> that spans several paragraphs,
- </p><dl class='enumerate'><dt class='enumerate'>
-1. </dt><dd class='enumerate'>the second item of an ordered list,
- </dd><dt class='enumerate'>
-2. </dt><dd class='enumerate'>the third item of an ordered list.</dd></dl>
-<!-- l. 53 --><p class='indent'> This is a compact ordered list:
- </p><dl class='compactenum'><dt class='compactenum'>
-5. </dt><dd class='compactenum'>The first item of an ordered list,
- </dd><dt class='compactenum'>
-6. </dt><dd class='compactenum'>the second item of an ordered list,
- </dd><dt class='compactenum'>
-7. </dt><dd class='compactenum'>the third item of an ordered list.</dd></dl>
-<!-- l. 58 --><p class='indent'> This is a compact ordered list using hash enumerators:
- </p><dl class='compactenum'><dt class='compactenum'>
-1. </dt><dd class='compactenum'>The first item of an ordered list,
- </dd><dt class='compactenum'>
-2. </dt><dd class='compactenum'>the second item of an ordered list,
- </dd><dt class='compactenum'>
-3. </dt><dd class='compactenum'>the third item of an ordered list.</dd></dl>
-<!-- l. 63 --><p class='indent'> This is a compact fancy ordered list using hash enumerators:
- </p><dl class='compactenum'><dt class='compactenum'>
-1. </dt><dd class='compactenum'>The first item of an ordered list,
- </dd><dt class='compactenum'>
-2. </dt><dd class='compactenum'>the second item of an ordered list,
- </dd><dt class='compactenum'>
-3. </dt><dd class='compactenum'>the third item of an ordered list.</dd></dl>
-<!-- l. 68 --><p class='indent'> This is a task list:
- </p><ul>
- <li class='compactitem'> Some unfinished task
- </li>
- <li class='compactitem'> Some half-finished task
- </li>
- <li class='compactitem'> Some finished task
- </li>
- <li class='compactitem'>An item of an unordered list
- <dl class='compactenum'><dt class='compactenum'>
- 1. </dt><dd class='compactenum'><span class='msam-10'>□ </span>Some unfinished subtask
- </dd><dt class='compactenum'>
- 2. </dt><dd class='compactenum'><span class='msam-10'>⊡ </span>Some half-finished subtask
- </dd><dt class='compactenum'>
- 3. </dt><dd class='compactenum'><span class='msam-10'>⊠ </span>Some finished subtask
- </dd><dt class='compactenum'>
- 4. </dt><dd class='compactenum'>An item of an ordered list</dd></dl>
- </li></ul>
-
-<!-- l. 80 --><p class='indent'> This is a definition list:
- </p><dl class='description'><dt class='description'>
- <!-- l. 82 --><p class='noindent'>
-<span class='ec-lmbx-10'>Term 1</span> </p></dt><dd class='description'>
- <!-- l. 82 --><p class='noindent'>Definition 1 with some <span class='textst'>removed text</span>
- </p></dd><dt class='description'>
- <!-- l. 82 --><p class='noindent'>
-<span class='ec-lmbx-10'>Term 2</span> </p></dt><dd class='description'>
- <!-- l. 82 --><p class='noindent'>Definition 2
-</p>
- <pre class='fancyvrb' id='fancyvrb5'>
-<a id='x1-12014r1'></a><span class='ec-lmtt-10'>Some code, part of Definition 2</span>
-</pre>
- <!-- l. 84 --><p class='noindent'>Third paragraph of Definition 2.
- </p><!-- l. 84 --><p class='noindent'>Definition 3
-</p>
- </dd></dl>
-<!-- l. 86 --><p class='indent'> This is a compact definition list:
- </p><dl class='compactdesc'><dt class='compactdesc'>
-<span class='ec-lmbx-10'>Term 1</span> </dt><dd class='compactdesc'>Definition 1
- </dd><dt class='compactdesc'>
-<span class='ec-lmbx-10'>Term 2</span> </dt><dd class='compactdesc'>Definition 2
- <!-- l. 88 --><p class='noindent'>Definition 3
-</p>
- </dd></dl>
-<!-- l. 90 --><p class='indent'> This is a <sup class='textsuperscript'><span class='ec-lmr-9'>superscript</span></sup> and a <sub class='textsubscript'><span class='ec-lmr-9'>subscript</span></sub>.
-</p><!-- l. 91 --><p class='indent'> This is a block quote:
- </p><blockquote class='quotation'>
- <!-- l. 93 --><p class='indent'> This is the first level of quoting.
- </p><blockquote class='quotation'>
- <!-- l. 95 --><p class='indent'> This is nested blockquote.</p></blockquote>
- <!-- l. 97 --><p class='indent'> Back to the first level.</p></blockquote>
-
-<!-- l. 99 --><p class='indent'> Here is a note reference<span class='footnote-mark'><a href='#fn2x3' id='fn2x3-bk'><sup class='textsuperscript'>2</sup></a></span><a id='x1-12015f2'></a>
-and another.<span class='footnote-mark'><a href='#fn3x3' id='fn3x3-bk'><sup class='textsuperscript'>3</sup></a></span><a id='x1-12016f3'></a> Here
-is an inline note.<span class='footnote-mark'><a href='#fn4x3' id='fn4x3-bk'><sup class='textsuperscript'>4</sup></a></span><a id='x1-12019f4'></a>
-</p><!-- l. 103 --><p class='indent'> This is raw TeX code:
-</p><!-- l. 1 --><p class='indent'>
-</p>
- <div class='math-display'>
-<img alt='xn + yn = zn
-' class='math-display' src='latex-tex4ht1x.png' /></div>
-<!-- l. 2 --><p class='indent'> Here are some non-ASCII characters: <span class='ec-lmri-10'>ěščřžýáíé</span>.
-</p><!-- l. 2 --><p class='indent'> Here is some <b>HTML code</b> mixed <span class='ec-lmri-10'>with Markdown</span>. In TeX, the HTML code will be
-silently ignored, whereas in TeX4ht, the HTML code will be passed through to the
-output:
-</p><table border='1'>
- <tr>
- <td>Emil</td>
- <td>Tobias</td>
- <td>Linus</td>
- </tr>
- <tr>
- <td>16</td>
- <td>14</td>
- <td>10</td>
- </tr>
-</table>
- <div class='footnotes'><!-- l. 10 --><p class='indent'> <span class='footnote-mark'><a href='#fn1x2-bk' id='fn1x2'><sup class='textsuperscript'>1</sup></a></span><span class='ec-lmr-8'>Google: </span><a class='url' href='http://google.cz'><span class='ec-lmtt-8'>http://google.cz</span></a></p>
-<!-- l. 99 --><p class='indent'> <span class='footnote-mark'><a href='#fn2x2-bk' id='fn2x2'><sup class='textsuperscript'>2</sup></a></span><span class='ec-lmr-8'>Here is the note.</span></p><!-- l. 102 --><p class='indent'> <span class='footnote-mark'><a href='#fn3x2-bk' id='fn3x2'><sup class='textsuperscript'>3</sup></a></span><span class='ec-lmr-8'>Here’s one with multiple blocks.</span>
-</p><!-- l. 102 --><p class='indent'> <span class='ec-lmr-8'>Subsequent paragraphs are indented to show that they belong to the previous note.</span>
-</p>
- <pre class='fancyvrb' id='fancyvrb3'>
-<a id='x1-6018r1'></a><span class='ec-lmtt-8'>Some code</span>
- </pre>
-<!-- l. 102 --><p class='indent'> <span class='ec-lmr-8'>The whole paragraph can be indented, or just the first line. In this way, multi-paragraph notes
-</span><span class='ec-lmr-8'>work like multi-paragraph list items.</span></p>
-<!-- l. 102 --><p class='indent'> <span class='footnote-mark'><a href='#fn4x2-bk' id='fn4x2'><sup class='textsuperscript'>4</sup></a></span><span class='ec-lmr-8'>Inlines notes are easier to write, since you don’t have to pick an identifier and move down to
-</span><span class='ec-lmr-8'>type the note.</span></p>
-<!-- l. 10 --><p class='indent'> <span class='footnote-mark'><a href='#fn1x3-bk' id='fn1x3'><sup class='textsuperscript'>1</sup></a></span><span class='ec-lmr-8'>Google: </span><a class='url' href='http://google.cz'><span class='ec-lmtt-8'>http://google.cz</span></a></p>
-<!-- l. 99 --><p class='indent'> <span class='footnote-mark'><a href='#fn2x3-bk' id='fn2x3'><sup class='textsuperscript'>2</sup></a></span><span class='ec-lmr-8'>Here is the note.</span></p><!-- l. 102 --><p class='indent'> <span class='footnote-mark'><a href='#fn3x3-bk' id='fn3x3'><sup class='textsuperscript'>3</sup></a></span><span class='ec-lmr-8'>Here’s one with multiple blocks.</span>
-</p><!-- l. 102 --><p class='indent'> <span class='ec-lmr-8'>Subsequent paragraphs are indented to show that they belong to the previous note.</span>
-</p>
- <pre class='fancyvrb' id='fancyvrb6'>
-<a id='x1-12018r1'></a><span class='ec-lmtt-8'>Some code</span>
- </pre>
-<!-- l. 102 --><p class='indent'> <span class='ec-lmr-8'>The whole paragraph can be indented, or just the first line. In this way, multi-paragraph notes
-</span><span class='ec-lmr-8'>work like multi-paragraph list items.</span></p>
-<!-- l. 102 --><p class='indent'> <span class='footnote-mark'><a href='#fn4x3-bk' id='fn4x3'><sup class='textsuperscript'>4</sup></a></span><span class='ec-lmr-8'>Inlines notes are easier to write, since you don’t have to pick an identifier and move down to
-</span><span class='ec-lmr-8'>type the note.</span></p> </div>
-
-</body>
-</html> \ No newline at end of file
diff --git a/macros/generic/markdown/examples/latex-xetex.pdf b/macros/generic/markdown/examples/latex-xetex.pdf
deleted file mode 100644
index cfbebde5e3..0000000000
--- a/macros/generic/markdown/examples/latex-xetex.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/generic/markdown/latexmkrc b/macros/generic/markdown/latexmkrc
deleted file mode 100644
index a9b6a23ef6..0000000000
--- a/macros/generic/markdown/latexmkrc
+++ /dev/null
@@ -1,5 +0,0 @@
-$pdflatex = 'lualatex --shell-escape %O %S';
-$makeindex = 'makeindex -s %R.ist %O -o %D %S';
-$pdf_mode = 1;
-$postscript_mode = 0;
-$dvi_mode = 0;
diff --git a/macros/generic/markdown/markdown.dtx b/macros/generic/markdown/markdown.dtx
index b165924476..5b3f73cb8e 100644
--- a/macros/generic/markdown/markdown.dtx
+++ b/macros/generic/markdown/markdown.dtx
@@ -1,6 +1,6 @@
% \iffalse
%<*driver>
-\documentclass[nohyperref]{ltxdockit}
+\documentclass{ltxdockit}
\usepackage[american]{babel}
\usepackage{amsmath,btxdockit,doc,fancyvrb,graphicx,hologo,microtype,minted}
@@ -1145,11 +1145,11 @@ local md5 = require("md5")
%
%: A library that provides access to the filesystem via \acro{os}-specific
% syscalls. It is used by the plain \TeX{} code to create the cache
-% directory specified by the \mref{markdownOptionCacheDir} macro before
-% interfacing with the \pkg{Lunamark} library. \pkg{Lua File System} is
-% included in all releases of Lua\TeX{} (\TeX Live${}\geq{}2008$).
+% directory specified by the \Opt{cacheDir} option before interfacing with
+% the \pkg{Lunamark} library. \pkg{Lua File System} is included in all
+% releases of Lua\TeX{} (\TeX Live${}\geq{}2008$).
%
-% The plain \TeX{} code makes use of the \luamref{isdir} method that was added
+% The plain \TeX{} code makes use of the `isdir` method that was added
% to the \pkg{Lua File System} library by the Lua\TeX{} engine
% developers~[@luatex21, Section 4.2.4].
%
@@ -1159,7 +1159,7 @@ local md5 = require("md5")
% Unless you convert markdown documents to \TeX{} manually using the Lua
% command-line interface (see Section <#sec:lua-cli-interface>), the plain
% \TeX{} part of the package will require that either the Lua\TeX{}
-% \mref{directlua} primitive or the shell access file stream 18 is available in
+% `\directlua` primitive or the shell access file stream 18 is available in
% your \TeX{} engine. If only the shell access file stream is available in your
% \TeX{} engine (as is the case with \hologo{pdfTeX} and \Hologo{XeTeX}) or if
% you enforce the use of shell using the \mref{markdownMode} macro, then unless
@@ -1202,18 +1202,17 @@ local md5 = require("md5")
%
% \pkg{url}
%
-%: A package that provides the \mref{url} macro for the typesetting of
-% links.
+%: A package that provides the `\url` macro for the typesetting of links.
%
% \pkg{graphicx}
%
-%: A package that provides the \mref{includegraphics} macro for the typesetting
+%: A package that provides the `\includegraphics` macro for the typesetting
% of images.
%
% \pkg{paralist}
%
-%: A package that provides the \envmref{compactitem}, \envmref{compactenum}, and
-% \envmref{compactdesc} macros for the typesetting of tight bulleted lists,
+%: A package that provides the `compactitem`, `compactenum`, and
+% `compactdesc` macros for the typesetting of tight bulleted lists,
% ordered lists, and definition lists.
%
% \pkg{ifthen}
@@ -1224,18 +1223,18 @@ local md5 = require("md5")
%
% \pkg{fancyvrb}
%
-%: A package that provides the \mref{VerbatimInput} macros for the verbatim
+%: A package that provides the `\VerbatimInput` macros for the verbatim
% inclusion of files containing code.
%
% \pkg{csvsimple}
%
-%: A package that provides the \mref{csvautotabular} macro for typesetting
+%: A package that provides the `\csvautotabular` macro for typesetting
% \acro{csv} files in the default renderer prototypes for iA\,Writer
% content blocks.
%
% \pkg{gobble}
%
-%: A package that provides the \mref{\@gobblethree} \TeX{} command that
+%: A package that provides the `\@gobblethree` \TeX{} command that
% is used in the default renderer prototype for citations. The package
% is included in \TeX Live${}\geq{}2016$.
%
@@ -1680,7 +1679,7 @@ local walkable_syntax = {
% \luamref{reader->insert_pattern} with `"Inline after Emph"` (or `"Inline
% before Link"`) and `pattern` as the arguments.
%
-% The \luamdef{reader->add_special_character} method adds a new character with
+% The \luamref{reader->add_special_character} method adds a new character with
% special meaning to the grammar of markdown. The method receives the character
% as its only argument.
%
@@ -2569,7 +2568,7 @@ defaultOptions.debugExtensionsFileName = "debug-extensions.json"
The frozen cache makes it possible to later typeset a plain \TeX{}
document that contains markdown documents without invoking Lua using
- the \mref{markdownOptionFrozenCache} plain \TeX{} option. As a result, the
+ the \Opt{frozenCache} plain \TeX{} option. As a result, the
plain \TeX{} document becomes more portable, but further changes in the
order and the content of markdown documents will not be reflected.
@@ -3048,7 +3047,7 @@ following content:
convert = markdown.new({fencedCode = true})
input = "A paragraph." .. newline ..
"```" .. newline ..
- "A code fence." .. newline ..
+ "A fenced code." .. newline ..
"```" .. newline
tex.sprint(convert(input))
@@ -3056,7 +3055,7 @@ following content:
fencedCode = true, blankBeforeCodeFence = true})
input = "A paragraph." .. newline ..
"```" .. newline ..
- "Not a code fence." .. newline ..
+ "Not a fenced code." .. newline ..
"```" .. newline
tex.sprint(convert(input)) }
\bye
@@ -3071,10 +3070,10 @@ following text:
> A paragraph.
>
> ```
-> A code fence.
+> A fenced code.
> ```
>
-> A paragraph. ``` Not a code fence. ```
+> A paragraph. ``` Not a fenced code. ```
##### Lua CLI Example {.unnumbered}
@@ -3129,7 +3128,7 @@ following content:
\markdownBegin
A paragraph.
```
-A code fence.
+A fenced code.
```
\markdownEnd
@@ -3137,7 +3136,7 @@ A code fence.
\markdownBegin
A paragraph.
```
-Not a code fence.
+Not a fenced code.
```
\markdownEnd
@@ -3153,10 +3152,10 @@ following text:
> A paragraph.
>
> ```
-> A code fence.
+> A fenced code.
> ```
>
-> A paragraph. ``` Not a code fence. ```
+> A paragraph. ``` Not a fenced code. ```
##### \LaTeX{} Example {.unnumbered}
@@ -3170,14 +3169,14 @@ following content:
\begin{markdown}
A paragraph.
```
-A code fence.
+A fenced code.
```
\end{markdown}
\begin{markdown*}{blankBeforeCodeFence}
A paragraph.
```
-Not a code fence.
+Not a fenced code.
```
\end{markdown*}
@@ -3193,10 +3192,10 @@ following text:
> A paragraph.
>
> ```
-> A code fence.
+> A fenced code.
> ```
>
-> A paragraph. ``` Not a code fence. ```
+> A paragraph. ``` Not a fenced code. ```
##### \Hologo{ConTeXt} Example {.unnumbered}
@@ -3210,7 +3209,7 @@ following content:
\startmarkdown
A paragraph.
```
-A code fence.
+A fenced code.
```
\stopmarkdown
@@ -3218,7 +3217,7 @@ A code fence.
\startmarkdown
A paragraph.
```
-Not a code fence.
+Not a fenced code.
```
\stopmarkdown
@@ -3234,10 +3233,10 @@ following text:
> A paragraph.
>
> ```
-> A code fence.
+> A fenced code.
> ```
>
-> A paragraph. ``` Not a code fence. ```
+> A paragraph. ``` Not a fenced code. ```
%</manual-options>
%<*tex>
@@ -3260,6 +3259,85 @@ defaultOptions.blankBeforeCodeFence = false
%</lua,lua-cli>
%<*manual-options>
+#### Option `blankBeforeDivFence`
+
+`blankBeforeDivFence` (default value: `false`)
+
+% \fi
+% \begin{markdown}
+%
+% \Optitem[false]{blankBeforeDivFence}{\opt{true}, \opt{false}}
+%
+: true
+
+ : Require a blank line before the closing fence of a fenced div.
+
+ false
+
+ : Do not require a blank line before the closing fence of a fenced div.
+
+% \end{markdown}
+% \iffalse
+
+##### \LaTeX{} Example {.unnumbered}
+
+Using a text editor, create a text document named `document.tex` with the
+following content:
+```` tex
+\documentclass{article}
+\usepackage[fencedDivs]{markdown}
+\begin{document}
+
+\begin{markdown}
+A paragraph.
+::: {.identifier}
+A fenced div.
+:::
+\end{markdown}
+
+\begin{markdown*}{blankBeforeDivFence}
+A paragraph.
+```
+Not a fenced div.
+```
+\end{markdown*}
+
+\end{document}
+````````
+Next, invoke LuaTeX from the terminal:
+``` sh
+lualatex document.tex
+``````
+A PDF document named `document.pdf` should be produced and contain the
+following text:
+
+> A paragraph.
+>
+> A fenced div.
+>
+> A paragraph. ::: {.identifier} Not a fenced div. :::
+
+%</manual-options>
+%<*tex>
+% \fi
+% \begin{macrocode}
+\@@_add_lua_option:nnn
+ { blankBeforeDivFence }
+ { boolean }
+ { false }
+% \end{macrocode}
+% \iffalse
+%</tex>
+%<*lua,lua-cli>
+% \fi
+% \begin{macrocode}
+defaultOptions.blankBeforeDivFence = false
+% \end{macrocode}
+% \par
+% \iffalse
+%</lua,lua-cli>
+%<*manual-options>
+
#### Option `blankBeforeHeading`
`blankBeforeHeading` (default value: `false`)
@@ -3492,6 +3570,100 @@ defaultOptions.blankBeforeHeading = false
%</lua,lua-cli>
%<*manual-options>
+#### Option `bracketedSpans`
+
+`bracketedSpans` (default value: `false`)
+
+% \fi
+% \begin{markdown}
+%
+% \Optitem[false]{bracketedSpans}{\opt{true}, \opt{false}}
+%
+: true
+
+ : Enable the Pandoc bracketed spans extension:
+
+ ``` md
+ [This is *some text*]{.class key="val"}
+ ``````
+
+: false
+
+ : Disable the Pandoc bracketed spans extension:
+
+% \end{markdown}
+% \iffalse
+
+##### \LaTeX{} Example {.unnumbered}
+
+Using a text editor, create a text document named `document.tex` with the
+following content:
+```` tex
+\documentclass{article}
+\usepackage[bracketedSpans]{markdown}
+\usepackage{expl3}
+\ExplSyntaxOn
+\markdownSetup{
+ renderers = {
+ bracketedSpanAttributeContextBegin = {
+ \group_begin:
+ \color_group_begin:
+ \markdownSetup{
+ renderers = {
+ attributeKeyValue = {
+ \str_if_eq:nnT
+ { #1 }
+ { color }
+ {
+ \color_select:n { #2 }
+ }
+ },
+ },
+ }
+ },
+ bracketedSpanAttributeContextEnd = {
+ \color_group_end:
+ \group_end:
+ },
+ },
+}
+\ExplSyntaxOff
+\begin{document}
+\begin{markdown}
+Here is some [colored text]{color=red}.
+\end{markdown}
+\end{document}
+```````
+Next, invoke LuaTeX from the terminal:
+``` sh
+lualatex --shell-escape document.tex
+``````
+A PDF document named `document.pdf` should be produced and contain the
+following text:
+
+> Here is some [colored text]{color=red}.
+
+%</manual-options>
+%<*tex>
+% \fi
+% \begin{macrocode}
+\@@_add_lua_option:nnn
+ { bracketedSpans }
+ { boolean }
+ { false }
+% \end{macrocode}
+% \iffalse
+%</tex>
+%<*lua,lua-cli>
+% \fi
+% \begin{macrocode}
+defaultOptions.bracketedSpans = false
+% \end{macrocode}
+% \par
+% \iffalse
+%</lua,lua-cli>
+%<*manual-options>
+
#### Option `breakableBlockquotes`
`breakableBlockquotes` (default value: `false`)
@@ -4694,6 +4866,130 @@ defaultOptions.eagerCache = true
%</lua,lua-cli>
%<*manual-options>
+#### Option `expectJekyllData`
+
+`expectJekyllData` (default value: `false`)
+
+% \fi
+% \markdownBegin
+%
+% \Optitem[false]{expectJekyllData}{\opt{true}, \opt{false}}
+%
+: false
+
+ : When the \Opt{jekyllData} option is enabled, then a markdown document
+ may begin with \acro{yaml} metadata if and only if the metadata begin
+ with the end-of-directives marker (`---`) and they end with either the
+ end-of-directives or the end-of-document marker (`...`):
+
+ ~~~~~ latex
+ \documentclass{article}
+ \usepackage[jekyllData]{markdown}
+ \begin{document}
+ \begin{markdown}
+ ---
+ - this
+ - is
+ - YAML
+ ...
+ - followed
+ - by
+ - Markdown
+ \end{markdown}
+ \begin{markdown}
+ - this
+ - is
+ - Markdown
+ \end{markdown}
+ \end{document}
+ ~~~~~~~~~~~
+
+: true
+
+ : When the \Opt{jekyllData} option is enabled, then a markdown document may
+ begin directly with \acro{yaml} metadata and may contain nothing but
+ \acro{yaml} metadata.
+
+ ~~~~~ latex
+ \documentclass{article}
+ \usepackage[jekyllData, expectJekyllData]{markdown}
+ \begin{document}
+ \begin{markdown}
+ - this
+ - is
+ - YAML
+ ...
+ - followed
+ - by
+ - Markdown
+ \end{markdown}
+ \begin{markdown}
+ - this
+ - is
+ - YAML
+ \end{markdown}
+ \end{document}
+ ~~~~~~~~~~~
+
+% \markdownEnd
+% \iffalse
+
+##### \LaTeX{} Example {.unnumbered}
+
+Using a text editor, create a text document named `jane-doe.yml` with the
+following content:
+``` yaml
+name: Jane Doe
+age: 99
+```
+Using a text editor, create also a text document named `document.tex` with the
+following content:
+``` tex
+\documentclass{article}
+\usepackage[jekyllData]{markdown}
+\markdownSetup{
+ jekyllDataRenderers = {
+ name = {\gdef\name{#1}},
+ code = {\gdef\age{#1}},
+ },
+ renderers = {
+ jekyllDataEnd = {\name{} is \age{} years old.},
+ }
+}
+\begin{document}
+\markdownInput[expectJekyllData]{jane-doe.yml}
+\end{document}
+```````
+Next, invoke LuaTeX from the terminal:
+``` sh
+lualatex document.tex
+``````
+A PDF document named `document.pdf` should be produced and contain the
+following text:
+
+> Jane Doe is 99 years old.
+
+%</manual-options>
+%<*tex>
+% \fi
+% \begin{macrocode}
+\@@_add_lua_option:nnn
+ { expectJekyllData }
+ { boolean }
+ { false }
+% \end{macrocode}
+% \iffalse
+%</tex>
+%<*lua,lua-cli>
+% \fi
+% \begin{macrocode}
+defaultOptions.expectJekyllData = false
+% \end{macrocode}
+% \par
+% \iffalse
+%</lua,lua-cli>
+%<*manual-options>
+
#### Option `extensions`
`extensions` (default value: `{}`)
@@ -4845,130 +5141,6 @@ defaultOptions.extensions = {}
%</lua,lua-cli>
%<*manual-options>
-#### Option `expectJekyllData`
-
-`expectJekyllData` (default value: `false`)
-
-% \fi
-% \markdownBegin
-%
-% \Optitem[false]{expectJekyllData}{\opt{true}, \opt{false}}
-%
-: false
-
- : When the \Opt{jekyllData} option is enabled, then a markdown document
- may begin with \acro{yaml} metadata if and only if the metadata begin
- with the end-of-directives marker (`---`) and they end with either the
- end-of-directives or the end-of-document marker (`...`):
-
- ~~~~~ latex
- \documentclass{article}
- \usepackage[jekyllData]{markdown}
- \begin{document}
- \begin{markdown}
- ---
- - this
- - is
- - YAML
- ...
- - followed
- - by
- - Markdown
- \end{markdown}
- \begin{markdown}
- - this
- - is
- - Markdown
- \end{markdown}
- \end{document}
- ~~~~~~~~~~~
-
-: true
-
- : When the \Opt{jekyllData} option is enabled, then a markdown document may
- begin directly with \acro{yaml} metadata and may contain nothing but
- \acro{yaml} metadata.
-
- ~~~~~ latex
- \documentclass{article}
- \usepackage[jekyllData, expectJekyllData]{markdown}
- \begin{document}
- \begin{markdown}
- - this
- - is
- - YAML
- ...
- - followed
- - by
- - Markdown
- \end{markdown}
- \begin{markdown}
- - this
- - is
- - YAML
- \end{markdown}
- \end{document}
- ~~~~~~~~~~~
-
-% \markdownEnd
-% \iffalse
-
-##### \LaTeX{} Example {.unnumbered}
-
-Using a text editor, create a text document named `jane-doe.yml` with the
-following content:
-``` yaml
-name: Jane Doe
-age: 99
-```
-Using a text editor, create also a text document named `document.tex` with the
-following content:
-``` tex
-\documentclass{article}
-\usepackage[jekyllData]{markdown}
-\markdownSetup{
- jekyllDataRenderers = {
- name = {\gdef\name{#1}},
- code = {\gdef\age{#1}},
- },
- renderers = {
- jekyllDataEnd = {\name{} is \age{} years old.},
- }
-}
-\begin{document}
-\markdownInput[expectJekyllData]{jane-doe.yml}
-\end{document}
-```````
-Next, invoke LuaTeX from the terminal:
-``` sh
-lualatex document.tex
-``````
-A PDF document named `document.pdf` should be produced and contain the
-following text:
-
-> Jane Doe is 99 years old.
-
-%</manual-options>
-%<*tex>
-% \fi
-% \begin{macrocode}
-\@@_add_lua_option:nnn
- { expectJekyllData }
- { boolean }
- { false }
-% \end{macrocode}
-% \iffalse
-%</tex>
-%<*lua,lua-cli>
-% \fi
-% \begin{macrocode}
-defaultOptions.expectJekyllData = false
-% \end{macrocode}
-% \par
-% \iffalse
-%</lua,lua-cli>
-%<*manual-options>
-
#### Option `fancyLists`
`fancyLists` (default value: `false`)
@@ -5237,6 +5409,83 @@ defaultOptions.fencedCode = false
%</lua,lua-cli>
%<*manual-options>
+#### Option `fencedDivs`
+
+`fencedDivs` (default value: `false`)
+
+% \fi
+% \begin{markdown}
+%
+% \Optitem[false]{fencedDivs}{\opt{true}, \opt{false}}
+%
+: true
+
+ : Enable the Pandoc fenced divs extension:
+
+ ``` md
+ ::::: {#special .sidebar}
+ Here is a paragraph.
+
+ And another.
+ :::::
+ ``````
+
+: false
+
+ : Disable the Pandoc fenced divs extension:
+
+% \end{markdown}
+% \iffalse
+
+##### \LaTeX{} Example {.unnumbered}
+
+Using a text editor, create a text document named `document.tex` with the
+following content:
+```` tex
+\documentclass{article}
+\usepackage[fencedDivs]{markdown}
+\begin{document}
+\begin{markdown}{slice=special}
+Here is a regular paragraph.
+
+::::: {#special}
+Here is a special paragraph.
+:::::
+
+And here is another regular paragraph.
+\end{markdown}
+\end{document}
+```````
+Next, invoke LuaTeX from the terminal:
+``` sh
+lualatex --shell-escape document.tex
+``````
+A PDF document named `document.pdf` should be produced and contain the
+following text:
+
+> Here is a special paragraph.
+
+%</manual-options>
+%<*tex>
+% \fi
+% \begin{macrocode}
+\@@_add_lua_option:nnn
+ { fencedDivs }
+ { boolean }
+ { false }
+% \end{macrocode}
+% \iffalse
+%</tex>
+%<*lua,lua-cli>
+% \fi
+% \begin{macrocode}
+defaultOptions.fencedDivs = false
+% \end{macrocode}
+% \par
+% \iffalse
+%</lua,lua-cli>
+%<*manual-options>
+
#### Option `finalizeCache`
`finalizeCache` (default value: `false`)
@@ -5252,7 +5501,7 @@ defaultOptions.fencedCode = false
The frozen cache makes it possible to later typeset a plain \TeX{}
document that contains markdown documents without invoking Lua using
- the \mref{markdownOptionFrozenCache} plain \TeX{} option. As a result, the
+ the \Opt{frozenCache} plain \TeX{} option. As a result, the
plain \TeX{} document becomes more portable, but further changes in the
order and the content of markdown documents will not be reflected.
@@ -5401,186 +5650,6 @@ defaultOptions.finalizeCache = false
%</lua,lua-cli>
%<*manual-options>
-#### Option `notes`
-
-`notes` (default value: `false`)
-
-% \fi
-% \begin{markdown}
-%
-% \Optitem[false]{notes}{\opt{true}, \opt{false}}
-%
-: true
-
- : Enable the Pandoc note syntax extension:
-
- ``` md
- Here is a note reference,[^1] and another.[^longnote]
-
- [^1]: Here is the note.
-
- [^longnote]: Here's one with multiple blocks.
-
- Subsequent paragraphs are indented to show that they
- belong to the previous note.
-
- { some.code }
-
- The whole paragraph can be indented, or just the
- first line. In this way, multi-paragraph notes
- work like multi-paragraph list items.
-
- This paragraph won't be part of the note, because it
- isn't indented.
- ``````
-
-: false
-
- : Disable the Pandoc note syntax extension.
-
-% \end{markdown}
-% \iffalse
-
-##### \LaTeX{} Example {.unnumbered}
-
-Using a text editor, create a text document named `document.tex` with the
-following content:
-``` tex
-\documentclass{article}
-\usepackage[notes]{markdown}
-\begin{document}
-\begin{markdown}
-Here is a note reference,[^1] and another.[^longnote]
-
-[^1]: Here is the note.
-
-[^longnote]: Here's one with multiple blocks.
-
- Subsequent paragraphs are indented to show that they
-belong to the previous note.
-
- { some.code }
-
- The whole paragraph can be indented, or just the
- first line. In this way, multi-paragraph notes
- work like multi-paragraph list items.
-
-This paragraph won't be part of the note, because it
-isn't indented.
-\end{markdown}
-\end{document}
-```````
-Next, invoke LuaTeX from the terminal:
-``` sh
-lualatex document.tex
-``````
-A PDF document named `document.pdf` should be produced and contain the
-following text:
-
-> Here is a note reference,[^1] and another.[^longnote]
->
-> [^1]: Here is the note.
->
-> [^longnote]: Here's one with multiple blocks.
->
-> Subsequent paragraphs are indented to show that they
-> belong to the previous note.
->
-> { some.code }
->
-> The whole paragraph can be indented, or just the
-> first line. In this way, multi-paragraph notes
-> work like multi-paragraph list items.
->
-> This paragraph won't be part of the note, because it
-> isn't indented.
-
-##### \Hologo{ConTeXt} Example {.unnumbered}
-
-Using a text editor, create a text document named `document.tex` with the
-following content:
-``` tex
-\usemodule[t][markdown]
-\setupmarkdown[notes = yes]
-\starttext
-\startmarkdown
-Here is a note reference,[^1] and another.[^longnote]
-
-[^1]: Here is the note.
-
-[^longnote]: Here's one with multiple blocks.
-
- Subsequent paragraphs are indented to show that they
-belong to the previous note.
-
- { some.code }
-
- The whole paragraph can be indented, or just the
- first line. In this way, multi-paragraph notes
- work like multi-paragraph list items.
-
-This paragraph won't be part of the note, because it
-isn't indented.
-\stopmarkdown
-\stoptext
-````````
-Next, invoke LuaTeX from the terminal:
-``` sh
-context document.tex
-`````
-A PDF document named `document.pdf` should be produced and contain the
-following text:
-
-> Here is a note reference,[^1] and another.[^longnote]
->
-> [^1]: Here is the note.
->
-> [^longnote]: Here's one with multiple blocks.
->
-> Subsequent paragraphs are indented to show that they
-> belong to the previous note.
->
-> { some.code }
->
-> The whole paragraph can be indented, or just the
-> first line. In this way, multi-paragraph notes
-> work like multi-paragraph list items.
->
-> This paragraph won't be part of the note, because it
-> isn't indented.
-
-%</manual-options>
-%<*tex>
-% \fi
-% \begin{markdown}
-%
-% The footnotes option has been deprecated and will be removed in
-% Markdown 3.0.0.
-%
-% \end{markdown}
-% \begin{macrocode}
-\@@_add_lua_option:nnn
- { footnotes }
- { boolean }
- { false }
-\@@_add_lua_option:nnn
- { notes }
- { boolean }
- { false }
-% \end{macrocode}
-% \iffalse
-%</tex>
-%<*lua,lua-cli>
-% \fi
-% \begin{macrocode}
-defaultOptions.footnotes = false
-defaultOptions.notes = false
-% \end{macrocode}
-% \par
-% \iffalse
-%</lua,lua-cli>
-%<*manual-options>
-
#### Option `frozenCacheCounter`
`frozenCacheCounter` (default value: `0`)
@@ -5883,12 +5952,6 @@ defaultOptions.hashEnumerators = false
===================
``````
- These HTML attributes have currently no effect other than enabling
-% content slicing, see the \Opt{slice} option.
-% \iffalse
- [content slicing](#slice).
-% \fi
-
: false
: Disable the assignment of HTML attributes to headings.
@@ -6663,6 +6726,186 @@ defaultOptions.jekyllData = false
%</lua,lua-cli>
%<*manual-options>
+#### Option `notes`
+
+`notes` (default value: `false`)
+
+% \fi
+% \begin{markdown}
+%
+% \Optitem[false]{notes}{\opt{true}, \opt{false}}
+%
+: true
+
+ : Enable the Pandoc note syntax extension:
+
+ ``` md
+ Here is a note reference,[^1] and another.[^longnote]
+
+ [^1]: Here is the note.
+
+ [^longnote]: Here's one with multiple blocks.
+
+ Subsequent paragraphs are indented to show that they
+ belong to the previous note.
+
+ { some.code }
+
+ The whole paragraph can be indented, or just the
+ first line. In this way, multi-paragraph notes
+ work like multi-paragraph list items.
+
+ This paragraph won't be part of the note, because it
+ isn't indented.
+ ``````
+
+: false
+
+ : Disable the Pandoc note syntax extension.
+
+% \end{markdown}
+% \iffalse
+
+##### \LaTeX{} Example {.unnumbered}
+
+Using a text editor, create a text document named `document.tex` with the
+following content:
+``` tex
+\documentclass{article}
+\usepackage[notes]{markdown}
+\begin{document}
+\begin{markdown}
+Here is a note reference,[^1] and another.[^longnote]
+
+[^1]: Here is the note.
+
+[^longnote]: Here's one with multiple blocks.
+
+ Subsequent paragraphs are indented to show that they
+belong to the previous note.
+
+ { some.code }
+
+ The whole paragraph can be indented, or just the
+ first line. In this way, multi-paragraph notes
+ work like multi-paragraph list items.
+
+This paragraph won't be part of the note, because it
+isn't indented.
+\end{markdown}
+\end{document}
+```````
+Next, invoke LuaTeX from the terminal:
+``` sh
+lualatex document.tex
+``````
+A PDF document named `document.pdf` should be produced and contain the
+following text:
+
+> Here is a note reference,[^1] and another.[^longnote]
+>
+> [^1]: Here is the note.
+>
+> [^longnote]: Here's one with multiple blocks.
+>
+> Subsequent paragraphs are indented to show that they
+> belong to the previous note.
+>
+> { some.code }
+>
+> The whole paragraph can be indented, or just the
+> first line. In this way, multi-paragraph notes
+> work like multi-paragraph list items.
+>
+> This paragraph won't be part of the note, because it
+> isn't indented.
+
+##### \Hologo{ConTeXt} Example {.unnumbered}
+
+Using a text editor, create a text document named `document.tex` with the
+following content:
+``` tex
+\usemodule[t][markdown]
+\setupmarkdown[notes = yes]
+\starttext
+\startmarkdown
+Here is a note reference,[^1] and another.[^longnote]
+
+[^1]: Here is the note.
+
+[^longnote]: Here's one with multiple blocks.
+
+ Subsequent paragraphs are indented to show that they
+belong to the previous note.
+
+ { some.code }
+
+ The whole paragraph can be indented, or just the
+ first line. In this way, multi-paragraph notes
+ work like multi-paragraph list items.
+
+This paragraph won't be part of the note, because it
+isn't indented.
+\stopmarkdown
+\stoptext
+````````
+Next, invoke LuaTeX from the terminal:
+``` sh
+context document.tex
+`````
+A PDF document named `document.pdf` should be produced and contain the
+following text:
+
+> Here is a note reference,[^1] and another.[^longnote]
+>
+> [^1]: Here is the note.
+>
+> [^longnote]: Here's one with multiple blocks.
+>
+> Subsequent paragraphs are indented to show that they
+> belong to the previous note.
+>
+> { some.code }
+>
+> The whole paragraph can be indented, or just the
+> first line. In this way, multi-paragraph notes
+> work like multi-paragraph list items.
+>
+> This paragraph won't be part of the note, because it
+> isn't indented.
+
+%</manual-options>
+%<*tex>
+% \fi
+% \begin{markdown}
+%
+% The footnotes option has been deprecated and will be removed in
+% Markdown 3.0.0.
+%
+% \end{markdown}
+% \begin{macrocode}
+\@@_add_lua_option:nnn
+ { footnotes }
+ { boolean }
+ { false }
+\@@_add_lua_option:nnn
+ { notes }
+ { boolean }
+ { false }
+% \end{macrocode}
+% \iffalse
+%</tex>
+%<*lua,lua-cli>
+% \fi
+% \begin{macrocode}
+defaultOptions.footnotes = false
+defaultOptions.notes = false
+% \end{macrocode}
+% \par
+% \iffalse
+%</lua,lua-cli>
+%<*manual-options>
+
#### Option `pipeTables` {#pipe-tables}
`pipeTables` (default value: `false`)
@@ -7132,7 +7375,7 @@ defaultOptions.shiftHeadings = 0
%</lua,lua-cli>
%<*manual-options>
-#### Option `slice` {#slice}
+#### Option `slice`
`slice` (default value: `^ $`)
@@ -9042,7 +9285,7 @@ pdftex --shell-escape document.tex
% \input markdown
% ```````
% \noindent It is expected that the special plain \TeX{} characters have the
-% expected category codes, when \mref{input}ting the file.
+% expected category codes, when `\input`ting the file.
%
%### Typesetting Markdown {#textypesetting}
%
@@ -9208,7 +9451,7 @@ following code in your plain \TeX{} document:
%#### Finalizing and Freezing the Cache
% The \mdef{markdownOptionFinalizeCache} option corresponds to the Lua
% interface \Opt{finalizeCache} option, which creates an output file
-% \mref{markdownOptionFrozenCacheFileName} (frozen cache) that contains a mapping
+% \Opt{frozenCacheFileName} (frozen cache) that contains a mapping
% between an enumeration of the markdown documents in the plain \TeX{} document
% and their auxiliary files cached in the \Opt{cacheDir} directory.
%
@@ -9221,7 +9464,7 @@ following code in your plain \TeX{} document:
% \fi
%
The \mdef{markdownOptionFrozenCache} option uses the mapping previously
-% created by the \mref{markdownOptionFinalizeCache} option,
+% created by the \Opt{finalizeCache} option,
% \iffalse
created by the Lua interface \Opt{finalizeCache} option,
% \fi
@@ -9255,12 +9498,12 @@ options is as follows:
1. Remove the \Opt{cacheDir} cache directory with stale auxiliary cache
files.
-% 2. Enable the \mref{markdownOptionFinalizeCache} option.
+% 2. Enable the \Opt{finalizeCache} option.
% \iffalse
2. Enable the \Opt{finalizeCache} option.
% \fi
3. Typeset the plain \TeX{} document to populate and finalize the cache.
-4. Enable the \mref{markdownOptionFrozenCache} option.
+4. Enable the \Opt{frozenCache} option.
5. Publish the source code of the plain \TeX{} document and the
\Opt{cacheDir} directory.
@@ -9279,13 +9522,13 @@ For more information, see the examples for the \Opt{finalizeCache} option.
%
% The \mdef{markdownOptionHelperScriptFileName} macro sets the filename of the
% helper Lua script file that is created during the conversion from markdown to
-% plain \TeX{} in \TeX{} engines without the \mref{directlua} primitive. It
-% defaults to \mref{jobname}`.markdown.lua`, where \mref{jobname} is the base name
+% plain \TeX{} in \TeX{} engines without the `\directlua` primitive. It
+% defaults to `\jobname.markdown.lua`, where `\jobname` is the base name
% of the document being typeset.
%
% The expansion of this macro must not contain quotation marks (`"`) or
% backslash symbols (`\`). Mind that \TeX{} engines tend to
-% put quotation marks around \mref{jobname}, when it contains spaces.
+% put quotation marks around `\jobname`, when it contains spaces.
%
% \end{markdown}
% \begin{macrocode}
@@ -9297,10 +9540,10 @@ For more information, see the examples for the \Opt{finalizeCache} option.
% \par
% \begin{markdown}
%
-% The \mref{markdownOptionHelperScriptFileName} macro has been deprecated and
+% The \Opt{helperScriptFileName} macro has been deprecated and
% will be removed in Markdown 3.0.0. To control the filename of the helper Lua
-% script file, use the \mref{g_luabridge_helper_script_filename_str} macro
-% from the \pkg{lt3luabridge} package.
+% script file, use the `\g_luabridge_helper_script_filename_str` macro from the
+% \pkg{lt3luabridge} package.
%
% \end{markdown}
% \begin{macrocode}
@@ -9314,8 +9557,8 @@ For more information, see the examples for the \Opt{finalizeCache} option.
%
% The \mdef{markdownOptionInputTempFileName} macro sets the filename of the
% temporary input file that is created during the buffering of markdown text
-% from a \TeX{} source. It defaults to \mref{jobname}`.markdown.in`. The same
-% limitations as in the case of the \mref{markdownOptionHelperScriptFileName}
+% from a \TeX{} source. It defaults to `\jobname.markdown.in`. The same
+% limitations as in the case of the \Opt{helperScriptFileName}
% macro apply here.
%
% \end{markdown}
@@ -9331,8 +9574,8 @@ For more information, see the examples for the \Opt{finalizeCache} option.
% The \mdef{markdownOptionOutputTempFileName} macro sets the filename of the
% temporary output file that is created during the conversion from markdown to
% plain \TeX{} in \mref{markdownMode} other than `2` It defaults to
-% \mref{jobname}`.markdown.out`. The same limitations apply here as in the case
-% of the \mref{markdownOptionHelperScriptFileName} macro.
+% `\jobname.markdown.out`. The same limitations apply here as in the case
+% of the \Opt{helperScriptFileName} macro.
%
% \end{markdown}
% \begin{macrocode}
@@ -9344,7 +9587,7 @@ For more information, see the examples for the \Opt{finalizeCache} option.
% \par
% \begin{markdown}
%
-% The \mref{markdownOptionOutputTempFileName} macro has been deprecated and
+% The \Opt{outputTempFileName} macro has been deprecated and
% will be removed in Markdown 3.0.0.
%
% \end{markdown}
@@ -9360,8 +9603,8 @@ For more information, see the examples for the \Opt{finalizeCache} option.
% The \mdef{markdownOptionErrorTempFileName} macro sets the filename of the
% temporary output file that is created when a Lua error is encountered during
% the conversion from markdown to plain \TeX{} in \mref{markdownMode} other than
-% `2`. It defaults to \mref{jobname}`.markdown.err`. The same limitations
-% apply here as in the case of the \mref{markdownOptionHelperScriptFileName}
+% `2`. It defaults to `\jobname.markdown.err`. The same limitations
+% apply here as in the case of the \Opt{helperScriptFileName}
% macro.
%
% \end{markdown}
@@ -9374,10 +9617,10 @@ For more information, see the examples for the \Opt{finalizeCache} option.
% \par
% \begin{markdown}
%
-% The \mref{markdownOptionErrorTempFileName} macro has been deprecated and
+% The \Opt{errorTempFileName} macro has been deprecated and
% will be removed in Markdown 3.0.0. To control the filename of the temporary
-% file for Lua errors, use the \mref{g_luabridge_error_output_filename_str}
-% macro from the \pkg{lt3luabridge} package.
+% file for Lua errors, use the `\g_luabridge_error_output_filename_str` macro
+% from the \pkg{lt3luabridge} package.
%
% \end{markdown}
% \begin{macrocode}
@@ -9398,7 +9641,7 @@ For more information, see the examples for the \Opt{finalizeCache} option.
% your \TeX{} engine for the package to function correctly. We need this macro
% to make the Lua implementation aware where it should store the helper files.
% The same limitations apply here as in the case of the
-% \mref{markdownOptionHelperScriptFileName} macro.
+% \Opt{helperScriptFileName} macro.
%
% \end{markdown}
% \begin{macrocode}
@@ -9419,7 +9662,7 @@ For more information, see the examples for the \Opt{finalizeCache} option.
%
% For the macros that correspond to the non-boolean options recognized by the
% Lua interface, the same limitations apply here in the case of the
-% \mref{markdownOptionHelperScriptFileName} macro.
+% \Opt{helperScriptFileName} macro.
%
% \end{markdown}
% \begin{macrocode}
@@ -9690,119 +9933,6 @@ In this section, I will describe the individual token renderers.
\prop_new:N \g_@@_renderer_arities_prop
\ExplSyntaxOff
% \end{macrocode}
-% \iffalse
-%</tex>
-%<*manual-tokens>
-% \fi
-% \begin{markdown}
-
-#### Tickbox Renderers
-The macros named \mdef{markdownRendererTickedBox},
-\mdef{markdownRendererHalfTickedBox}, and \mdef{markdownRendererUntickedBox}
-represent ticked and unticked boxes, respectively. These macros will either be
-produced, when the \Opt{taskLists} option is enabled, or when the Ballot Box
-with X (☒, U+2612), Hourglass (⌛, U+231B) or Ballot Box (☐, U+2610) Unicode
-characters are encountered in the markdown input, respectively.
-
-% \end{markdown}
-%
-% \iffalse
-
-##### \LaTeX{} Example {.unnumbered}
-
-Using a text editor, create a text document named `document.tex` with the
-following content:
-``` tex
-\documentclass{article}
-\usepackage[taskLists]{markdown}
-\markdownSetup{
- renderers = {
- untickedBox = No,
- tickedBox = Yes,
- },
-}
-\begin{document}
-\begin{markdown}
-- [ ] you can't.
-- [x] I can!
-\end{markdown}
-\end{document}
-```````
-Next, invoke LuaTeX from the terminal:
-``` sh
-lualatex document.tex
-``````
-A PDF document named `document.pdf` should be produced and contain the
-following text:
-
-> - No you can't.
-> - Yes I can!
-
-##### \Hologo{ConTeXt} Example {.unnumbered}
-
-Using a text editor, create a text document named `document.tex` with the
-following content:
-``` tex
-\usemodule[t][markdown]
-\setupmarkdown[taskLists = yes]
-\def\markdownRendererUntickedBox{No}
-\def\markdownRendererTickedBox{Yes}
-\starttext
-\startmarkdown
-- [ ] you can't.
-- [x] I can!
-\stopmarkdown
-\stoptext
-````````
-Next, invoke LuaTeX from the terminal:
-``` sh
-context document.tex
-`````
-A PDF document named `document.pdf` should be produced and contain the
-following text:
-
-> - No you can't.
-> - Yes I can!
-
-%</manual-tokens>
-%<*tex>
-% \fi
-%
-% \begin{macrocode}
-\def\markdownRendererTickedBox{%
- \markdownRendererTickedBoxPrototype}%
-\ExplSyntaxOn
-\seq_gput_right:Nn
- \g_@@_renderers_seq
- { tickedBox }
-\prop_gput:Nnn
- \g_@@_renderer_arities_prop
- { tickedBox }
- { 0 }
-\ExplSyntaxOff
-\def\markdownRendererHalfTickedBox{%
- \markdownRendererHalfTickedBoxPrototype}%
-\ExplSyntaxOn
-\seq_gput_right:Nn
- \g_@@_renderers_seq
- { halfTickedBox }
-\prop_gput:Nnn
- \g_@@_renderer_arities_prop
- { halfTickedBox }
- { 0 }
-\ExplSyntaxOff
-\def\markdownRendererUntickedBox{%
- \markdownRendererUntickedBoxPrototype}%
-\ExplSyntaxOn
-\seq_gput_right:Nn
- \g_@@_renderers_seq
- { untickedBox }
-\prop_gput:Nnn
- \g_@@_renderer_arities_prop
- { untickedBox }
- { 0 }
-\ExplSyntaxOff
-% \end{macrocode}
% \par
%
% \iffalse
@@ -9812,15 +9942,25 @@ following text:
%
% \begin{markdown}
-#### Markdown Document Renderers
-The \mdef{markdownRendererDocumentBegin} and \mdef{markdownRendererDocumentEnd}
-macros represent the beginning and the end of a *markdown* document. The macros
-receive no arguments.
+#### Attribute Renderers
+The following macros are only produced, when the \Opt{headerAttributes} option
+is enabled.
-A \TeX{} document may contain any number of markdown documents. Additionally,
-markdown documents may appear not only in a sequence, but several markdown
-documents may also be *nested*. Redefinitions of the macros should take this
-into account.
+\mdef{markdownRendererAttributeIdentifier} represents the \meta{identifier} of
+a markdown element (`id="`\meta{identifier}`"` in HTML and `#`\meta{identifier}
+in Markdown's \Opt{headerAttributes} syntax extension). The macro receives a
+single attribute that corresponds to the \meta{identifier}.
+
+\mdef{markdownRendererAttributeClassName} represents the \meta{class name} of a
+markdown element (`class="`\meta{class name} ...`"` in HTML and
+`.`\meta{class name} in Markdown's \Opt{headerAttributes} syntax extension).
+The macro receives a single attribute that corresponds to the \meta{class
+name}.
+
+\mdef{markdownRendererAttributeKeyValue} represents a HTML attribute in the form
+\meta{key}`=`\meta{value} that is neither an identifier nor a class name.
+The macro receives two attributes that correspond to the \meta{key} and the
+\meta{value}, respectively.
% \end{markdown}
%
@@ -9828,75 +9968,38 @@ into account.
##### \LaTeX{} Example {.unnumbered}
-Using a text editor, create a text document named `nested.md` with the
-following content:
-``` md
-This is a *nested* markdown document.
-```
-
Using a text editor, create a text document named `document.tex` with the
following content:
``` tex
\documentclass{article}
-\usepackage[contentBlocks]{markdown}
+\usepackage[headerAttributes, underscores=false]{markdown}
\markdownSetup{
renderers = {
- contentBlock = {%
- \markdownInput{#3}%
- },
- documentBegin = {%
- \par
- \emph{(The beginning of a document)}
- \par
- \begingroup
- \markdownSetup{snippet=first-nesting-level}%
- },
- documentEnd = {%
- \endgroup
- \par
- \emph{(The end of a document)}
- \par
- },
- },
-}
-\markdownSetupSnippet{first-nesting-level}{
- renderers = {
- documentBegin = {
+ attributeIdentifier = {%
\par
- \emph{(The beginning of a nested document)}
+ \emph{(Identifier: #1)}
\par
- \begingroup
- \markdownSetup{snippet=second-nesting-level-and-below}
},
- },
-}
-\markdownSetupSnippet{second-nesting-level-and-below}{
- renderers = {
- documentBegin = {
+ attributeClassName = {%
\par
- \emph{(The beginning of a nested document)}
+ \emph{(Class name: #1)}
\par
- \begingroup
},
- documentEnd = {
- \endgroup
+ attributeKeyValue = {%
\par
- \emph{(The end of a nested document)}
+ \emph{(Key: #1, Value: #2)}
\par
},
},
}
\begin{document}
\begin{markdown}
-Hello *world*!
-/nested.md
+# First top-level heading {jane=doe}
-_Foo_ bar!
-\end{markdown}
-\begin{markdown}
+## A subheading {#identifier}
-Bar baz!
+# Second top-level heading {.class_name}
\end{markdown}
\end{document}
@@ -9908,186 +10011,55 @@ lualatex document.tex
A PDF document named `document.pdf` should be produced and contain the
following text:
-> *(The beginning of a document)*
->
-> Hello *world*!
->
-> *(The beginning of a nested document)*
->
-> This is a *nested* markdown document.
->
-> *(The end of a nested document)*
+> # First top-level heading
>
-> _Foo_ bar!
+> *(Key: Jane, Value: Doe)*
>
-> *(The end of a document)*
+> ## A subheading
>
-> *(The beginning of a document)*
+> *(Identifier: identifier)*
>
-> Bar baz!
+> # Second top-level heading
>
-> *(The end of a document)*
+> *(Class name: class\_name)*
%</manual-tokens>
%<*tex>
% \fi
%
% \begin{macrocode}
-\def\markdownRendererDocumentBegin{%
- \markdownRendererDocumentBeginPrototype}%
+\def\markdownRendererAttributeIdentifier{%
+ \markdownRendererAttributeIdentifierPrototype}%
\ExplSyntaxOn
\seq_gput_right:Nn
\g_@@_renderers_seq
- { documentBegin }
+ { attributeIdentifier }
\prop_gput:Nnn
\g_@@_renderer_arities_prop
- { documentBegin }
- { 0 }
+ { attributeIdentifier }
+ { 1 }
\ExplSyntaxOff
-\def\markdownRendererDocumentEnd{%
- \markdownRendererDocumentEndPrototype}%
+\def\markdownRendererAttributeClassName{%
+ \markdownRendererAttributeClassNamePrototype}%
\ExplSyntaxOn
\seq_gput_right:Nn
\g_@@_renderers_seq
- { documentEnd }
+ { attributeClassName }
\prop_gput:Nnn
\g_@@_renderer_arities_prop
- { documentEnd }
- { 0 }
+ { attributeClassName }
+ { 1 }
\ExplSyntaxOff
-% \end{macrocode}
-% \par
-%
-% \iffalse
-%</tex>
-%<*manual-tokens>
-% \fi
-%
-% \begin{markdown}
-
-#### Interblock Separator Renderer
-The \mdef{markdownRendererInterblockSeparator} macro represents a separator
-between two markdown block elements. The macro receives no arguments.
-
-% \end{markdown}
-%
-% \iffalse
-
-##### Plain \TeX{} Example {.unnumbered}
-
-Using a text editor, create a text document named `document.tex` with the
-following content:
-``` tex
-\input markdown
-\def\markdownRendererInterblockSeparator{%
- \par
- {\it(The end of a block)}%
- \par
-}
-\markdownBegin
-Hello *world*!
-
-_Foo_ bar!
-\markdownEnd
-\bye
-```````
-Next, invoke LuaTeX from the terminal:
-``` sh
-luatex document.tex
-``````
-A PDF document named `document.pdf` should be produced and contain the
-following text:
-
-> Hello *world*!
->
-> *(The end of a block)*
->
-> _Foo_ bar!
-
-##### \LaTeX{} Example {.unnumbered}
-
-Using a text editor, create a text document named `document.tex` with the
-following content:
-``` tex
-\documentclass{article}
-\usepackage{markdown}
-\markdownSetup{
- renderers = {
- interblockSeparator = {%
- \par
- \emph{(The end of a block)}%
- \par
- },
- },
-}
-\begin{document}
-\begin{markdown}
-Hello *world*!
-
-_Foo_ bar!
-\end{markdown}
-\end{document}
-```````
-Next, invoke LuaTeX from the terminal:
-``` sh
-lualatex document.tex
-``````
-A PDF document named `document.pdf` should be produced and contain the
-following text:
-
-> Hello *world*!
->
-> *(The end of a block)*
->
-> _Foo_ bar!
-
-##### \Hologo{ConTeXt} Example {.unnumbered}
-
-Using a text editor, create a text document named `document.tex` with the
-following content:
-``` tex
-\usemodule[t][markdown]
-\def\markdownRendererInterblockSeparator{%
- \par
- \emph{(The end of a block)}%
- \par
-}
-\starttext
-\startmarkdown
-Hello *world*!
-
-_Foo_ bar!
-\stopmarkdown
-\stoptext
-```````
-Next, invoke LuaTeX from the terminal:
-``` sh
-context document.tex
-``````
-A PDF document named `document.pdf` should be produced and contain the
-following text:
-
-> Hello *world*!
->
-> *(The end of a block)*
->
-> _Foo_ bar!
-
-%</manual-tokens>
-%<*tex>
-% \fi
-%
-% \begin{macrocode}
-\def\markdownRendererInterblockSeparator{%
- \markdownRendererInterblockSeparatorPrototype}%
+\def\markdownRendererAttributeKeyValue{%
+ \markdownRendererAttributeKeyValuePrototype}%
\ExplSyntaxOn
\seq_gput_right:Nn
\g_@@_renderers_seq
- { interblockSeparator }
+ { attributeKeyValue }
\prop_gput:Nnn
\g_@@_renderer_arities_prop
- { interblockSeparator }
- { 0 }
+ { attributeKeyValue }
+ { 2 }
\ExplSyntaxOff
% \end{macrocode}
% \par
@@ -10099,140 +10071,27 @@ following text:
%
% \begin{markdown}
-#### Line Break Renderer
-The \mdef{markdownRendererLineBreak} macro represents a forced line break.
-The macro receives no arguments.
+#### Block Quote Renderers
+The \mdef{markdownRendererBlockQuoteBegin} macro represents the beginning of
+a block quote. The macro receives no arguments.
% \end{markdown}
%
% \iffalse
-
-##### Plain \TeX{} Example {.unnumbered}
-
-Using a text editor, create a text document named `document.tex` with the
-following content:
-``` tex
-\input markdown
-\def\markdownRendererLineBreak{%
- \par
- {\it(A forced linebreak)}%
- \par
-}
-\markdownInput{example.md}
-\bye
-```````
-Using a text editor, create a text document named `example.md` with the
-following content. Note the two spaces at the end of the first line, which
-specify a hard linebreak. Due to the limitations of the \TeX{} input
-processor, hard linebreaks would be ignored if we typed them directly into the
-`document.tex` document.
-
-<pre><code>Hello world! <br/>_Foo_ bar!</code></pre>
-
-Next, invoke LuaTeX from the terminal:
-``` sh
-luatex document.tex
-``````
-A PDF document named `document.pdf` should be produced and contain the
-following text:
-
-> Hello *world*!
->
-> *(A forced linebreak)*
->
-> _Foo_ bar!
-
-##### \LaTeX{} Example {.unnumbered}
-
-Using a text editor, create a text document named `document.tex` with the
-following content:
-``` tex
-\documentclass{article}
-\usepackage{markdown}
-\markdownSetup{
- renderers = {
- lineBreak = {%
- \par
- \emph{(A forced linebreak)}%
- \par
- },
- },
-}
-\begin{document}
-\markdownInput{example.md}
-\end{document}
-```````
-Using a text editor, create a text document named `example.md` with the
-following content. Note the two spaces at the end of the first line, which
-specify a hard linebreak. Due to the limitations of the \TeX{} input
-processor, hard linebreaks would be ignored if we typed them directly into the
-`document.tex` document.
-
-<pre><code>Hello world! <br/>_Foo_ bar!</code></pre>
-
-Next, invoke LuaTeX from the terminal:
-``` sh
-lualatex document.tex
-``````
-A PDF document named `document.pdf` should be produced and contain the
-following text:
-
-> Hello *world*!
->
-> *(A forced linebreak)*
->
-> _Foo_ bar!
-
-##### \Hologo{ConTeXt} Example {.unnumbered}
-
-Using a text editor, create a text document named `document.tex` with the
-following content:
-``` tex
-\usemodule[t][markdown]
-\def\markdownRendererLineBreak{%
- \par
- \emph{(A forced linebreak)}%
- \par
-}
-\starttext
-\markdownInput{example.md}
-\stoptext
-```````
-Using a text editor, create a text document named `example.md` with the
-following content. Note the two spaces at the end of the first line, which
-specify a hard linebreak. Due to the limitations of the \TeX{} input
-processor, hard linebreaks would be ignored if we typed them directly into the
-`document.tex` document.
-
-<pre><code>Hello world! <br/>_Foo_ bar!</code></pre>
-
-Next, invoke LuaTeX from the terminal:
-``` sh
-luatex document.tex
-``````
-A PDF document named `document.pdf` should be produced and contain the
-following text:
-
-> Hello *world*!
->
-> *(A forced linebreak)*
->
-> _Foo_ bar!
-
%</manual-tokens>
%<*tex>
% \fi
%
% \begin{macrocode}
-\def\markdownRendererLineBreak{%
- \markdownRendererLineBreakPrototype}%
+\def\markdownRendererBlockQuoteBegin{%
+ \markdownRendererBlockQuoteBeginPrototype}%
\ExplSyntaxOn
\seq_gput_right:Nn
\g_@@_renderers_seq
- { lineBreak }
+ { blockQuoteBegin }
\prop_gput:Nnn
\g_@@_renderer_arities_prop
- { lineBreak }
+ { blockQuoteBegin }
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
@@ -10245,10 +10104,8 @@ following text:
%
% \begin{markdown}
-#### Ellipsis Renderer
-The \mdef{markdownRendererEllipsis} macro replaces any occurance of ASCII
-ellipses in the input text. This macro will only be produced, when the
-\Opt{smartEllipses} option is enabled. The macro receives no arguments.
+The \mdef{markdownRendererBlockQuoteEnd} macro represents the end of a block
+quote. The macro receives no arguments.
% \end{markdown}
%
@@ -10260,452 +10117,25 @@ Using a text editor, create a text document named `document.tex` with the
following content:
``` tex
\input markdown
-\def\markdownOptionSmartEllipses{true}
-\def\markdownRendererEllipsis{{\it SHAZAM}!}
-\markdownBegin
-The secret word is ...
-\markdownEnd
-\bye
-```````
-Next, invoke LuaTeX from the terminal:
-``` sh
-luatex document.tex
-``````
-A PDF document named `document.pdf` should be produced and contain the
-following text:
-
-> The secret word is *SHAZAM*!
-
-##### \LaTeX{} Example {.unnumbered}
-
-Using a text editor, create a text document named `document.tex` with the
-following content:
-``` tex
-\documentclass{article}
-\usepackage[smartEllipses]{markdown}
-\markdownSetup{
- renderers = {
- ellipsis = \emph{SHAZAM}!,
- },
-}
-\begin{document}
-\begin{markdown}
-The secret word is ...
-\end{markdown}
-\end{document}
-```````
-Next, invoke LuaTeX from the terminal:
-``` sh
-lualatex document.tex
-``````
-A PDF document named `document.pdf` should be produced and contain the
-following text:
-
-> The secret word is *SHAZAM*!
-
-##### \Hologo{ConTeXt} Example {.unnumbered}
-
-Using a text editor, create a text document named `document.tex` with the
-following content:
-``` tex
-\usemodule[t][markdown]
-\setupmarkdown[smartEllipses = yes]
-\def\markdownRendererEllipsis{\emph{SHAZAM}!}
-\starttext
-\startmarkdown
-The secret word is ...
-\stopmarkdown
-\stoptext
-```````
-Next, invoke LuaTeX from the terminal:
-``` sh
-context document.tex
-``````
-A PDF document named `document.pdf` should be produced and contain the
-following text:
-
-> Hello *world*!
->
-> *(The end of a block)*
->
-> _Foo_ bar!
-
-%</manual-tokens>
-%<*tex>
-% \fi
-%
-% \begin{macrocode}
-\def\markdownRendererEllipsis{%
- \markdownRendererEllipsisPrototype}%
-\ExplSyntaxOn
-\seq_gput_right:Nn
- \g_@@_renderers_seq
- { ellipsis }
-\prop_gput:Nnn
- \g_@@_renderer_arities_prop
- { ellipsis }
- { 0 }
-\ExplSyntaxOff
-% \end{macrocode}
-% \par
-%
-% \iffalse
-%</tex>
-%<*manual-tokens>
-% \fi
-%
-% \begin{markdown}
-
-#### Non-Breaking Space Renderer
-The \mdef{markdownRendererNbsp} macro represents a non-breaking space.
-
-% \end{markdown}
-%
-% \iffalse
-
-##### \LaTeX{} Example {.unnumbered}
-
-Using a text editor, create a text document named `document.bib` with the
-following content:
-``` bib
-@book{knuth:tex,
- author = "Knuth, Donald Ervin",
- title = "The \TeX book, volume A of Computers and typesetting",
- publisher = "Addison-Wesley",
- year = "1984"
-}
-```````
-Using a text editor, create a text document named `document.tex` with the
-following content:
-``` tex
-\documentclass{article}
-\usepackage[
- citations,
- citationNbsps,
-]{markdown}
-\markdownSetup{
- renderers = {
- nbsp = {$\cdot$},
- },
+\def\markdownRendererBlockQuoteBegin{%
+ \begingroup
+ \vskip\parindent
+ \leftskip=2\parindent
+ \parindent=0pt
}
-\begin{document}
-
-\begin{markdown}
-The TeXbook [@knuth:tex, p. 123 and 130] is good.
-\end{markdown}
-
-\bibliographystyle{plain}
-\bibliography{document.bib}
-
-\end{document}
-```````
-Next, invoke LuaTeX and BibTeX from the terminal:
-``` sh
-lualatex document.tex
-bibtex document.aux
-lualatex document.tex
-lualatex document.tex
-``````
-A PDF document named `document.pdf` should be produced and contain the
-following text:
-
-> The TeXbook [1, p.·123·and·130] is good.
->
-> ### References
-> [1] Donald Ervin Knuth. _The TeXbook, volume A of Computers and typesetting._
-> Addison-Wesley, 1984.
-
-%</manual-tokens>
-%<*tex>
-% \fi
-%
-% \begin{macrocode}
-\def\markdownRendererNbsp{%
- \markdownRendererNbspPrototype}%
-\ExplSyntaxOn
-\seq_gput_right:Nn
- \g_@@_renderers_seq
- { nbsp }
-\prop_gput:Nnn
- \g_@@_renderer_arities_prop
- { nbsp }
- { 0 }
-\ExplSyntaxOff
-% \end{macrocode}
-% \par
-%
-% \iffalse
-%</tex>
-%<*manual-tokens>
-% \fi
-%
-% \begin{markdown}
-
-#### Special Character Renderers
-The following macros replace any special plain \TeX{} characters, including
-% \iffalse
-the active pipe character (`|`) of \Hologo{ConTeXt}, in the input text:
-
-- \mdef{markdownRendererAmpersand} replaces the ampersand (`&`).
-- \mdef{markdownRendererBackslash} replaces the backslash (`\`).
-- \mdef{markdownRendererCircumflex} replaces the circumflex (`^`).
-- \mdef{markdownRendererDollarSign} replaces the dollar sign (`$`).
-- \mdef{markdownRendererHash} replaces the hash sign (`#`).
-- \mdef{markdownRendererLeftBrace} replaces the left brace (`{`).
-- \mdef{markdownRendererPercentSign} replaces the percent sign (`%`).
-- \mdef{markdownRendererPipe} replaces the pipe character (`|`).
-- \mdef{markdownRendererRightBrace} replaces the right brace (`}`).
-- \mdef{markdownRendererTilde} replaces the tilde (`~`).
-- \mdef{markdownRendererUnderscore} replaces the underscore (`_`).
-
-% \fi
-% the active pipe character (`|`) of \Hologo{ConTeXt}, in the input text.
-% These macros will only be produced, when the \Opt{hybrid} option is
-% `false`.
-
-% \end{markdown}
-%
-% \iffalse
-
-##### Plain \TeX{} Example {.unnumbered}
-
-Using a text editor, create a text document named `document.tex` with the
-following content. We will make the tilde behave as if it were written in
-\TeX{}, where it represents a non-breaking space.
-``` tex
-\input markdown
-\def\markdownRendererTilde{~}
-\markdownBegin
-Bartel~Leendert van~der~Waerden
-\markdownEnd
-\bye
-```````
-Next, invoke LuaTeX from the terminal:
-``` sh
-luatex document.tex
-``````
-A PDF document named `document.pdf` should be produced and contain the
-following text, where the middot (`·`) denotes a non-breaking space:
-
-> Bartel·Leendert van·der·Waerden
-
-##### \LaTeX{} Example {.unnumbered}
-
-Using a text editor, create a text document named `document.tex` with the
-following content. We will make the tilde behave as if it were written in
-\TeX{}, where it represents a non-breaking space.
-``` tex
-\documentclass{article}
-\usepackage{markdown}
-\markdownSetup{
- renderers = {
- tilde = ~,
- },
+\def\markdownRendererBlockQuoteEnd{%
+ \par
+ \vskip\parindent
+ \endgroup
}
-\begin{document}
-\begin{markdown}
-Bartel~Leendert van~der~Waerden
-\end{markdown}
-\end{document}
-```````
-Next, invoke LuaTeX from the terminal:
-``` sh
-lualatex document.tex
-``````
-A PDF document named `document.pdf` should be produced and contain the
-following text, where the middot (`·`) denotes a non-breaking space:
-
-> Bartel·Leendert van·der·Waerden
-
-##### \Hologo{ConTeXt} Example {.unnumbered}
-
-Using a text editor, create a text document named `document.tex` with the
-following content. We will make the tilde behave as if it were written in
-\TeX{}, where it represents a non-breaking space.
-``` tex
-\usemodule[t][markdown]
-\def\markdownRendererTilde{~}
-\starttext
-\startmarkdown
-Bartel~Leendert van~der~Waerden
-\stopmarkdown
-\stoptext
-```````
-Next, invoke LuaTeX from the terminal:
-``` sh
-context document.tex
-``````
-A PDF document named `document.pdf` should be produced and contain the
-following text, where the middot (`·`) denotes a non-breaking space:
-
-> Bartel·Leendert van·der·Waerden
-
-%</manual-tokens>
-%<*tex>
-% \fi
-%
-% \begin{macrocode}
-\def\markdownRendererLeftBrace{%
- \markdownRendererLeftBracePrototype}%
-\ExplSyntaxOn
-\seq_gput_right:Nn
- \g_@@_renderers_seq
- { leftBrace }
-\prop_gput:Nnn
- \g_@@_renderer_arities_prop
- { leftBrace }
- { 0 }
-\ExplSyntaxOff
-\def\markdownRendererRightBrace{%
- \markdownRendererRightBracePrototype}%
-\ExplSyntaxOn
-\seq_gput_right:Nn
- \g_@@_renderers_seq
- { rightBrace }
-\prop_gput:Nnn
- \g_@@_renderer_arities_prop
- { rightBrace }
- { 0 }
-\ExplSyntaxOff
-\def\markdownRendererDollarSign{%
- \markdownRendererDollarSignPrototype}%
-\ExplSyntaxOn
-\seq_gput_right:Nn
- \g_@@_renderers_seq
- { dollarSign }
-\prop_gput:Nnn
- \g_@@_renderer_arities_prop
- { dollarSign }
- { 0 }
-\ExplSyntaxOff
-\def\markdownRendererPercentSign{%
- \markdownRendererPercentSignPrototype}%
-\ExplSyntaxOn
-\seq_gput_right:Nn
- \g_@@_renderers_seq
- { percentSign }
-\prop_gput:Nnn
- \g_@@_renderer_arities_prop
- { percentSign }
- { 0 }
-\ExplSyntaxOff
-\def\markdownRendererAmpersand{%
- \markdownRendererAmpersandPrototype}%
-\ExplSyntaxOn
-\seq_gput_right:Nn
- \g_@@_renderers_seq
- { ampersand }
-\prop_gput:Nnn
- \g_@@_renderer_arities_prop
- { ampersand }
- { 0 }
-\ExplSyntaxOff
-\def\markdownRendererUnderscore{%
- \markdownRendererUnderscorePrototype}%
-\ExplSyntaxOn
-\seq_gput_right:Nn
- \g_@@_renderers_seq
- { underscore }
-\prop_gput:Nnn
- \g_@@_renderer_arities_prop
- { underscore }
- { 0 }
-\ExplSyntaxOff
-\def\markdownRendererHash{%
- \markdownRendererHashPrototype}%
-\ExplSyntaxOn
-\seq_gput_right:Nn
- \g_@@_renderers_seq
- { hash }
-\prop_gput:Nnn
- \g_@@_renderer_arities_prop
- { hash }
- { 0 }
-\ExplSyntaxOff
-\def\markdownRendererCircumflex{%
- \markdownRendererCircumflexPrototype}%
-\ExplSyntaxOn
-\seq_gput_right:Nn
- \g_@@_renderers_seq
- { circumflex }
-\prop_gput:Nnn
- \g_@@_renderer_arities_prop
- { circumflex }
- { 0 }
-\ExplSyntaxOff
-\def\markdownRendererBackslash{%
- \markdownRendererBackslashPrototype}%
-\ExplSyntaxOn
-\seq_gput_right:Nn
- \g_@@_renderers_seq
- { backslash }
-\prop_gput:Nnn
- \g_@@_renderer_arities_prop
- { backslash }
- { 0 }
-\ExplSyntaxOff
-\def\markdownRendererTilde{%
- \markdownRendererTildePrototype}%
-\ExplSyntaxOn
-\seq_gput_right:Nn
- \g_@@_renderers_seq
- { tilde }
-\prop_gput:Nnn
- \g_@@_renderer_arities_prop
- { tilde }
- { 0 }
-\ExplSyntaxOff
-\def\markdownRendererPipe{%
- \markdownRendererPipePrototype}%
-\ExplSyntaxOn
-\seq_gput_right:Nn
- \g_@@_renderers_seq
- { pipe }
-\prop_gput:Nnn
- \g_@@_renderer_arities_prop
- { pipe }
- { 0 }
-\ExplSyntaxOff
-% \end{macrocode}
-% \par
-%
-% \iffalse
-%</tex>
-%<*manual-tokens>
-% \fi
-%
-% \begin{markdown}
-
-#### Code Span Renderer
-The \mdef{markdownRendererCodeSpan} macro represents inline code span in the
-input text. It receives a single argument that corresponds to the inline
-code span.
-
-% \end{markdown}
-%
-% \iffalse
-
-##### Plain \TeX{} Example {.unnumbered}
-
-Using a text editor, create a text document named `document.tex` with the
-following content:
-``` tex
-\input markdown
-\input lmfonts
-
-\def\markdownRendererCodeSpan#1{#1}
-
\markdownBegin
-`$\sqrt{-1}$ *equals* $i$`
-
-$\sqrt{-1}$ *equals* $i$
-\markdownEnd
+A quote from William Shakespeare's King Lear:
-\def\markdownOptionHybrid{true}
-\markdownBegin
-$\sqrt{-1}$ *equals* $i$
+> This is the excellent foppery of the world that when we are
+> sick in fortune---often the surfeit of our own behavior---we
+> make guilty of our disasters the sun, the moon, and the
+> stars [...]
\markdownEnd
-
\bye
```````
Next, invoke LuaTeX from the terminal:
@@ -10715,11 +10145,12 @@ luatex document.tex
A PDF document named `document.pdf` should be produced and contain the
following text:
-> \$\\sqrt{-1}\$ \*equals\* \$i\$.
->
-> \$\\sqrt{-1}\$ *equals* \$i\$.
->
-> √-̅1̅ *equals* $i$.
+> A quote from William Shakespeare's King Lear:
+>
+> > This is the excellent foppery of the world that when we are
+> > sick in fortune—often the surfeit of our own behavior—we
+> > make guilty of our disasters the sun, the moon, and the
+> > stars [...]
##### \LaTeX{} Example {.unnumbered}
@@ -10727,24 +10158,22 @@ Using a text editor, create a text document named `document.tex` with the
following content:
``` tex
\documentclass{article}
-\usepackage[smartEllipses]{markdown}
+\usepackage{markdown}
\markdownSetup{
renderers = {
- codeSpan = {#1},
+ blockQuoteBegin = {\begin{quote}},
+ blockQuoteEnd = {\end{quote}},
},
}
\begin{document}
-
\begin{markdown}
-`$\sqrt{-1}$ *equals* $i$`
+A quote from William Shakespeare's King Lear:
-$\sqrt{-1}$ *equals* $i$
+> This is the excellent foppery of the world that when we are
+> sick in fortune---often the surfeit of our own behavior---we
+> make guilty of our disasters the sun, the moon, and the
+> stars [...]
\end{markdown}
-
-\begin{markdown*}{hybrid}
-$\sqrt{-1}$ *equals* $i$
-\end{markdown*}
-
\end{document}
```````
Next, invoke LuaTeX from the terminal:
@@ -10754,11 +10183,12 @@ lualatex document.tex
A PDF document named `document.pdf` should be produced and contain the
following text:
-> \$\\sqrt{-1}\$ \*equals\* \$i\$.
->
-> \$\\sqrt{-1}\$ *equals* \$i\$.
->
-> √-̅1̅ *equals* $i$.
+> A quote from William Shakespeare's King Lear:
+>
+> > This is the excellent foppery of the world that when we are
+> > sick in fortune—often the surfeit of our own behavior—we
+> > make guilty of our disasters the sun, the moon, and the
+> > stars [...]
##### \Hologo{ConTeXt} Example {.unnumbered}
@@ -10766,21 +10196,18 @@ Using a text editor, create a text document named `document.tex` with the
following content:
``` tex
\usemodule[t][markdown]
-\def\markdownRendererCodeSpan#1{#1}
+\def\markdownRendererBlockQuoteBegin{\startquotation}
+\def\markdownRendererBlockQuoteEnd{\stopquotation}
\starttext
-
\startmarkdown
-`$\sqrt{-1}$ *equals* $i$`
-
-$\sqrt{-1}$ *equals* $i$
-\stopmarkdown
+A quote from William Shakespeare's King Lear:
-\setupmarkdown[hybrid = yes]
-\startmarkdown
-$\sqrt{-1}$ *equals* $i$
+> This is the excellent foppery of the world that when we are
+> sick in fortune---often the surfeit of our own behavior---we
+> make guilty of our disasters the sun, the moon, and the
+> stars [...]
\stopmarkdown
-
-\bye
+\stoptext
```````
Next, invoke LuaTeX from the terminal:
``` sh
@@ -10789,27 +10216,28 @@ context document.tex
A PDF document named `document.pdf` should be produced and contain the
following text:
-> \$\\sqrt{-1}\$ \*equals\* \$i\$.
->
-> \$\\sqrt{-1}\$ *equals* \$i\$.
->
-> √-̅1̅ *equals* $i$.
+> A quote from William Shakespeare's King Lear:
+>
+> > This is the excellent foppery of the world that when we are
+> > sick in fortune—often the surfeit of our own behavior—we
+> > make guilty of our disasters the sun, the moon, and the
+> > stars [...]
%</manual-tokens>
%<*tex>
% \fi
%
% \begin{macrocode}
-\def\markdownRendererCodeSpan{%
- \markdownRendererCodeSpanPrototype}%
+\def\markdownRendererBlockQuoteEnd{%
+ \markdownRendererBlockQuoteEndPrototype}%
\ExplSyntaxOn
\seq_gput_right:Nn
\g_@@_renderers_seq
- { codeSpan }
+ { blockQuoteEnd }
\prop_gput:Nnn
\g_@@_renderer_arities_prop
- { codeSpan }
- { 1 }
+ { blockQuoteEnd }
+ { 0 }
\ExplSyntaxOff
% \end{macrocode}
% \par
@@ -10821,63 +10249,37 @@ following text:
%
% \begin{markdown}
-#### Link Renderer
-The \mdef{markdownRendererLink} macro represents a hyperlink. It receives
-four arguments: the label, the fully escaped \acro{uri} that can be directly
-typeset, the raw \acro{uri} that can be used outside typesetting, and the
-title of the link.
+#### Bracketed Spans Context Renderers
+The following macros are only produced, when the \Opt{bracketedSpans} option is
+enabled.
+
+The \mdef{markdownRendererBracketedSpanAttributeContextBegin} and
+\mdef{markdownRendererBracketedSpanAttributeContextEnd} macros represent the
+beginning and the end of an inline bracketed span in which the attributes of
+the span apply. The macros receive no arguments.
% \end{markdown}
%
% \iffalse
-##### Plain \TeX{} Example {.unnumbered}
-
-Using a text editor, create a text document named `document.tex` with the
-following content:
-``` tex
-\input markdown
-\def\markdownRendererLink#1#2#3#4{%
- #1 {\tt#2} titled {\it#4}%
-}
-\markdownBegin
-Please visit [the link][ctan].
-
- [ctan]: https://ctan.org/
- (the Comprehensive TeX Archive Network)
-\markdownEnd
-\bye
-```````
-Next, invoke LuaTeX from the terminal:
-``` sh
-luatex document.tex
-``````
-A PDF document named `document.pdf` should be produced and contain the
-following text:
-
-> Please visit the link <https://ctan.org/> titled *the Comprehensive TeX
-> Archive Network*.
-
##### \LaTeX{} Example {.unnumbered}
Using a text editor, create a text document named `document.tex` with the
following content:
``` tex
\documentclass{article}
-\usepackage{markdown}
+\usepackage[bracketedSpans]{markdown}
\markdownSetup{
renderers = {
- link = {%
- #1 \texttt{#2} titled \emph{#4}%
- },
+ fencedDivAttributeContextBegin = {(},
+ fencedDivAttributeContextEnd = {)},
},
}
\begin{document}
\begin{markdown}
-Please visit [the link][ctan].
- [ctan]: https://ctan.org/
- (the Comprehensive TeX Archive Network)
+[foo [bar]{#identifier}]{key=value} [baz]{.class_name}
+
\end{markdown}
\end{document}
```````
@@ -10888,407 +10290,34 @@ lualatex document.tex
A PDF document named `document.pdf` should be produced and contain the
following text:
-> Please visit the link <https://ctan.org/> titled *the Comprehensive TeX
-> Archive Network*.
-
-##### \Hologo{ConTeXt} Example {.unnumbered}
-
-Using a text editor, create a text document named `document.tex` with the
-following content:
-``` tex
-\usemodule[t][markdown]
-\def\markdownRendererLink#1#2#3#4{%
- #1 {\tt#2} titled \emph{#4}%
-}
-\starttext
-\startmarkdown
-Please visit [the link][ctan].
-
- [ctan]: https://ctan.org/
- (the Comprehensive TeX Archive Network)
-\stopmarkdown
-\stoptext
-```````
-Next, invoke LuaTeX from the terminal:
-``` sh
-context document.tex
-``````
-A PDF document named `document.pdf` should be produced and contain the
-following text:
-
-> Please visit the link <https://ctan.org/> titled *the Comprehensive TeX
-> Archive Network*.
+> (foo (bar)) (baz)
%</manual-tokens>
%<*tex>
% \fi
%
% \begin{macrocode}
-\def\markdownRendererLink{%
- \markdownRendererLinkPrototype}%
+\def\markdownRendererBracketedSpanAttributeContextBegin{%
+ \markdownRendererBracketedSpanAttributeContextBeginPrototype}%
\ExplSyntaxOn
\seq_gput_right:Nn
\g_@@_renderers_seq
- { link }
+ { bracketedSpanAttributeContextBegin }
\prop_gput:Nnn
\g_@@_renderer_arities_prop
- { link }
- { 4 }
-\ExplSyntaxOff
-% \end{macrocode}
-% \par
-%
-% \iffalse
-%</tex>
-%<*manual-tokens>
-% \fi
-%
-% \begin{markdown}
-
-#### Image Renderer
-The \mdef{markdownRendererImage} macro represents an image. It receives
-four arguments: the label, the fully escaped \acro{uri} that can be directly
-typeset, the raw \acro{uri} that can be used outside typesetting, and the
-title of the link.
-
-% \end{markdown}
-%
-% \iffalse
-
-##### \LaTeX{} Example {.unnumbered}
-
-Using a text editor, create a text document named `document.tex` with the
-following content:
-``` tex
-\documentclass{article}
-\usepackage{markdown}
-\begingroup
-\catcode`\@=11
-\catcode`\%=12
-\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/.*[.]//')";
- if ! [ -e "$OUTPUT" ]; then
- wget -O "$OUTPUT" '#3' || rm "$OUTPUT";
- convert "$OUTPUT" png:"$OUTPUT";
- fi;
- printf '%s%%' "$OUTPUT" > \jobname.fetched;
- else
- printf '%s%%' "#3" > \jobname.fetched;
- fi^^A
-```
-``` tex
- }^^A
- {^^A
- \everyeof={\noexpand}^^A
- \edef\filename{\@@input"\jobname.fetched" }^^A
- \includegraphics[width=\textwidth]{\filename}^^A
- }^^A
-}
-\endgroup
-\begin{document}
-\begin{markdown}
-![TUGboat](https://tug.org/tugboat/noword.jpg)
-\end{markdown}
-\end{document}
-``````
-Next, invoke LuaTeX from the terminal:
-``` sh
-lualatex --shell-escape document.tex
-``````
-A PDF document named `document.pdf` should be produced and contain the
-following 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 `md5sum`, `wget`, and `convert` binaries are installed and
-that the \TeX{} engine has shell access.
-
-> ![TUGboat](https://tug.org/tugboat/noword.jpg "The Communications of the TeX Users Group")
-
-%</manual-tokens>
-%<*tex>
-% \fi
-%
-% \begin{macrocode}
-\def\markdownRendererImage{%
- \markdownRendererImagePrototype}%
-\ExplSyntaxOn
-\seq_gput_right:Nn
- \g_@@_renderers_seq
- { image }
-\prop_gput:Nnn
- \g_@@_renderer_arities_prop
- { image }
- { 4 }
-\ExplSyntaxOff
-% \end{macrocode}
-% \par
-%
-% \iffalse
-%</tex>
-%<*manual-tokens>
-% \fi
-%
-% \begin{markdown}
-
-#### Content Block Renderers {#texcontentblockrenderers}
-
-The \mdef{markdownRendererContentBlock} macro represents an iA\,Writer content
-block. It receives four arguments: the local file or online image filename
-extension cast to the lower case, the fully escaped \acro{uri} that can be
-directly typeset, the raw \acro{uri} that can be used outside typesetting,
-and the title of the content block.
-
-% \end{markdown}
-%
-% \iffalse
-%</manual-tokens>
-%<*tex>
-% \fi
-%
-% \begin{macrocode}
-\def\markdownRendererContentBlock{%
- \markdownRendererContentBlockPrototype}%
-\ExplSyntaxOn
-\seq_gput_right:Nn
- \g_@@_renderers_seq
- { contentBlock }
-\prop_gput:Nnn
- \g_@@_renderer_arities_prop
- { contentBlock }
- { 4 }
-\ExplSyntaxOff
-% \end{macrocode}
-% \par
-%
-% \iffalse
-%</tex>
-%<*manual-tokens>
-% \fi
-%
-% \begin{markdown}
-
-The \mdef{markdownRendererContentBlockOnlineImage} macro represents an
-iA\,Writer online image content block. The macro receives the same arguments
-as \mref{markdownRendererContentBlock}.
-
-% \end{markdown}
-%
-% \iffalse
-%</manual-tokens>
-%<*tex>
-% \fi
-%
-% \begin{macrocode}
-\def\markdownRendererContentBlockOnlineImage{%
- \markdownRendererContentBlockOnlineImagePrototype}%
-\ExplSyntaxOn
-\seq_gput_right:Nn
- \g_@@_renderers_seq
- { contentBlockOnlineImage }
-\prop_gput:Nnn
- \g_@@_renderer_arities_prop
- { contentBlockOnlineImage }
- { 4 }
+ { bracketedSpanAttributeContextBegin }
+ { 0 }
\ExplSyntaxOff
-% \end{macrocode}
-% \par
-%
-% \iffalse
-%</tex>
-%<*manual-tokens>
-% \fi
-%
-% \begin{markdown}
-
-The \mdef{markdownRendererContentBlockCode} macro represents an iA\,Writer
-content block that was recognized as a file in a known programming language
-by its filename extension $s$. If any `markdown-languages.json` file found
-by \pkg{kpathsea}^[Filenames other than `markdown-languages.json` may
-be specified using the `contentBlocksLanguageMap` Lua option.] contains a
-record $(k, v)$, then a non-online-image content block with the filename
-extension $s, s$`:lower()`${}=k$ is considered to be in a known programming
-language $v$.
-The macro receives five arguments: the local file name extension $s$ cast to
-the lower case, the language $v$, the fully escaped \acro{uri} that can be
-directly typeset, the raw \acro{uri} that can be used outside typesetting,
-and the title of the content block.
-
-Note that you will need to place place a `markdown-languages.json` file
-inside your working directory or inside your local \TeX{} 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.
-% The `Languages.json` file provided by @sotkov17 is a good starting point.
-% \end{markdown}
-%
-% \iffalse
-[The `Languages.json` file provided by Anton Sotkov][sotkov17] is a good
-starting point.
-
- [sotkov17]: https://github.com/iainc/Markdown-Content-Blocks
- (File transclusion syntax for Markdown)
-
-##### Plain \TeX{} Example {.unnumbered}
-
-Using a text editor, create a text document named `document.tex` with the
-following content:
-``` tex
-\input markdown
-\def\markdownOptionContentBlocks{true}
-\def\markdownRendererContentBlock#1#2#3#4{%
- This is {\tt #2}, #4.
-}
-\def\markdownRendererContentBlockOnlineImage#1#2#3#4{%
- This is the image {\tt #2}, #4.
-}
-\def\markdownRendererContentBlockCode#1#2#3#4#5{%
- This is the #2 (\uppercase{#1}) document {\tt #3}, #5.
-}
-\markdownBegin
-/document.tex (the document that we are currently typesetting)
-/markdown-languages.json (the mapping between filename extensions
- and programming language names)
-https://tug.org/tugboat/noword.jpg (the logotype of TUGboat)
-\markdownEnd
-\bye
-```````
-Create also a text document named `markdown-languages.json` with the following
-content:
-``` js
-{
- "json": "JavaScript Object Notation",
-}
-``````
-Next, invoke LuaTeX from the terminal:
-``` sh
-luatex document.tex
-``````
-A PDF document named `document.pdf` should be produced and contain the
-following text:
-
-> This is `document.tex`, the document that we are currently typesetting.
->
-> This is the JavaScript Object Notation (JSON) document
-> `markdown-languages.json`, the mapping between filename extensions and
-> programming language names.
->
-> This is the image `https://tug.org/tugboat/noword.jpg`, the logotype of
-> TUGboat.
-
-##### \LaTeX{} Example {.unnumbered}
-
-Using a text editor, create a text document named `document.tex` with the
-following content:
-``` tex
-\documentclass{article}
-\begin{filecontents}[overwrite,nosearch,noheader]{markdown-languages.json}
-{
- "json": "JavaScript Object Notation",
-}
-\end{filecontents}
-\usepackage[contentBlocks]{markdown}
-\markdownSetup{
- renderers = {
- contentBlock = {This is \texttt{#2}, #4.},
- contentBlockOnlineImage = {This is the image \texttt{#2}, #4.},
- contentBlockCode = {%
- This is the #2 (\MakeUppercase{#1}) document \texttt{#3}, #5.
- },
- },
-}
-\begin{document}
-\begin{markdown}
-/document.tex (the document that we are currently typesetting)
-/markdown-languages.json (the mapping between filename extensions
- and programming language names)
-https://tug.org/tugboat/noword.jpg (the logotype of TUGboat)
-\end{markdown}
-\end{document}
-```````
-Next, invoke LuaTeX from the terminal:
-``` sh
-lualatex document.tex
-``````
-A PDF document named `document.pdf` should be produced and contain the
-following text:
-
-> This is `document.tex`, the document that we are currently typesetting.
->
-> This is the JavaScript Object Notation (JSON) document
-> `markdown-languages.json`, the mapping between filename extensions and
-> programming language names.
->
-> This is the image `https://tug.org/tugboat/noword.jpg`, the logotype of
-> TUGboat.
-
-##### \Hologo{ConTeXt} Example {.unnumbered}
-
-Using a text editor, create a text document named `document.tex` with the
-following content:
-``` tex
-\usemodule[t][markdown]
-\setupmarkdown[contentBlocks = yes]
-\def\markdownRendererContentBlock#1#2#3#4{%
- This is {\tt #2}, #4.
-}
-\def\markdownRendererContentBlockOnlineImage#1#2#3#4{%
- This is the image {\tt #2}, #4.
-}
-\def\markdownRendererContentBlockCode#1#2#3#4#5{%
- This is the #2 (\uppercase{#1}) document {\tt #3}, #5.
-}
-\starttext
-\startmarkdown
-/document.tex (the document that we are currently typesetting)
-/markdown-languages.json (the mapping between filename extensions
- and programming language names)
-https://tug.org/tugboat/noword.jpg (the logotype of TUGboat)
-\stopmarkdown
-\stoptext
-```````
-Create also a text document named `markdown-languages.json` with the following
-content:
-``` js
-{
- "json": "JavaScript Object Notation",
-}
-``````
-Next, invoke LuaTeX from the terminal:
-``` sh
-context document.tex
-``````
-A PDF document named `document.pdf` should be produced and contain the
-following text:
-
-> This is `document.tex`, the document that we are currently typesetting.
->
-> This is the JavaScript Object Notation (JSON) document
-> `markdown-languages.json`, the mapping between filename extensions and
-> programming language names.
->
-> This is the image `https://tug.org/tugboat/noword.jpg`, the logotype of
-> TUGboat.
-
-%</manual-tokens>
-%<*tex>
-% \fi
-%
-% \begin{macrocode}
-\def\markdownRendererContentBlockCode{%
- \markdownRendererContentBlockCodePrototype}%
+\def\markdownRendererBracketedSpanAttributeContextEnd{%
+ \markdownRendererBracketedSpanAttributeContextEndPrototype}%
\ExplSyntaxOn
\seq_gput_right:Nn
\g_@@_renderers_seq
- { contentBlockCode }
+ { bracketedSpanAttributeContextEnd }
\prop_gput:Nnn
\g_@@_renderer_arities_prop
- { contentBlockCode }
- { 5 }
+ { bracketedSpanAttributeContextEnd }
+ { 0 }
\ExplSyntaxOff
% \end{macrocode}
% \par
@@ -11701,11 +10730,10 @@ following text:
%
% \begin{markdown}
-#### Ordered List Renderers
-The \mdef{markdownRendererOlBegin} macro represents the beginning of an
-ordered list that contains an item with several paragraphs of text (the
-list is not tight). This macro will only be produced, when the \Opt{fancyLists}
-option is disabled. The macro receives no arguments.
+#### Code Block Renderers
+The \mdef{markdownRendererInputVerbatim} macro represents a code
+block. The macro receives a single argument that corresponds to the
+filename of a file contaning the code block contents.
% \end{markdown}
%
@@ -11715,16 +10743,16 @@ option is disabled. The macro receives no arguments.
% \fi
%
% \begin{macrocode}
-\def\markdownRendererOlBegin{%
- \markdownRendererOlBeginPrototype}%
+\def\markdownRendererInputVerbatim{%
+ \markdownRendererInputVerbatimPrototype}%
\ExplSyntaxOn
\seq_gput_right:Nn
\g_@@_renderers_seq
- { olBegin }
+ { inputVerbatim }
\prop_gput:Nnn
\g_@@_renderer_arities_prop
- { olBegin }
- { 0 }
+ { inputVerbatim }
+ { 1 }
\ExplSyntaxOff
% \end{macrocode}
% \par
@@ -11736,103 +10764,110 @@ option is disabled. The macro receives no arguments.
%
% \begin{markdown}
-The \mdef{markdownRendererOlBeginTight} macro represents the beginning of an
-ordered list that contains no item with several paragraphs of text (the
-list is tight). This macro will only be produced, when the \Opt{tightLists}
-option is enabled and the \Opt{fancyLists} option is disabled. The macro
-receives no arguments.
+The \mdef{markdownRendererInputFencedCode} macro represents a fenced code
+block. This macro will only be produced, when the \Opt{fencedCode} option is
+enabled. The macro receives two arguments that correspond to the filename of
+a file contaning the code block contents and to the code fence infostring.
% \end{markdown}
%
% \iffalse
-%</manual-tokens>
-%<*tex>
-% \fi
-%
-% \begin{macrocode}
-\def\markdownRendererOlBeginTight{%
- \markdownRendererOlBeginTightPrototype}%
-\ExplSyntaxOn
-\seq_gput_right:Nn
- \g_@@_renderers_seq
- { olBeginTight }
-\prop_gput:Nnn
- \g_@@_renderer_arities_prop
- { olBeginTight }
- { 0 }
-\ExplSyntaxOff
-% \end{macrocode}
-% \par
-%
-% \iffalse
-%</tex>
-%<*manual-tokens>
-% \fi
-%
-% \begin{markdown}
-The \mdef{markdownRendererFancyOlBegin} macro represents the beginning of a
-fancy ordered list that contains an item with several paragraphs of text (the
-list is not tight). This macro will only be produced, when the \Opt{fancyLists}
-option is enabled. The macro receives two arguments: the style of the list item
-labels (`Decimal`, `LowerRoman`, `UpperRoman`, `LowerAlpha`, and `UpperAlpha`),
-and the style of delimiters between list item labels and texts (`Default`,
-`OneParen`, and `Period`).
+##### \LaTeX{} Example {.unnumbered}
-% \end{markdown}
-%
-% \iffalse
-%</manual-tokens>
-%<*tex>
-% \fi
-%
-% \begin{macrocode}
-\def\markdownRendererFancyOlBegin{%
- \markdownRendererFancyOlBeginPrototype}%
-\ExplSyntaxOn
-\seq_gput_right:Nn
- \g_@@_renderers_seq
- { fancyOlBegin }
-\prop_gput:Nnn
- \g_@@_renderer_arities_prop
- { fancyOlBegin }
- { 2 }
-\ExplSyntaxOff
-% \end{macrocode}
-% \par
-%
-% \iffalse
-%</tex>
-%<*manual-tokens>
-% \fi
-%
-% \begin{markdown}
+Using a text editor, create a text document named `document.tex` with the
+following content:
+``` tex
+\documentclass{article}
+\usepackage{verbatim}
+\usepackage[hyphens]{url}
+\usepackage[fencedCode]{markdown}
+\markdownSetup{
+ renderers = {
+ interblockSeparator = {
+ \def\markdownRendererInterblockSeparator{%
+ \par
+ \def\markdownRendererInterblockSeparator{%
+ \def\markdownRendererInterblockSeparator{%
+ \par
+ }%
+ }%
+ }%
+ },
+ inputVerbatim = {
+ is contained in file \url{#1}:%
+ \verbatiminput{#1}%
+ },
+ inputFencedCode = {
+ in #2 \markdownRendererInputVerbatim{#1}%
+ },
+ },
+}
+\begin{document}
+\begin{markdown}
+The following code
-The \mdef{markdownRendererFancyOlBeginTight} macro represents the beginning of
-a fancy ordered list that contains no item with several paragraphs of text (the
-list is tight). This macro will only be produced, when the \Opt{fancyLists}
-and \Opt{tightLists} options are enabled. The macro receives two arguments: the
-style of the list item labels, and the style of delimiters between list
-item labels and texts. See the \mref{markdownRendererFancyOlBegin} macro for
-the valid style values.
+ def foo(bar):
+ if len(bar) <= 1:
+ return bar[0]
+ elif len(bar) == 2:
+ return sorted(bar)
+ else:
+ baz = len(bar) // 2
+ return foo(bar[baz:], bar[:baz])
+
+The following code
+
+~~~ Python
+>>> foo([4, 2, 1, 3])
+[1, 2, 3, 4]
+~~~~~~~~~~
+\end{markdown}
+\end{document}
+```````
+Next, invoke LuaTeX from the terminal:
+``` sh
+lualatex document.tex
+``````
+A PDF document named `document.pdf` should be produced and contain the
+following text except for the filename, which may differ:
+
+> The following code is contained in file
+> `./_markdown_document/882453149edcf288976647f6fe147ada.verbatim`:
+> ``` py
+> def foo(bar):
+> if len(bar) <= 1:
+> return bar[:1]
+> elif len(bar) == 2:
+> return sorted(bar)
+> else:
+> baz = bar[len(bar) // 2]
+> return (
+> foo([qux for qux in bar if qux < baz]) + [baz] +
+> foo([qux for qux in bar if qux > baz])
+> )
+> ``````
+> The following code in Python contained in file
+> `./_markdown_document/cf2a96e2120cef5b1fae5fea36fcc27b.verbatim`:
+> ``` py
+> >>> foo([4, 2, 1, 3])
+> [1, 2, 3, 4]
+> ``````
-% \end{markdown}
-%
-% \iffalse
%</manual-tokens>
%<*tex>
% \fi
%
% \begin{macrocode}
-\def\markdownRendererFancyOlBeginTight{%
- \markdownRendererFancyOlBeginTightPrototype}%
+\def\markdownRendererInputFencedCode{%
+ \markdownRendererInputFencedCodePrototype}%
\ExplSyntaxOn
\seq_gput_right:Nn
\g_@@_renderers_seq
- { fancyOlBeginTight }
+ { inputFencedCode }
\prop_gput:Nnn
\g_@@_renderer_arities_prop
- { fancyOlBeginTight }
+ { inputFencedCode }
{ 2 }
\ExplSyntaxOff
% \end{macrocode}
@@ -11842,234 +10877,142 @@ the valid style values.
%</tex>
%<*manual-tokens>
% \fi
-%
% \begin{markdown}
-The \mdef{markdownRendererOlItem} macro represents an item in an ordered list.
-This macro will only be produced, when the \Opt{startNumber} option is
-disabled and the \Opt{fancyLists} option is disabled. The macro receives no
-arguments.
+#### Code Span Renderer
+The \mdef{markdownRendererCodeSpan} macro represents inline code span in the
+input text. It receives a single argument that corresponds to the inline
+code span.
% \end{markdown}
%
% \iffalse
-%</manual-tokens>
-%<*tex>
-% \fi
-%
-% \begin{macrocode}
-\def\markdownRendererOlItem{%
- \markdownRendererOlItemPrototype}%
-\ExplSyntaxOn
-\seq_gput_right:Nn
- \g_@@_renderers_seq
- { olItem }
-\prop_gput:Nnn
- \g_@@_renderer_arities_prop
- { olItem }
- { 0 }
-\ExplSyntaxOff
-% \end{macrocode}
-% \par
-%
-% \iffalse
-%</tex>
-%<*manual-tokens>
-% \fi
-%
-% \begin{markdown}
-The \mdef{markdownRendererOlItemEnd} macro represents the end of an item in
-an ordered list. This macro will only be produced, when the \Opt{fancyLists}
-option is disabled. The macro receives no arguments.
+##### Plain \TeX{} Example {.unnumbered}
-% \end{markdown}
-%
-% \iffalse
-%</manual-tokens>
-%<*tex>
-% \fi
-%
-% \begin{macrocode}
-\def\markdownRendererOlItemEnd{%
- \markdownRendererOlItemEndPrototype}%
-\ExplSyntaxOn
-\seq_gput_right:Nn
- \g_@@_renderers_seq
- { olItemEnd }
-\prop_gput:Nnn
- \g_@@_renderer_arities_prop
- { olItemEnd }
- { 0 }
-\ExplSyntaxOff
-% \end{macrocode}
-% \par
-%
-% \iffalse
-%</tex>
-%<*manual-tokens>
-% \fi
-%
-% \begin{markdown}
+Using a text editor, create a text document named `document.tex` with the
+following content:
+``` tex
+\input markdown
+\input lmfonts
-The \mdef{markdownRendererOlItemWithNumber} macro represents an item in an
-ordered list. This macro will only be produced, when the \Opt{startNumber}
-option is enabled and the \Opt{fancyLists} option is disabled. The macro
-receives a single numeric argument that corresponds to the item number.
+\def\markdownRendererCodeSpan#1{#1}
-% \end{markdown}
-%
-% \iffalse
-%</manual-tokens>
-%<*tex>
-% \fi
-%
-% \begin{macrocode}
-\def\markdownRendererOlItemWithNumber{%
- \markdownRendererOlItemWithNumberPrototype}%
-\ExplSyntaxOn
-\seq_gput_right:Nn
- \g_@@_renderers_seq
- { olItemWithNumber }
-\prop_gput:Nnn
- \g_@@_renderer_arities_prop
- { olItemWithNumber }
- { 1 }
-\ExplSyntaxOff
-% \end{macrocode}
-% \par
-%
-% \iffalse
-%</tex>
-%<*manual-tokens>
-% \fi
-%
-% \begin{markdown}
+\markdownBegin
+`$\sqrt{-1}$ *equals* $i$`
-The \mdef{markdownRendererFancyOlItem} macro represents an item in a fancy
-ordered list. This macro will only be produced, when the \Opt{startNumber}
-option is disabled and the \Opt{fancyLists} option is enabled. The macro receives
-no arguments.
+$\sqrt{-1}$ *equals* $i$
+\markdownEnd
-% \end{markdown}
-%
-% \iffalse
-%</manual-tokens>
-%<*tex>
-% \fi
-%
-% \begin{macrocode}
-\def\markdownRendererFancyOlItem{%
- \markdownRendererFancyOlItemPrototype}%
-\ExplSyntaxOn
-\seq_gput_right:Nn
- \g_@@_renderers_seq
- { fancyOlItem }
-\prop_gput:Nnn
- \g_@@_renderer_arities_prop
- { fancyOlItem }
- { 0 }
-\ExplSyntaxOff
-% \end{macrocode}
-% \par
-%
-% \iffalse
-%</tex>
-%<*manual-tokens>
-% \fi
-%
-% \begin{markdown}
+\def\markdownOptionHybrid{true}
+\markdownBegin
+$\sqrt{-1}$ *equals* $i$
+\markdownEnd
-The \mdef{markdownRendererFancyOlItemEnd} macro represents the end of an item in
-a fancy ordered list. This macro will only be produced, when the \Opt{fancyLists}
-option is enabled. The macro receives no arguments.
+\bye
+```````
+Next, invoke LuaTeX from the terminal:
+``` sh
+luatex document.tex
+``````
+A PDF document named `document.pdf` should be produced and contain the
+following text:
-% \end{markdown}
-%
-% \iffalse
-%</manual-tokens>
-%<*tex>
-% \fi
-%
-% \begin{macrocode}
-\def\markdownRendererFancyOlItemEnd{%
- \markdownRendererFancyOlItemEndPrototype}%
-\ExplSyntaxOn
-\seq_gput_right:Nn
- \g_@@_renderers_seq
- { fancyOlItemEnd }
-\prop_gput:Nnn
- \g_@@_renderer_arities_prop
- { fancyOlItemEnd }
- { 0 }
-\ExplSyntaxOff
-% \end{macrocode}
-% \par
-%
-% \iffalse
-%</tex>
-%<*manual-tokens>
-% \fi
-%
-% \begin{markdown}
+> \$\\sqrt{-1}\$ \*equals\* \$i\$.
+>
+> \$\\sqrt{-1}\$ *equals* \$i\$.
+>
+> √-̅1̅ *equals* $i$.
-The \mdef{markdownRendererFancyOlItemWithNumber} macro represents an item in a
-fancy ordered list. This macro will only be produced, when the \Opt{startNumber}
-and \Opt{fancyLists} options are enabled. The macro receives a single numeric
-argument that corresponds to the item number.
+##### \LaTeX{} Example {.unnumbered}
-% \end{markdown}
-%
-% \iffalse
-%</manual-tokens>
-%<*tex>
-% \fi
-%
-% \begin{macrocode}
-\def\markdownRendererFancyOlItemWithNumber{%
- \markdownRendererFancyOlItemWithNumberPrototype}%
-\ExplSyntaxOn
-\seq_gput_right:Nn
- \g_@@_renderers_seq
- { fancyOlItemWithNumber }
-\prop_gput:Nnn
- \g_@@_renderer_arities_prop
- { fancyOlItemWithNumber }
- { 1 }
-\ExplSyntaxOff
-% \end{macrocode}
-% \par
-%
-% \iffalse
-%</tex>
-%<*manual-tokens>
-% \fi
-%
-% \begin{markdown}
+Using a text editor, create a text document named `document.tex` with the
+following content:
+``` tex
+\documentclass{article}
+\usepackage[smartEllipses]{markdown}
+\markdownSetup{
+ renderers = {
+ codeSpan = {#1},
+ },
+}
+\begin{document}
-The \mdef{markdownRendererOlEnd} macro represents the end of an ordered list
-that contains an item with several paragraphs of text (the list is not
-tight). This macro will only be produced, when the \Opt{fancyLists} option is
-disabled. The macro receives no arguments.
+\begin{markdown}
+`$\sqrt{-1}$ *equals* $i$`
+
+$\sqrt{-1}$ *equals* $i$
+\end{markdown}
+
+\begin{markdown*}{hybrid}
+$\sqrt{-1}$ *equals* $i$
+\end{markdown*}
+
+\end{document}
+```````
+Next, invoke LuaTeX from the terminal:
+``` sh
+lualatex document.tex
+``````
+A PDF document named `document.pdf` should be produced and contain the
+following text:
+
+> \$\\sqrt{-1}\$ \*equals\* \$i\$.
+>
+> \$\\sqrt{-1}\$ *equals* \$i\$.
+>
+> √-̅1̅ *equals* $i$.
+
+##### \Hologo{ConTeXt} Example {.unnumbered}
+
+Using a text editor, create a text document named `document.tex` with the
+following content:
+``` tex
+\usemodule[t][markdown]
+\def\markdownRendererCodeSpan#1{#1}
+\starttext
+
+\startmarkdown
+`$\sqrt{-1}$ *equals* $i$`
+
+$\sqrt{-1}$ *equals* $i$
+\stopmarkdown
+
+\setupmarkdown[hybrid = yes]
+\startmarkdown
+$\sqrt{-1}$ *equals* $i$
+\stopmarkdown
+
+\bye
+```````
+Next, invoke LuaTeX from the terminal:
+``` sh
+context document.tex
+``````
+A PDF document named `document.pdf` should be produced and contain the
+following text:
+
+> \$\\sqrt{-1}\$ \*equals\* \$i\$.
+>
+> \$\\sqrt{-1}\$ *equals* \$i\$.
+>
+> √-̅1̅ *equals* $i$.
-% \end{markdown}
-%
-% \iffalse
%</manual-tokens>
%<*tex>
% \fi
%
% \begin{macrocode}
-\def\markdownRendererOlEnd{%
- \markdownRendererOlEndPrototype}%
+\def\markdownRendererCodeSpan{%
+ \markdownRendererCodeSpanPrototype}%
\ExplSyntaxOn
\seq_gput_right:Nn
\g_@@_renderers_seq
- { olEnd }
+ { codeSpan }
\prop_gput:Nnn
\g_@@_renderer_arities_prop
- { olEnd }
- { 0 }
+ { codeSpan }
+ { 1 }
\ExplSyntaxOff
% \end{macrocode}
% \par
@@ -12081,11 +11024,13 @@ disabled. The macro receives no arguments.
%
% \begin{markdown}
-The \mdef{markdownRendererOlEndTight} 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 \Opt{tightLists} option is
-enabled and the \Opt{fancyLists} option is disabled. The macro receives no
-arguments.
+#### Content Block Renderers {#texcontentblockrenderers}
+
+The \mdef{markdownRendererContentBlock} macro represents an iA\,Writer content
+block. It receives four arguments: the local file or online image filename
+extension cast to the lower case, the fully escaped \acro{uri} that can be
+directly typeset, the raw \acro{uri} that can be used outside typesetting,
+and the title of the content block.
% \end{markdown}
%
@@ -12095,16 +11040,16 @@ arguments.
% \fi
%
% \begin{macrocode}
-\def\markdownRendererOlEndTight{%
- \markdownRendererOlEndTightPrototype}%
+\def\markdownRendererContentBlock{%
+ \markdownRendererContentBlockPrototype}%
\ExplSyntaxOn
\seq_gput_right:Nn
\g_@@_renderers_seq
- { olEndTight }
+ { contentBlock }
\prop_gput:Nnn
\g_@@_renderer_arities_prop
- { olEndTight }
- { 0 }
+ { contentBlock }
+ { 4 }
\ExplSyntaxOff
% \end{macrocode}
% \par
@@ -12116,10 +11061,9 @@ arguments.
%
% \begin{markdown}
-The \mdef{markdownRendererFancyOlEnd} macro represents the end of a fancy
-ordered list that contains an item with several paragraphs of text (the list
-is not tight). This macro will only be produced, when the \Opt{fancyLists}
-option is enabled. The macro receives no arguments.
+The \mdef{markdownRendererContentBlockOnlineImage} macro represents an
+iA\,Writer online image content block. The macro receives the same arguments
+as \mref{markdownRendererContentBlock}.
% \end{markdown}
%
@@ -12129,16 +11073,16 @@ option is enabled. The macro receives no arguments.
% \fi
%
% \begin{macrocode}
-\def\markdownRendererFancyOlEnd{%
- \markdownRendererFancyOlEndPrototype}%
+\def\markdownRendererContentBlockOnlineImage{%
+ \markdownRendererContentBlockOnlineImagePrototype}%
\ExplSyntaxOn
\seq_gput_right:Nn
\g_@@_renderers_seq
- { fancyOlEnd }
+ { contentBlockOnlineImage }
\prop_gput:Nnn
\g_@@_renderer_arities_prop
- { fancyOlEnd }
- { 0 }
+ { contentBlockOnlineImage }
+ { 4 }
\ExplSyntaxOff
% \end{macrocode}
% \par
@@ -12150,14 +11094,33 @@ option is enabled. The macro receives no arguments.
%
% \begin{markdown}
-The \mdef{markdownRendererFancyOlEndTight} macro represents the end of a
-fancy ordered list that contains no item with several paragraphs of text (the
-list is tight). This macro will only be produced, when the \Opt{fancyLists}
-and \Opt{tightLists} options are enabled. The macro receives no arguments.
+The \mdef{markdownRendererContentBlockCode} macro represents an iA\,Writer
+content block that was recognized as a file in a known programming language
+by its filename extension $s$. If any `markdown-languages.json` file found
+by \pkg{kpathsea}^[Filenames other than `markdown-languages.json` may
+be specified using the `contentBlocksLanguageMap` Lua option.] contains a
+record $(k, v)$, then a non-online-image content block with the filename
+extension $s, s$`:lower()`${}=k$ is considered to be in a known programming
+language $v$.
+The macro receives five arguments: the local file name extension $s$ cast to
+the lower case, the language $v$, the fully escaped \acro{uri} that can be
+directly typeset, the raw \acro{uri} that can be used outside typesetting,
+and the title of the content block.
+Note that you will need to place place a `markdown-languages.json` file
+inside your working directory or inside your local \TeX{} 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.
+% The `Languages.json` file provided by @sotkov17 is a good starting point.
% \end{markdown}
%
% \iffalse
+[The `Languages.json` file provided by Anton Sotkov][sotkov17] is a good
+starting point.
+
+ [sotkov17]: https://github.com/iainc/Markdown-Content-Blocks
+ (File transclusion syntax for Markdown)
##### Plain \TeX{} Example {.unnumbered}
@@ -12165,66 +11128,31 @@ Using a text editor, create a text document named `document.tex` with the
following content:
``` tex
\input markdown
-\def\markdownOptionTightLists{true}
-\def\markdownOptionStartNumber{true}
-
-\def\markdownRendererInterblockSeparator{}
-\def\markdownRendererOlBeginTight{ (}
-\def\markdownRendererOlItemWithNumber#1{%
- \ifnum #1=1\relax
- the first
- \else
- \ifnum #1=2\relax
- , the second
- \else
- , and the third
- \fi
- \fi
+\def\markdownOptionContentBlocks{true}
+\def\markdownRendererContentBlock#1#2#3#4{%
+ This is {\tt #2}, #4.
}
-\def\markdownRendererOlItemEnd{}
-\def\markdownRendererOlEndTight{).}
-
-\markdownBegin
-This is a tight list
-
-1. item
-2. item
-3. item
-\markdownEnd
-
-\def\markdownRendererInterblockSeparator{%
- :\par
- \def\markdownRendererInterblockSeparator{\par}%
+\def\markdownRendererContentBlockOnlineImage#1#2#3#4{%
+ This is the image {\tt #2}, #4.
}
-\def\markdownRendererOlBegin{}
-\def\markdownRendererOlItemWithNumber#1{%
- #1.\kern 0.5em%
- This is the
- \ifnum #1=1\relax
- first
- \else
- \ifnum #1=2\relax
- second
- \else
- third
- \fi
- \fi
+\def\markdownRendererContentBlockCode#1#2#3#4#5{%
+ This is the #2 (\uppercase{#1}) document {\tt #3}, #5.
}
-\def\markdownRendererOlItemEnd{.\par}
-\def\markdownRendererOlEnd{}
-
\markdownBegin
-This is a loose list
-
-1. item
-
-2. item
-
-3. item
+/document.tex (the document that we are currently typesetting)
+/markdown-languages.json (the mapping between filename extensions
+ and programming language names)
+https://tug.org/tugboat/noword.jpg (the logotype of TUGboat)
\markdownEnd
-
\bye
```````
+Create also a text document named `markdown-languages.json` with the following
+content:
+``` js
+{
+ "json": "JavaScript Object Notation",
+}
+``````
Next, invoke LuaTeX from the terminal:
``` sh
luatex document.tex
@@ -12232,15 +11160,14 @@ luatex document.tex
A PDF document named `document.pdf` should be produced and contain the
following text:
-> This is a tight list (the first item, the second item, and the third item).
+> This is `document.tex`, the document that we are currently typesetting.
>
-> This is a loose list:
->
-> 1. This is the first item.
->
-> 2. This is the second item.
->
-> 3. This is the third item.
+> This is the JavaScript Object Notation (JSON) document
+> `markdown-languages.json`, the mapping between filename extensions and
+> programming language names.
+>
+> This is the image `https://tug.org/tugboat/noword.jpg`, the logotype of
+> TUGboat.
##### \LaTeX{} Example {.unnumbered}
@@ -12248,67 +11175,28 @@ Using a text editor, create a text document named `document.tex` with the
following content:
``` tex
\documentclass{article}
-\usepackage[tightLists, startNumber]{markdown}
-\begin{document}
-
-\begin{markdown*}{
- renderers = {
- interblockSeparator = {},
- olBeginTight = { (},
- olItemWithNumber = {%
- \ifnum #1=1\relax
- the first
- \else
- \ifnum #1=2\relax
- , the second
- \else
- , and the third
- \fi
- \fi
- },
- olItemEnd = {},
- olEndTight = {).},
- },
+\begin{filecontents}[overwrite,nosearch,noheader]{markdown-languages.json}
+{
+ "json": "JavaScript Object Notation",
}
-This is a tight list
-
-1. item
-2. item
-3. item
-\end{markdown*}
-
-\begin{markdown*}{
+\end{filecontents}
+\usepackage[contentBlocks]{markdown}
+\markdownSetup{
renderers = {
- interblockSeparator = {%
- :\par
- \def\markdownRendererInterblockSeparator{\par}%
- },
- olBeginTight = {\begin{enumerate}},
- olItemWithNumber = {%
- \item This is the
- \ifnum #1=1\relax
- first
- \else
- \ifnum #1=2\relax
- second
- \else
- third
- \fi
- \fi
+ contentBlock = {This is \texttt{#2}, #4.},
+ contentBlockOnlineImage = {This is the image \texttt{#2}, #4.},
+ contentBlockCode = {%
+ This is the #2 (\MakeUppercase{#1}) document \texttt{#3}, #5.
},
- olItemEnd = {.},
- olEnd = {\end{enumerate}},
- },
+ },
}
-This is a loose list
-
-1. item
-
-2. item
-
-3. item
-\end{markdown*}
-
+\begin{document}
+\begin{markdown}
+/document.tex (the document that we are currently typesetting)
+/markdown-languages.json (the mapping between filename extensions
+ and programming language names)
+https://tug.org/tugboat/noword.jpg (the logotype of TUGboat)
+\end{markdown}
\end{document}
```````
Next, invoke LuaTeX from the terminal:
@@ -12318,15 +11206,14 @@ lualatex document.tex
A PDF document named `document.pdf` should be produced and contain the
following text:
-> This is a tight list (the first item, the second item, and the third item).
+> This is `document.tex`, the document that we are currently typesetting.
>
-> This is a loose list:
->
-> 1. This is the first item.
->
-> 2. This is the second item.
->
-> 3. This is the third item.
+> This is the JavaScript Object Notation (JSON) document
+> `markdown-languages.json`, the mapping between filename extensions and
+> programming language names.
+>
+> This is the image `https://tug.org/tugboat/noword.jpg`, the logotype of
+> TUGboat.
##### \Hologo{ConTeXt} Example {.unnumbered}
@@ -12334,70 +11221,32 @@ Using a text editor, create a text document named `document.tex` with the
following content:
``` tex
\usemodule[t][markdown]
-\setupmarkdown
- [
- tightLists = yes,
- startNumber = yes,
- ]
-\starttext
-
-\def\markdownRendererInterblockSeparator{}
-\def\markdownRendererOlBeginTight{ (}
-\def\markdownRendererOlItemWithNumber#1{%
- \ifnum #1=1\relax
- the first
- \else
- \ifnum #1=2\relax
- , the second
- \else
- , and the third
- \fi
- \fi
+\setupmarkdown[contentBlocks = yes]
+\def\markdownRendererContentBlock#1#2#3#4{%
+ This is {\tt #2}, #4.
}
-\def\markdownRendererOlItemEnd{}
-\def\markdownRendererOlEndTight{).}
-
-\startmarkdown
-This is a tight list
-
-1. item
-2. item
-3. item
-\stopmarkdown
-
-\def\markdownRendererInterblockSeparator{%
- :\par
- \def\markdownRendererInterblockSeparator{\par}%
+\def\markdownRendererContentBlockOnlineImage#1#2#3#4{%
+ This is the image {\tt #2}, #4.
}
-\def\markdownRendererOlBegin{\startitemize}
-\def\markdownRendererOlItemWithNumber#1{%
- \sym{#1.}
- This is the
- \ifnum #1=1\relax
- first
- \else
- \ifnum #1=2\relax
- second
- \else
- third
- \fi
- \fi
+\def\markdownRendererContentBlockCode#1#2#3#4#5{%
+ This is the #2 (\uppercase{#1}) document {\tt #3}, #5.
}
-\def\markdownRendererOlItemEnd{.\par}
-\def\markdownRendererOlEnd{\stopitemize}
-
+\starttext
\startmarkdown
-This is a loose list
-
-1. item
-
-2. item
-
-3. item
+/document.tex (the document that we are currently typesetting)
+/markdown-languages.json (the mapping between filename extensions
+ and programming language names)
+https://tug.org/tugboat/noword.jpg (the logotype of TUGboat)
\stopmarkdown
-
\stoptext
```````
+Create also a text document named `markdown-languages.json` with the following
+content:
+``` js
+{
+ "json": "JavaScript Object Notation",
+}
+``````
Next, invoke LuaTeX from the terminal:
``` sh
context document.tex
@@ -12405,31 +11254,30 @@ context document.tex
A PDF document named `document.pdf` should be produced and contain the
following text:
-> This is a tight list (the first item, the second item, and the third item).
+> This is `document.tex`, the document that we are currently typesetting.
>
-> This is a loose list:
->
-> 1. This is the first item.
->
-> 2. This is the second item.
->
-> 3. This is the third item.
+> This is the JavaScript Object Notation (JSON) document
+> `markdown-languages.json`, the mapping between filename extensions and
+> programming language names.
+>
+> This is the image `https://tug.org/tugboat/noword.jpg`, the logotype of
+> TUGboat.
%</manual-tokens>
%<*tex>
% \fi
%
% \begin{macrocode}
-\def\markdownRendererFancyOlEndTight{%
- \markdownRendererFancyOlEndTightPrototype}%
+\def\markdownRendererContentBlockCode{%
+ \markdownRendererContentBlockCodePrototype}%
\ExplSyntaxOn
\seq_gput_right:Nn
\g_@@_renderers_seq
- { fancyOlEndTight }
+ { contentBlockCode }
\prop_gput:Nnn
\g_@@_renderer_arities_prop
- { fancyOlEndTight }
- { 0 }
+ { contentBlockCode }
+ { 5 }
\ExplSyntaxOff
% \end{macrocode}
% \par
@@ -13045,10 +11893,10 @@ following text:
%
% \begin{markdown}
-#### Emphasis Renderers
-The \mdef{markdownRendererEmphasis} macro represents an emphasized span of
-text. The macro receives a single argument that corresponds to the emphasized
-span of text.
+#### Ellipsis Renderer
+The \mdef{markdownRendererEllipsis} macro replaces any occurance of ASCII
+ellipses in the input text. This macro will only be produced, when the
+\Opt{smartEllipses} option is enabled. The macro receives no arguments.
% \end{markdown}
%
@@ -13060,12 +11908,10 @@ Using a text editor, create a text document named `document.tex` with the
following content:
``` tex
\input markdown
-\def\markdownRendererEmphasis#1{{\it#1}}
-\def\markdownRendererStrongEmphasis#1{{\bf#1}}
+\def\markdownOptionSmartEllipses{true}
+\def\markdownRendererEllipsis{{\it SHAZAM}!}
\markdownBegin
-This is *emphasis*.
-
-This is **strong emphasis**.
+The secret word is ...
\markdownEnd
\bye
```````
@@ -13076,9 +11922,7 @@ luatex document.tex
A PDF document named `document.pdf` should be produced and contain the
following text:
-> This is *emphasis*.
->
-> This is **strong emphasis**.
+> The secret word is *SHAZAM*!
##### \LaTeX{} Example {.unnumbered}
@@ -13086,18 +11930,15 @@ Using a text editor, create a text document named `document.tex` with the
following content:
``` tex
\documentclass{article}
-\usepackage{markdown}
+\usepackage[smartEllipses]{markdown}
\markdownSetup{
renderers = {
- emphasis = {\emph{#1}},
- strongEmphasis = {\textbf{#1}},
+ ellipsis = \emph{SHAZAM}!,
},
}
\begin{document}
\begin{markdown}
-This is *emphasis*.
-
-This is **strong emphasis**.
+The secret word is ...
\end{markdown}
\end{document}
```````
@@ -13108,9 +11949,7 @@ lualatex document.tex
A PDF document named `document.pdf` should be produced and contain the
following text:
-> This is *emphasis*.
->
-> This is **strong emphasis**.
+> The secret word is *SHAZAM*!
##### \Hologo{ConTeXt} Example {.unnumbered}
@@ -13118,13 +11957,11 @@ Using a text editor, create a text document named `document.tex` with the
following content:
``` tex
\usemodule[t][markdown]
-\def\markdownRendererEmphasis#1{\emph{#1}}
-\def\markdownRendererStrongEmphasis#1{\bold{#1}}
+\setupmarkdown[smartEllipses = yes]
+\def\markdownRendererEllipsis{\emph{SHAZAM}!}
\starttext
\startmarkdown
-This is *emphasis*.
-
-This is **strong emphasis**.
+The secret word is ...
\stopmarkdown
\stoptext
```````
@@ -13135,90 +11972,26 @@ context document.tex
A PDF document named `document.pdf` should be produced and contain the
following text:
-> This is *emphasis*.
+> Hello *world*!
>
-> This is **strong emphasis**.
-
-%</manual-tokens>
-%<*tex>
-% \fi
-%
-% \begin{macrocode}
-\def\markdownRendererEmphasis{%
- \markdownRendererEmphasisPrototype}%
-\ExplSyntaxOn
-\seq_gput_right:Nn
- \g_@@_renderers_seq
- { emphasis }
-\prop_gput:Nnn
- \g_@@_renderer_arities_prop
- { emphasis }
- { 1 }
-\ExplSyntaxOff
-% \end{macrocode}
-% \par
-%
-% \iffalse
-%</tex>
-%<*manual-tokens>
-% \fi
-%
-% \begin{markdown}
-
-The \mdef{markdownRendererStrongEmphasis} macro represents a strongly
-emphasized span of text. The macro receives a single argument that
-corresponds to the emphasized span of text.
-
-% \end{markdown}
-%
-% \iffalse
-%</manual-tokens>
-%<*tex>
-% \fi
-%
-% \begin{macrocode}
-\def\markdownRendererStrongEmphasis{%
- \markdownRendererStrongEmphasisPrototype}%
-\ExplSyntaxOn
-\seq_gput_right:Nn
- \g_@@_renderers_seq
- { strongEmphasis }
-\prop_gput:Nnn
- \g_@@_renderer_arities_prop
- { strongEmphasis }
- { 1 }
-\ExplSyntaxOff
-% \end{macrocode}
-% \par
-%
-% \iffalse
-%</tex>
-%<*manual-tokens>
-% \fi
-%
-% \begin{markdown}
-
-#### Block Quote Renderers
-The \mdef{markdownRendererBlockQuoteBegin} macro represents the beginning of
-a block quote. The macro receives no arguments.
+> *(The end of a block)*
+>
+> _Foo_ bar!
-% \end{markdown}
-%
-% \iffalse
%</manual-tokens>
%<*tex>
% \fi
%
% \begin{macrocode}
-\def\markdownRendererBlockQuoteBegin{%
- \markdownRendererBlockQuoteBeginPrototype}%
+\def\markdownRendererEllipsis{%
+ \markdownRendererEllipsisPrototype}%
\ExplSyntaxOn
\seq_gput_right:Nn
\g_@@_renderers_seq
- { blockQuoteBegin }
+ { ellipsis }
\prop_gput:Nnn
\g_@@_renderer_arities_prop
- { blockQuoteBegin }
+ { ellipsis }
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
@@ -13231,8 +12004,10 @@ a block quote. The macro receives no arguments.
%
% \begin{markdown}
-The \mdef{markdownRendererBlockQuoteEnd} macro represents the end of a block
-quote. The macro receives no arguments.
+#### Emphasis Renderers
+The \mdef{markdownRendererEmphasis} macro represents an emphasized span of
+text. The macro receives a single argument that corresponds to the emphasized
+span of text.
% \end{markdown}
%
@@ -13244,24 +12019,12 @@ Using a text editor, create a text document named `document.tex` with the
following content:
``` tex
\input markdown
-\def\markdownRendererBlockQuoteBegin{%
- \begingroup
- \vskip\parindent
- \leftskip=2\parindent
- \parindent=0pt
-}
-\def\markdownRendererBlockQuoteEnd{%
- \par
- \vskip\parindent
- \endgroup
-}
+\def\markdownRendererEmphasis#1{{\it#1}}
+\def\markdownRendererStrongEmphasis#1{{\bf#1}}
\markdownBegin
-A quote from William Shakespeare's King Lear:
+This is *emphasis*.
-> This is the excellent foppery of the world that when we are
-> sick in fortune---often the surfeit of our own behavior---we
-> make guilty of our disasters the sun, the moon, and the
-> stars [...]
+This is **strong emphasis**.
\markdownEnd
\bye
```````
@@ -13272,12 +12035,9 @@ luatex document.tex
A PDF document named `document.pdf` should be produced and contain the
following text:
-> A quote from William Shakespeare's King Lear:
+> This is *emphasis*.
>
-> > This is the excellent foppery of the world that when we are
-> > sick in fortune—often the surfeit of our own behavior—we
-> > make guilty of our disasters the sun, the moon, and the
-> > stars [...]
+> This is **strong emphasis**.
##### \LaTeX{} Example {.unnumbered}
@@ -13288,18 +12048,15 @@ following content:
\usepackage{markdown}
\markdownSetup{
renderers = {
- blockQuoteBegin = {\begin{quote}},
- blockQuoteEnd = {\end{quote}},
+ emphasis = {\emph{#1}},
+ strongEmphasis = {\textbf{#1}},
},
}
\begin{document}
\begin{markdown}
-A quote from William Shakespeare's King Lear:
+This is *emphasis*.
-> This is the excellent foppery of the world that when we are
-> sick in fortune---often the surfeit of our own behavior---we
-> make guilty of our disasters the sun, the moon, and the
-> stars [...]
+This is **strong emphasis**.
\end{markdown}
\end{document}
```````
@@ -13310,12 +12067,9 @@ lualatex document.tex
A PDF document named `document.pdf` should be produced and contain the
following text:
-> A quote from William Shakespeare's King Lear:
+> This is *emphasis*.
>
-> > This is the excellent foppery of the world that when we are
-> > sick in fortune—often the surfeit of our own behavior—we
-> > make guilty of our disasters the sun, the moon, and the
-> > stars [...]
+> This is **strong emphasis**.
##### \Hologo{ConTeXt} Example {.unnumbered}
@@ -13323,16 +12077,13 @@ Using a text editor, create a text document named `document.tex` with the
following content:
``` tex
\usemodule[t][markdown]
-\def\markdownRendererBlockQuoteBegin{\startquotation}
-\def\markdownRendererBlockQuoteEnd{\stopquotation}
+\def\markdownRendererEmphasis#1{\emph{#1}}
+\def\markdownRendererStrongEmphasis#1{\bold{#1}}
\starttext
\startmarkdown
-A quote from William Shakespeare's King Lear:
+This is *emphasis*.
-> This is the excellent foppery of the world that when we are
-> sick in fortune---often the surfeit of our own behavior---we
-> make guilty of our disasters the sun, the moon, and the
-> stars [...]
+This is **strong emphasis**.
\stopmarkdown
\stoptext
```````
@@ -13343,28 +12094,25 @@ context document.tex
A PDF document named `document.pdf` should be produced and contain the
following text:
-> A quote from William Shakespeare's King Lear:
+> This is *emphasis*.
>
-> > This is the excellent foppery of the world that when we are
-> > sick in fortune—often the surfeit of our own behavior—we
-> > make guilty of our disasters the sun, the moon, and the
-> > stars [...]
+> This is **strong emphasis**.
%</manual-tokens>
%<*tex>
% \fi
%
% \begin{macrocode}
-\def\markdownRendererBlockQuoteEnd{%
- \markdownRendererBlockQuoteEndPrototype}%
+\def\markdownRendererEmphasis{%
+ \markdownRendererEmphasisPrototype}%
\ExplSyntaxOn
\seq_gput_right:Nn
\g_@@_renderers_seq
- { blockQuoteEnd }
+ { emphasis }
\prop_gput:Nnn
\g_@@_renderer_arities_prop
- { blockQuoteEnd }
- { 0 }
+ { emphasis }
+ { 1 }
\ExplSyntaxOff
% \end{macrocode}
% \par
@@ -13376,10 +12124,9 @@ following text:
%
% \begin{markdown}
-#### Code Block Renderers
-The \mdef{markdownRendererInputVerbatim} macro represents a code
-block. The macro receives a single argument that corresponds to the
-filename of a file contaning the code block contents.
+The \mdef{markdownRendererStrongEmphasis} macro represents a strongly
+emphasized span of text. The macro receives a single argument that
+corresponds to the emphasized span of text.
% \end{markdown}
%
@@ -13389,15 +12136,15 @@ filename of a file contaning the code block contents.
% \fi
%
% \begin{macrocode}
-\def\markdownRendererInputVerbatim{%
- \markdownRendererInputVerbatimPrototype}%
+\def\markdownRendererStrongEmphasis{%
+ \markdownRendererStrongEmphasisPrototype}%
\ExplSyntaxOn
\seq_gput_right:Nn
\g_@@_renderers_seq
- { inputVerbatim }
+ { strongEmphasis }
\prop_gput:Nnn
\g_@@_renderer_arities_prop
- { inputVerbatim }
+ { strongEmphasis }
{ 1 }
\ExplSyntaxOff
% \end{macrocode}
@@ -13410,10 +12157,14 @@ filename of a file contaning the code block contents.
%
% \begin{markdown}
-The \mdef{markdownRendererInputFencedCode} macro represents a fenced code
-block. This macro will only be produced, when the \Opt{fencedCode} option is
-enabled. The macro receives two arguments that correspond to the filename of
-a file contaning the code block contents and to the code fence infostring.
+#### Fenced Div Context Renderers
+The following macros are only produced, when the \Opt{fencedDiv} option is
+enabled.
+
+The \mdef{markdownRendererFencedDivAttributeContextBegin} and
+\mdef{markdownRendererFencedDivAttributeContextEnd} macros represent the beginning
+and the end of a div in which the attributes of the div apply. The macros
+receive no arguments.
% \end{markdown}
%
@@ -13425,49 +12176,42 @@ Using a text editor, create a text document named `document.tex` with the
following content:
``` tex
\documentclass{article}
-\usepackage{verbatim}
-\usepackage[hyphens]{url}
-\usepackage[fencedCode]{markdown}
+\usepackage[fencedDiv]{markdown}
\markdownSetup{
renderers = {
- interblockSeparator = {
- \def\markdownRendererInterblockSeparator{%
- \par
- \def\markdownRendererInterblockSeparator{%
- \def\markdownRendererInterblockSeparator{%
- \par
- }%
- }%
- }%
- },
- inputVerbatim = {
- is contained in file \url{#1}:%
- \verbatiminput{#1}%
+ fencedDivAttributeContextBegin = {%
+ \par
+ \emph{(The beginning of a fenced div attribute context)}
+ \par
},
- inputFencedCode = {
- in #2 \markdownRendererInputVerbatim{#1}%
+ fencedDivAttributeContextEnd = {%
+ \par
+ \emph{(The end of a fenced div attribute context)}
+ \par
},
},
}
\begin{document}
\begin{markdown}
-The following code
- def foo(bar):
- if len(bar) <= 1:
- return bar[0]
- elif len(bar) == 2:
- return sorted(bar)
- else:
- baz = len(bar) // 2
- return foo(bar[baz:], bar[:baz])
+::: {key=value}
-The following code
+foo
+
+:::: {#identifier}
+
+bar
+
+::::
+
+:::
+
+::: {.class_name}
+
+baz
+
+:::
-~~~ Python
->>> foo([4, 2, 1, 3])
-[1, 2, 3, 4]
-~~~~~~~~~~
\end{markdown}
\end{document}
```````
@@ -13476,78 +12220,51 @@ Next, invoke LuaTeX from the terminal:
lualatex document.tex
``````
A PDF document named `document.pdf` should be produced and contain the
-following text except for the filename, which may differ:
+following text:
-> The following code is contained in file
-> `./_markdown_document/882453149edcf288976647f6fe147ada.verbatim`:
-> ``` py
-> def foo(bar):
-> if len(bar) <= 1:
-> return bar[:1]
-> elif len(bar) == 2:
-> return sorted(bar)
-> else:
-> baz = bar[len(bar) // 2]
-> return (
-> foo([qux for qux in bar if qux < baz]) + [baz] +
-> foo([qux for qux in bar if qux > baz])
-> )
-> ``````
-> The following code in Python contained in file
-> `./_markdown_document/cf2a96e2120cef5b1fae5fea36fcc27b.verbatim`:
-> ``` py
-> >>> foo([4, 2, 1, 3])
-> [1, 2, 3, 4]
-> ``````
+> *(The beginning of a fenced div attribute context)*
+>
+> foo
+>
+> *(The beginning of a fenced div attribute context)*
+>
+> bar
+>
+> *(The end of a fenced div attribute context)*
+>
+> *(The end of a fenced div attribute context)*
+>
+> *(The beginning of a fenced div attribute context)*
+>
+> baz
+>
+> *(The end of a fenced div attribute context)*
%</manual-tokens>
%<*tex>
% \fi
%
% \begin{macrocode}
-\def\markdownRendererInputFencedCode{%
- \markdownRendererInputFencedCodePrototype}%
+\def\markdownRendererFencedDivAttributeContextBegin{%
+ \markdownRendererFencedDivAttributeContextBeginPrototype}%
\ExplSyntaxOn
\seq_gput_right:Nn
\g_@@_renderers_seq
- { inputFencedCode }
+ { fencedDivAttributeContextBegin }
\prop_gput:Nnn
\g_@@_renderer_arities_prop
- { inputFencedCode }
- { 2 }
+ { fencedDivAttributeContextBegin }
+ { 0 }
\ExplSyntaxOff
-% \end{macrocode}
-% \par
-%
-% \iffalse
-%</tex>
-%<*manual-tokens>
-% \fi
-% \begin{markdown}
-
-#### YAML Metadata Renderers {#yamlmetadatarenderers}
-
-The \mdef{markdownRendererJekyllDataBegin} macro represents the beginning of a
-\acro{yaml} document. This macro will only be produced when the \Opt{jekyllData}
-option is enabled. The macro receives no arguments.
-
-% \end{markdown}
-%
-% \iffalse
-%</manual-tokens>
-%<*tex>
-% \fi
-%
-% \begin{macrocode}
-\def\markdownRendererJekyllDataBegin{%
- \markdownRendererJekyllDataBeginPrototype}%
+\def\markdownRendererFencedDivAttributeContextEnd{%
+ \markdownRendererFencedDivAttributeContextEndPrototype}%
\ExplSyntaxOn
\seq_gput_right:Nn
\g_@@_renderers_seq
- { jekyllDataBegin }
+ { fencedDivAttributeContextEnd }
\prop_gput:Nnn
\g_@@_renderer_arities_prop
- { jekyllDataBegin }
+ { fencedDivAttributeContextEnd }
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
@@ -13560,95 +12277,98 @@ option is enabled. The macro receives no arguments.
%
% \begin{markdown}
-The \mdef{markdownRendererJekyllDataEnd} macro represents the end of a
-\acro{yaml} document. This macro will only be produced when the
-\Opt{jekyllData} option is enabled. The macro receives no arguments.
+#### Header Attribute Context Renderers
+The following macros are only produced, when the \Opt{headerAttributes} option
+is enabled.
+
+The \mdef{markdownRendererHeaderAttributeContextBegin} and
+\mdef{markdownRendererHeaderAttributeContextEnd} macros represent the beginning
+and the end of a section in which the attributes of a heading apply. The macros
+receive no arguments.
% \end{markdown}
%
% \iffalse
-%</manual-tokens>
-%<*tex>
-% \fi
-%
-% \begin{macrocode}
-\def\markdownRendererJekyllDataEnd{%
- \markdownRendererJekyllDataEndPrototype}%
-\ExplSyntaxOn
-\seq_gput_right:Nn
- \g_@@_renderers_seq
- { jekyllDataEnd }
-\prop_gput:Nnn
- \g_@@_renderer_arities_prop
- { jekyllDataEnd }
- { 0 }
-\ExplSyntaxOff
-% \end{macrocode}
-% \par
-%
-% \iffalse
-%</tex>
-%<*manual-tokens>
-% \fi
-%
-% \begin{markdown}
-The \mdef{markdownRendererJekyllDataMappingBegin} macro represents the
-beginning of a mapping in a \acro{yaml} document. This macro will only be
-produced when the \Opt{jekyllData} option is enabled. The macro receives two
-arguments: the scalar key in the parent structure, cast to a string following
-\acro{yaml} serialization rules, and the number of items in the mapping.
+##### \LaTeX{} Example {.unnumbered}
+
+Using a text editor, create a text document named `document.tex` with the
+following content:
+``` tex
+\documentclass{article}
+\usepackage[headerAttributes]{markdown}
+\markdownSetup{
+ renderers = {
+ headerAttributeContextBegin = {%
+ \par
+ \emph{(The beginning of a header attribute context)}
+ \par
+ },
+ headerAttributeContextEnd = {%
+ \par
+ \emph{(The end of a header attribute context)}
+ \par
+ },
+ },
+}
+\begin{document}
+\begin{markdown}
+
+# First top-level heading
+
+## A subheading {#identifier}
+
+# Second top-level heading {.class_name}
+
+\end{markdown}
+\end{document}
+```````
+Next, invoke LuaTeX from the terminal:
+``` sh
+lualatex document.tex
+``````
+A PDF document named `document.pdf` should be produced and contain the
+following text:
+
+> # First top-level heading
+>
+> *(The beginning of a header attribute context)*
+>
+> ## A subheading
+>
+> *(The end of a header attribute context)*
+>
+> *(The beginning of a header attribute context)*
+>
+> # Second top-level heading
+>
+> *(The end of a header attribute context)*
-% \end{markdown}
-%
-% \iffalse
%</manual-tokens>
%<*tex>
% \fi
%
% \begin{macrocode}
-\def\markdownRendererJekyllDataMappingBegin{%
- \markdownRendererJekyllDataMappingBeginPrototype}%
+\def\markdownRendererHeaderAttributeContextBegin{%
+ \markdownRendererHeaderAttributeContextBeginPrototype}%
\ExplSyntaxOn
\seq_gput_right:Nn
\g_@@_renderers_seq
- { jekyllDataMappingBegin }
+ { headerAttributeContextBegin }
\prop_gput:Nnn
\g_@@_renderer_arities_prop
- { jekyllDataMappingBegin }
- { 2 }
+ { headerAttributeContextBegin }
+ { 0 }
\ExplSyntaxOff
-% \end{macrocode}
-% \par
-%
-% \iffalse
-%</tex>
-%<*manual-tokens>
-% \fi
-%
-% \begin{markdown}
-
-The \mdef{markdownRendererJekyllDataMappingEnd} macro represents the
-end of a mapping in a \acro{yaml} document. This macro will only be produced
-when the \Opt{jekyllData} option is enabled. The macro receives no arguments.
-
-% \end{markdown}
-%
-% \iffalse
-%</manual-tokens>
-%<*tex>
-% \fi
-%
-% \begin{macrocode}
-\def\markdownRendererJekyllDataMappingEnd{%
- \markdownRendererJekyllDataMappingEndPrototype}%
+\def\markdownRendererHeaderAttributeContextEnd{%
+ \markdownRendererHeaderAttributeContextEndPrototype}%
\ExplSyntaxOn
\seq_gput_right:Nn
\g_@@_renderers_seq
- { jekyllDataMappingEnd }
+ { headerAttributeContextEnd }
\prop_gput:Nnn
\g_@@_renderer_arities_prop
- { jekyllDataMappingEnd }
+ { headerAttributeContextEnd }
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
@@ -13661,11 +12381,9 @@ when the \Opt{jekyllData} option is enabled. The macro receives no arguments.
%
% \begin{markdown}
-The \mdef{markdownRendererJekyllDataSequenceBegin} macro represents the
-beginning of a sequence in a \acro{yaml} document. This macro will only be
-produced when the \Opt{jekyllData} option is enabled. The macro receives two
-arguments: the scalar key in the parent structure, cast to a string following
-\acro{yaml} serialization rules, and the number of items in the sequence.
+#### Heading Renderers
+The \mdef{markdownRendererHeadingOne} macro represents a first level heading.
+The macro receives a single argument that corresponds to the heading text.
% \end{markdown}
%
@@ -13675,16 +12393,16 @@ arguments: the scalar key in the parent structure, cast to a string following
% \fi
%
% \begin{macrocode}
-\def\markdownRendererJekyllDataSequenceBegin{%
- \markdownRendererJekyllDataSequenceBeginPrototype}%
+\def\markdownRendererHeadingOne{%
+ \markdownRendererHeadingOnePrototype}%
\ExplSyntaxOn
\seq_gput_right:Nn
\g_@@_renderers_seq
- { jekyllDataSequenceBegin }
+ { headingOne }
\prop_gput:Nnn
\g_@@_renderer_arities_prop
- { jekyllDataSequenceBegin }
- { 2 }
+ { headingOne }
+ { 1 }
\ExplSyntaxOff
% \end{macrocode}
% \par
@@ -13696,9 +12414,9 @@ arguments: the scalar key in the parent structure, cast to a string following
%
% \begin{markdown}
-The \mdef{markdownRendererJekyllDataSequenceEnd} macro represents the
-end of a sequence in a \acro{yaml} document. This macro will only be produced
-when the \Opt{jekyllData} option is enabled. The macro receives no arguments.
+The \mdef{markdownRendererHeadingTwo} macro represents a second level
+heading. The macro receives a single argument that corresponds to the heading
+text.
% \end{markdown}
%
@@ -13708,16 +12426,16 @@ when the \Opt{jekyllData} option is enabled. The macro receives no arguments.
% \fi
%
% \begin{macrocode}
-\def\markdownRendererJekyllDataSequenceEnd{%
- \markdownRendererJekyllDataSequenceEndPrototype}%
+\def\markdownRendererHeadingTwo{%
+ \markdownRendererHeadingTwoPrototype}%
\ExplSyntaxOn
\seq_gput_right:Nn
\g_@@_renderers_seq
- { jekyllDataSequenceEnd }
+ { headingTwo }
\prop_gput:Nnn
\g_@@_renderer_arities_prop
- { jekyllDataSequenceEnd }
- { 0 }
+ { headingTwo }
+ { 1 }
\ExplSyntaxOff
% \end{macrocode}
% \par
@@ -13729,11 +12447,9 @@ when the \Opt{jekyllData} option is enabled. The macro receives no arguments.
%
% \begin{markdown}
-The \mdef{markdownRendererJekyllDataBoolean} macro represents a boolean scalar
-value in a \acro{yaml} document. This macro will only be produced when the
-\Opt{jekyllData} option is enabled. The macro receives two arguments: the
-scalar key in the parent structure, and the scalar value, both cast to a string
-following \acro{yaml} serialization rules.
+The \mdef{markdownRendererHeadingThree} macro represents a third level
+heading. The macro receives a single argument that corresponds to the heading
+text.
% \end{markdown}
%
@@ -13743,16 +12459,16 @@ following \acro{yaml} serialization rules.
% \fi
%
% \begin{macrocode}
-\def\markdownRendererJekyllDataBoolean{%
- \markdownRendererJekyllDataBooleanPrototype}%
+\def\markdownRendererHeadingThree{%
+ \markdownRendererHeadingThreePrototype}%
\ExplSyntaxOn
\seq_gput_right:Nn
\g_@@_renderers_seq
- { jekyllDataBoolean }
+ { headingThree }
\prop_gput:Nnn
\g_@@_renderer_arities_prop
- { jekyllDataBoolean }
- { 2 }
+ { headingThree }
+ { 1 }
\ExplSyntaxOff
% \end{macrocode}
% \par
@@ -13764,11 +12480,9 @@ following \acro{yaml} serialization rules.
%
% \begin{markdown}
-The \mdef{markdownRendererJekyllDataNumber} macro represents a numeric scalar
-value in a \acro{yaml} document. This macro will only be produced when the
-\Opt{jekyllData} option is enabled. The macro receives two arguments: the
-scalar key in the parent structure, and the scalar value, both cast to a string
-following \acro{yaml} serialization rules.
+The \mdef{markdownRendererHeadingFour} macro represents a fourth level
+heading. The macro receives a single argument that corresponds to the heading
+text.
% \end{markdown}
%
@@ -13778,16 +12492,16 @@ following \acro{yaml} serialization rules.
% \fi
%
% \begin{macrocode}
-\def\markdownRendererJekyllDataNumber{%
- \markdownRendererJekyllDataNumberPrototype}%
+\def\markdownRendererHeadingFour{%
+ \markdownRendererHeadingFourPrototype}%
\ExplSyntaxOn
\seq_gput_right:Nn
\g_@@_renderers_seq
- { jekyllDataNumber }
+ { headingFour }
\prop_gput:Nnn
\g_@@_renderer_arities_prop
- { jekyllDataNumber }
- { 2 }
+ { headingFour }
+ { 1 }
\ExplSyntaxOff
% \end{macrocode}
% \par
@@ -13799,11 +12513,9 @@ following \acro{yaml} serialization rules.
%
% \begin{markdown}
-The \mdef{markdownRendererJekyllDataString} macro represents a string scalar
-value in a \acro{yaml} document. This macro will only be produced when the
-\Opt{jekyllData} option is enabled. The macro receives two arguments: the
-scalar key in the parent structure, cast to a string following \acro{yaml}
-serialization rules, and the scalar value.
+The \mdef{markdownRendererHeadingFive} macro represents a fifth level
+heading. The macro receives a single argument that corresponds to the heading
+text.
% \end{markdown}
%
@@ -13813,16 +12525,16 @@ serialization rules, and the scalar value.
% \fi
%
% \begin{macrocode}
-\def\markdownRendererJekyllDataString{%
- \markdownRendererJekyllDataStringPrototype}%
+\def\markdownRendererHeadingFive{%
+ \markdownRendererHeadingFivePrototype}%
\ExplSyntaxOn
\seq_gput_right:Nn
\g_@@_renderers_seq
- { jekyllDataString }
+ { headingFive }
\prop_gput:Nnn
\g_@@_renderer_arities_prop
- { jekyllDataString }
- { 2 }
+ { headingFive }
+ { 1 }
\ExplSyntaxOff
% \end{macrocode}
% \par
@@ -13834,41 +12546,13 @@ serialization rules, and the scalar value.
%
% \begin{markdown}
-The \mdef{markdownRendererJekyllDataEmpty} macro represents an empty scalar
-value in a \acro{yaml} document. This macro will only be produced when the
-\Opt{jekyllData} option is enabled. The macro receives one argument: the
-scalar key in the parent structure, cast to a string following \acro{yaml}
-serialization rules.
+The \mdef{markdownRendererHeadingSix} macro represents a sixth level
+heading. The macro receives a single argument that corresponds to the heading
+text.
-% See also Section <#sec:expl3yamlmetadata> for the description of the
-% high-level expl3 interface that you can also use to react to \acro{yaml}
-% metadata.
-%
% \end{markdown}
%
% \iffalse
-%</manual-tokens>
-%<*tex>
-% \fi
-%
-% \begin{macrocode}
-\def\markdownRendererJekyllDataEmpty{%
- \markdownRendererJekyllDataEmptyPrototype}%
-\ExplSyntaxOn
-\seq_gput_right:Nn
- \g_@@_renderers_seq
- { jekyllDataEmpty }
-\prop_gput:Nnn
- \g_@@_renderer_arities_prop
- { jekyllDataEmpty }
- { 1 }
-\ExplSyntaxOff
-% \end{macrocode}
-% \par
-%
-% \iffalse
-%</tex>
-%<*manual-tokens>
##### Plain \TeX{} Example {.unnumbered}
@@ -13876,16 +12560,19 @@ Using a text editor, create a text document named `document.tex` with the
following content:
``` tex
\input markdown
-\def\markdownOptionJekyllData{true}
-\def\markdownRendererJekyllDataString#1#2{\gdef\name{#2}}
-\def\markdownRendererJekyllDataNumber#1#2{\gdef\age{#2}}
-\def\markdownRendererJekyllDataEnd{%
- \name{} is \age{} years old.}
+\def\markdownRendererInterblockSeparator{}
+\def\markdownRendererHeadingOne{1}
+\def\markdownRendererHeadingTwo{2}
+\def\markdownRendererHeadingThree{3}
+\def\markdownRendererHeadingFour{4}
+\def\markdownRendererHeadingFive{5}
+\def\markdownRendererHeadingSix{6}
\markdownBegin
----
-name: Jane Doe
-age: 99
----
+######
+#####
+#####
+###
+######
\markdownEnd
\bye
```````
@@ -13896,7 +12583,7 @@ luatex document.tex
A PDF document named `document.pdf` should be produced and contain the
following text:
-> Jane Doe is 99 years old.
+> 65536
##### \LaTeX{} Example {.unnumbered}
@@ -13904,23 +12591,26 @@ Using a text editor, create a text document named `document.tex` with the
following content:
``` tex
\documentclass{article}
-\usepackage[jekyllData]{markdown}
+\usepackage{markdown}
\markdownSetup{
renderers = {
- jekyllDataString = {\gdef\name{#2}},
- jekyllDataNumber = {\gdef\age{#2}},
- jekyllDataEnd = {\name{} is \age{} years old.},
- }
+ interblockSeparator = {},
+ headingOne = 1,
+ headingTwo = 2,
+ headingThree = 3,
+ headingFour = 4,
+ headingFive = 5,
+ headingSix = 6,
+ },
}
\begin{document}
-
\begin{markdown}
----
-name: Jane Doe
-age: 99
----
+######
+#####
+#####
+###
+######
\end{markdown}
-
\end{document}
```````
Next, invoke LuaTeX from the terminal:
@@ -13930,7 +12620,7 @@ lualatex document.tex
A PDF document named `document.pdf` should be produced and contain the
following text:
-> Jane Doe is 99 years old.
+> 65536
##### \Hologo{ConTeXt} Example {.unnumbered}
@@ -13938,20 +12628,21 @@ Using a text editor, create a text document named `document.tex` with the
following content:
``` tex
\usemodule[t][markdown]
-\setupmarkdown[jekyllData = yes]
-\def\markdownRendererJekyllDataString#1#2{\gdef\name{#2}}
-\def\markdownRendererJekyllDataNumber#1#2{\gdef\age{#2}}
-\def\markdownRendererJekyllDataEnd{%
- \name{} is \age{} years old.}
+\def\markdownRendererInterblockSeparator{}
+\def\markdownRendererHeadingOne{1}
+\def\markdownRendererHeadingTwo{2}
+\def\markdownRendererHeadingThree{3}
+\def\markdownRendererHeadingFour{4}
+\def\markdownRendererHeadingFive{5}
+\def\markdownRendererHeadingSix{6}
\starttext
-
\startmarkdown
----
-name: Jane Doe
-age: 99
----
+######
+#####
+#####
+###
+######
\stopmarkdown
-
\stoptext
```````
Next, invoke LuaTeX from the terminal:
@@ -13961,33 +12652,22 @@ context document.tex
A PDF document named `document.pdf` should be produced and contain the
following text:
-> Jane Doe is 99 years old.
-
-% \fi
-%
-% \begin{markdown}
-
-#### Heading Renderers
-The \mdef{markdownRendererHeadingOne} macro represents a first level heading.
-The macro receives a single argument that corresponds to the heading text.
+> 65536
-% \end{markdown}
-%
-% \iffalse
%</manual-tokens>
%<*tex>
% \fi
%
% \begin{macrocode}
-\def\markdownRendererHeadingOne{%
- \markdownRendererHeadingOnePrototype}%
+\def\markdownRendererHeadingSix{%
+ \markdownRendererHeadingSixPrototype}%
\ExplSyntaxOn
\seq_gput_right:Nn
\g_@@_renderers_seq
- { headingOne }
+ { headingSix }
\prop_gput:Nnn
\g_@@_renderer_arities_prop
- { headingOne }
+ { headingSix }
{ 1 }
\ExplSyntaxOff
% \end{macrocode}
@@ -14000,29 +12680,112 @@ The macro receives a single argument that corresponds to the heading text.
%
% \begin{markdown}
-The \mdef{markdownRendererHeadingTwo} macro represents a second level
-heading. The macro receives a single argument that corresponds to the heading
-text.
+#### HTML Comment Renderers
+
+The \mdef{markdownRendererInlineHtmlComment} macro represents the contents of an
+inline \acro{HTML} comment. This macro will only be produced, when the
+\Opt{html} option is enabled. The macro receives a single argument that
+corresponds to the contents of the \acro{HTML} comment.
+
+The \mdef{markdownRendererBlockHtmlCommentBegin} and
+\mdef{markdownRendererBlockHtmlCommentEnd} macros represent the beginning
+and the end of a block \acro{HTML} comment. The macros receive no arguments.
% \end{markdown}
%
% \iffalse
+
+##### \LaTeX{} Example {.unnumbered}
+
+Using a text editor, create a text document named `document.tex` with the
+following content:
+``` tex
+\documentclass{article}
+\usepackage[html]{markdown}
+\usepackage{marginnote}
+\markdownSetup{
+ renderers = {
+ inlineHtmlComment = {\marginnote{#1}},
+ blockHtmlCommentBegin = {\begin{quote}},
+ blockHtmlCommentEnd = {\end{quote}},
+ },
+}
+\begin{document}
+\begin{markdown}
+A useful use of inline HTML comments are side notes.
+<!-- Side notes are displayed in the horizontal margins next to the relevant
+passages, which makes them *easier for the reader to find* than notes. -->
+
+We can render block HTML comments as blockquotes:
+
+<!--
+Here is a block HTML comment with a code example that a programmer might understand:
+
+ foo = bar + baz - 42
+-->
+\end{markdown}
+\end{document}
+```````
+Next, invoke LuaTeX from the terminal:
+``` sh
+lualatex document.tex
+lualatex document.tex
+``````
+A PDF document named `document.pdf` should be produced and contain the
+following body text:
+
+> A useful use of HTML comments are side notes.
+>
+> We can render block HTML comments as blockquotes:
+>
+> > Here is a block HTML comment with a code example that a programmer might
+> > understand:
+> >
+> > foo = bar + baz - 42
+
+The horizontal margins should contain the following text:
+
+> Side notes are displayed in the horizontal margins next to the relevant
+> passages, which makes them *easier for the reader to find* than notes.
+
%</manual-tokens>
%<*tex>
% \fi
%
% \begin{macrocode}
-\def\markdownRendererHeadingTwo{%
- \markdownRendererHeadingTwoPrototype}%
+\def\markdownRendererInlineHtmlComment{%
+ \markdownRendererInlineHtmlCommentPrototype}%
\ExplSyntaxOn
\seq_gput_right:Nn
\g_@@_renderers_seq
- { headingTwo }
+ { inlineHtmlComment }
\prop_gput:Nnn
\g_@@_renderer_arities_prop
- { headingTwo }
+ { inlineHtmlComment }
{ 1 }
\ExplSyntaxOff
+\def\markdownRendererBlockHtmlCommentBegin{%
+ \markdownRendererBlockHtmlCommentBeginPrototype}%
+\ExplSyntaxOn
+\seq_gput_right:Nn
+ \g_@@_renderers_seq
+ { blockHtmlCommentBegin }
+\prop_gput:Nnn
+ \g_@@_renderer_arities_prop
+ { blockHtmlCommentBegin }
+ { 0 }
+\ExplSyntaxOff
+\def\markdownRendererBlockHtmlCommentEnd{%
+ \markdownRendererBlockHtmlCommentEndPrototype}%
+\ExplSyntaxOn
+\seq_gput_right:Nn
+ \g_@@_renderers_seq
+ { blockHtmlCommentEnd }
+\prop_gput:Nnn
+ \g_@@_renderer_arities_prop
+ { blockHtmlCommentEnd }
+ { 0 }
+\ExplSyntaxOff
% \end{macrocode}
% \par
%
@@ -14033,27 +12796,82 @@ text.
%
% \begin{markdown}
-The \mdef{markdownRendererHeadingThree} macro represents a third level
-heading. The macro receives a single argument that corresponds to the heading
-text.
+#### HTML Tag and Element Renderers
+
+The \mdef{markdownRendererInlineHtmlTag} macro represents an opening, closing,
+or empty inline \acro{HTML} tag. This macro will only be produced, when the
+\Opt{html} option is enabled. The macro receives a single argument that
+corresponds to the contents of the \acro{HTML} tag.
+
+The \mdef{markdownRendererInputBlockHtmlElement} macro represents a block
+\acro{HTML} element. This macro will only be produced, when the \Opt{html}
+option is enabled. The macro receives a single argument that filename of a file
+containing the contents of the \acro{HTML} element.
% \end{markdown}
%
% \iffalse
+
+##### \LaTeX{} Example {.unnumbered}
+
+Using a text editor, create a text document named `document.tex` with the
+following content:
+``` tex
+\documentclass{article}
+\usepackage[html]{markdown}
+\usepackage{marginnote}
+\usepackage{verbatim}
+\markdownSetup{
+ renderers = {
+ inlineHtmlTag = {\textbf{#1}},
+ inputBlockHtmlElement = {\verbatiminput{#1}},
+ },
+}
+\begin{document}
+\begin{markdown}
+<b>_Hello,_ world!</b><br/>
+
+<div>_Hello,_ world!</div>
+\end{markdown}
+\end{document}
+```````
+Next, invoke LuaTeX from the terminal:
+``` sh
+lualatex document.tex
+lualatex document.tex
+``````
+A PDF document named `document.pdf` should be produced and contain the
+following body text:
+
+> **<b>**_Hello,_ world!**</b><br/>**
+>
+> <div>_Hello,_ world!</div>
+
%</manual-tokens>
%<*tex>
% \fi
%
% \begin{macrocode}
-\def\markdownRendererHeadingThree{%
- \markdownRendererHeadingThreePrototype}%
+\def\markdownRendererInlineHtmlTag{%
+ \markdownRendererInlineHtmlTagPrototype}%
\ExplSyntaxOn
\seq_gput_right:Nn
\g_@@_renderers_seq
- { headingThree }
+ { inlineHtmlTag }
\prop_gput:Nnn
\g_@@_renderer_arities_prop
- { headingThree }
+ { inlineHtmlTag }
+ { 1 }
+\ExplSyntaxOff
+\def\markdownRendererInputBlockHtmlElement{%
+ \markdownRendererInputBlockHtmlElementPrototype}%
+\ExplSyntaxOn
+\seq_gput_right:Nn
+ \g_@@_renderers_seq
+ { inputBlockHtmlElement }
+\prop_gput:Nnn
+ \g_@@_renderer_arities_prop
+ { inputBlockHtmlElement }
{ 1 }
\ExplSyntaxOff
% \end{macrocode}
@@ -14066,28 +12884,85 @@ text.
%
% \begin{markdown}
-The \mdef{markdownRendererHeadingFour} macro represents a fourth level
-heading. The macro receives a single argument that corresponds to the heading
-text.
+#### Image Renderer
+The \mdef{markdownRendererImage} macro represents an image. It receives
+four arguments: the label, the fully escaped \acro{uri} that can be directly
+typeset, the raw \acro{uri} that can be used outside typesetting, and the
+title of the link.
% \end{markdown}
%
% \iffalse
+
+##### \LaTeX{} Example {.unnumbered}
+
+Using a text editor, create a text document named `document.tex` with the
+following content:
+``` tex
+\documentclass{article}
+\usepackage{markdown}
+\begingroup
+\catcode`\@=11
+\catcode`\%=12
+\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/.*[.]//')";
+ if ! [ -e "$OUTPUT" ]; then
+ wget -O "$OUTPUT" '#3' || rm "$OUTPUT";
+ convert "$OUTPUT" png:"$OUTPUT";
+ fi;
+ printf '%s%%' "$OUTPUT" > \jobname.fetched;
+ else
+ printf '%s%%' "#3" > \jobname.fetched;
+ fi^^A
+```
+``` tex
+ }^^A
+ {^^A
+ \everyeof={\noexpand}^^A
+ \edef\filename{\@@input"\jobname.fetched" }^^A
+ \includegraphics[width=\textwidth]{\filename}^^A
+ }^^A
+}
+\endgroup
+\begin{document}
+\begin{markdown}
+![TUGboat](https://tug.org/tugboat/noword.jpg)
+\end{markdown}
+\end{document}
+``````
+Next, invoke LuaTeX from the terminal:
+``` sh
+lualatex --shell-escape document.tex
+``````
+A PDF document named `document.pdf` should be produced and contain the
+following 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 `md5sum`, `wget`, and `convert` binaries are installed and
+that the \TeX{} engine has shell access.
+
+> ![TUGboat](https://tug.org/tugboat/noword.jpg "The Communications of the TeX Users Group")
+
%</manual-tokens>
%<*tex>
% \fi
%
% \begin{macrocode}
-\def\markdownRendererHeadingFour{%
- \markdownRendererHeadingFourPrototype}%
+\def\markdownRendererImage{%
+ \markdownRendererImagePrototype}%
\ExplSyntaxOn
\seq_gput_right:Nn
\g_@@_renderers_seq
- { headingFour }
+ { image }
\prop_gput:Nnn
\g_@@_renderer_arities_prop
- { headingFour }
- { 1 }
+ { image }
+ { 4 }
\ExplSyntaxOff
% \end{macrocode}
% \par
@@ -14099,28 +12974,129 @@ text.
%
% \begin{markdown}
-The \mdef{markdownRendererHeadingFive} macro represents a fifth level
-heading. The macro receives a single argument that corresponds to the heading
-text.
+#### Interblock Separator Renderer
+The \mdef{markdownRendererInterblockSeparator} macro represents a separator
+between two markdown block elements. The macro receives no arguments.
% \end{markdown}
%
% \iffalse
+
+##### Plain \TeX{} Example {.unnumbered}
+
+Using a text editor, create a text document named `document.tex` with the
+following content:
+``` tex
+\input markdown
+\def\markdownRendererInterblockSeparator{%
+ \par
+ {\it(The end of a block)}%
+ \par
+}
+\markdownBegin
+Hello *world*!
+
+_Foo_ bar!
+\markdownEnd
+\bye
+```````
+Next, invoke LuaTeX from the terminal:
+``` sh
+luatex document.tex
+``````
+A PDF document named `document.pdf` should be produced and contain the
+following text:
+
+> Hello *world*!
+>
+> *(The end of a block)*
+>
+> _Foo_ bar!
+
+##### \LaTeX{} Example {.unnumbered}
+
+Using a text editor, create a text document named `document.tex` with the
+following content:
+``` tex
+\documentclass{article}
+\usepackage{markdown}
+\markdownSetup{
+ renderers = {
+ interblockSeparator = {%
+ \par
+ \emph{(The end of a block)}%
+ \par
+ },
+ },
+}
+\begin{document}
+\begin{markdown}
+Hello *world*!
+
+_Foo_ bar!
+\end{markdown}
+\end{document}
+```````
+Next, invoke LuaTeX from the terminal:
+``` sh
+lualatex document.tex
+``````
+A PDF document named `document.pdf` should be produced and contain the
+following text:
+
+> Hello *world*!
+>
+> *(The end of a block)*
+>
+> _Foo_ bar!
+
+##### \Hologo{ConTeXt} Example {.unnumbered}
+
+Using a text editor, create a text document named `document.tex` with the
+following content:
+``` tex
+\usemodule[t][markdown]
+\def\markdownRendererInterblockSeparator{%
+ \par
+ \emph{(The end of a block)}%
+ \par
+}
+\starttext
+\startmarkdown
+Hello *world*!
+
+_Foo_ bar!
+\stopmarkdown
+\stoptext
+```````
+Next, invoke LuaTeX from the terminal:
+``` sh
+context document.tex
+``````
+A PDF document named `document.pdf` should be produced and contain the
+following text:
+
+> Hello *world*!
+>
+> *(The end of a block)*
+>
+> _Foo_ bar!
+
%</manual-tokens>
%<*tex>
% \fi
%
% \begin{macrocode}
-\def\markdownRendererHeadingFive{%
- \markdownRendererHeadingFivePrototype}%
+\def\markdownRendererInterblockSeparator{%
+ \markdownRendererInterblockSeparatorPrototype}%
\ExplSyntaxOn
\seq_gput_right:Nn
\g_@@_renderers_seq
- { headingFive }
+ { interblockSeparator }
\prop_gput:Nnn
\g_@@_renderer_arities_prop
- { headingFive }
- { 1 }
+ { interblockSeparator }
+ { 0 }
\ExplSyntaxOff
% \end{macrocode}
% \par
@@ -14132,9 +13108,9 @@ text.
%
% \begin{markdown}
-The \mdef{markdownRendererHeadingSix} macro represents a sixth level
-heading. The macro receives a single argument that corresponds to the heading
-text.
+#### Line Break Renderer
+The \mdef{markdownRendererLineBreak} macro represents a forced line break.
+The macro receives no arguments.
% \end{markdown}
%
@@ -14146,22 +13122,22 @@ Using a text editor, create a text document named `document.tex` with the
following content:
``` tex
\input markdown
-\def\markdownRendererInterblockSeparator{}
-\def\markdownRendererHeadingOne{1}
-\def\markdownRendererHeadingTwo{2}
-\def\markdownRendererHeadingThree{3}
-\def\markdownRendererHeadingFour{4}
-\def\markdownRendererHeadingFive{5}
-\def\markdownRendererHeadingSix{6}
-\markdownBegin
-######
-#####
-#####
-###
-######
-\markdownEnd
+\def\markdownRendererLineBreak{%
+ \par
+ {\it(A forced linebreak)}%
+ \par
+}
+\markdownInput{example.md}
\bye
```````
+Using a text editor, create a text document named `example.md` with the
+following content. Note the two spaces at the end of the first line, which
+specify a hard linebreak. Due to the limitations of the \TeX{} input
+processor, hard linebreaks would be ignored if we typed them directly into the
+`document.tex` document.
+
+<pre><code>Hello world! <br/>_Foo_ bar!</code></pre>
+
Next, invoke LuaTeX from the terminal:
``` sh
luatex document.tex
@@ -14169,7 +13145,11 @@ luatex document.tex
A PDF document named `document.pdf` should be produced and contain the
following text:
-> 65536
+> Hello *world*!
+>
+> *(A forced linebreak)*
+>
+> _Foo_ bar!
##### \LaTeX{} Example {.unnumbered}
@@ -14180,25 +13160,25 @@ following content:
\usepackage{markdown}
\markdownSetup{
renderers = {
- interblockSeparator = {},
- headingOne = 1,
- headingTwo = 2,
- headingThree = 3,
- headingFour = 4,
- headingFive = 5,
- headingSix = 6,
+ lineBreak = {%
+ \par
+ \emph{(A forced linebreak)}%
+ \par
+ },
},
}
\begin{document}
-\begin{markdown}
-######
-#####
-#####
-###
-######
-\end{markdown}
+\markdownInput{example.md}
\end{document}
```````
+Using a text editor, create a text document named `example.md` with the
+following content. Note the two spaces at the end of the first line, which
+specify a hard linebreak. Due to the limitations of the \TeX{} input
+processor, hard linebreaks would be ignored if we typed them directly into the
+`document.tex` document.
+
+<pre><code>Hello world! <br/>_Foo_ bar!</code></pre>
+
Next, invoke LuaTeX from the terminal:
``` sh
lualatex document.tex
@@ -14206,7 +13186,11 @@ lualatex document.tex
A PDF document named `document.pdf` should be produced and contain the
following text:
-> 65536
+> Hello *world*!
+>
+> *(A forced linebreak)*
+>
+> _Foo_ bar!
##### \Hologo{ConTeXt} Example {.unnumbered}
@@ -14214,47 +13198,51 @@ Using a text editor, create a text document named `document.tex` with the
following content:
``` tex
\usemodule[t][markdown]
-\def\markdownRendererInterblockSeparator{}
-\def\markdownRendererHeadingOne{1}
-\def\markdownRendererHeadingTwo{2}
-\def\markdownRendererHeadingThree{3}
-\def\markdownRendererHeadingFour{4}
-\def\markdownRendererHeadingFive{5}
-\def\markdownRendererHeadingSix{6}
+\def\markdownRendererLineBreak{%
+ \par
+ \emph{(A forced linebreak)}%
+ \par
+}
\starttext
-\startmarkdown
-######
-#####
-#####
-###
-######
-\stopmarkdown
+\markdownInput{example.md}
\stoptext
```````
+Using a text editor, create a text document named `example.md` with the
+following content. Note the two spaces at the end of the first line, which
+specify a hard linebreak. Due to the limitations of the \TeX{} input
+processor, hard linebreaks would be ignored if we typed them directly into the
+`document.tex` document.
+
+<pre><code>Hello world! <br/>_Foo_ bar!</code></pre>
+
Next, invoke LuaTeX from the terminal:
``` sh
-context document.tex
+luatex document.tex
``````
A PDF document named `document.pdf` should be produced and contain the
following text:
-> 65536
+> Hello *world*!
+>
+> *(A forced linebreak)*
+>
+> _Foo_ bar!
%</manual-tokens>
%<*tex>
% \fi
%
% \begin{macrocode}
-\def\markdownRendererHeadingSix{%
- \markdownRendererHeadingSixPrototype}%
+\def\markdownRendererLineBreak{%
+ \markdownRendererLineBreakPrototype}%
\ExplSyntaxOn
\seq_gput_right:Nn
\g_@@_renderers_seq
- { headingSix }
+ { lineBreak }
\prop_gput:Nnn
\g_@@_renderer_arities_prop
- { headingSix }
- { 1 }
+ { lineBreak }
+ { 0 }
\ExplSyntaxOff
% \end{macrocode}
% \par
@@ -14266,9 +13254,11 @@ following text:
%
% \begin{markdown}
-#### Thematic Break Renderer
-The \mdef{markdownRendererThematicBreak} macro represents a thematic break.
-The macro receives no arguments.
+#### Link Renderer
+The \mdef{markdownRendererLink} macro represents a hyperlink. It receives
+four arguments: the label, the fully escaped \acro{uri} that can be directly
+typeset, the raw \acro{uri} that can be used outside typesetting, and the
+title of the link.
% \end{markdown}
%
@@ -14280,13 +13270,14 @@ Using a text editor, create a text document named `document.tex` with the
following content:
``` tex
\input markdown
-\def\markdownRendererThematicBreak{\vfil\break}
+\def\markdownRendererLink#1#2#3#4{%
+ #1 {\tt#2} titled {\it#4}%
+}
\markdownBegin
-This is the first page.
-
-***
+Please visit [the link][ctan].
-This is the second page.
+ [ctan]: https://ctan.org/
+ (the Comprehensive TeX Archive Network)
\markdownEnd
\bye
```````
@@ -14297,11 +13288,8 @@ luatex document.tex
A PDF document named `document.pdf` should be produced and contain the
following text:
-> This is the first page.
->
-> ***
->
-> This is the second page.
+> Please visit the link <https://ctan.org/> titled *the Comprehensive TeX
+> Archive Network*.
##### \LaTeX{} Example {.unnumbered}
@@ -14312,16 +13300,17 @@ following content:
\usepackage{markdown}
\markdownSetup{
renderers = {
- thematicBreak = \newpage,
+ link = {%
+ #1 \texttt{#2} titled \emph{#4}%
+ },
},
}
\begin{document}
\begin{markdown}
-This is the first page.
-
-***
+Please visit [the link][ctan].
-This is the second page.
+ [ctan]: https://ctan.org/
+ (the Comprehensive TeX Archive Network)
\end{markdown}
\end{document}
```````
@@ -14332,11 +13321,8 @@ lualatex document.tex
A PDF document named `document.pdf` should be produced and contain the
following text:
-> This is the first page.
->
-> ***
->
-> This is the second page.
+> Please visit the link <https://ctan.org/> titled *the Comprehensive TeX
+> Archive Network*.
##### \Hologo{ConTeXt} Example {.unnumbered}
@@ -14344,14 +13330,15 @@ Using a text editor, create a text document named `document.tex` with the
following content:
``` tex
\usemodule[t][markdown]
-\def\markdownRendererThematicBreak{\page[yes]}
+\def\markdownRendererLink#1#2#3#4{%
+ #1 {\tt#2} titled \emph{#4}%
+}
\starttext
\startmarkdown
-This is the first page.
-
-***
+Please visit [the link][ctan].
-This is the second page.
+ [ctan]: https://ctan.org/
+ (the Comprehensive TeX Archive Network)
\stopmarkdown
\stoptext
```````
@@ -14362,66 +13349,261 @@ context document.tex
A PDF document named `document.pdf` should be produced and contain the
following text:
-> This is the first page.
->
-> ***
->
-> This is the second page.
+> Please visit the link <https://ctan.org/> titled *the Comprehensive TeX
+> Archive Network*.
%</manual-tokens>
%<*tex>
% \fi
-% \begin{markdown}
%
-% The \mdef{markdownRendererHorizontalRule} and
-% \mdef{markdownRendererHorizontalRulePrototype} macros have been deprecated
-% and will be removed in Markdown 3.0.0.
+% \begin{macrocode}
+\def\markdownRendererLink{%
+ \markdownRendererLinkPrototype}%
+\ExplSyntaxOn
+\seq_gput_right:Nn
+ \g_@@_renderers_seq
+ { link }
+\prop_gput:Nnn
+ \g_@@_renderer_arities_prop
+ { link }
+ { 4 }
+\ExplSyntaxOff
+% \end{macrocode}
+% \par
+%
+% \iffalse
+%</tex>
+%<*manual-tokens>
+% \fi
%
+% \begin{markdown}
+
+#### Markdown Document Renderers
+The \mdef{markdownRendererDocumentBegin} and \mdef{markdownRendererDocumentEnd}
+macros represent the beginning and the end of a *markdown* document. The macros
+receive no arguments.
+
+A \TeX{} document may contain any number of markdown documents. Additionally,
+markdown documents may appear not only in a sequence, but several markdown
+documents may also be *nested*. Redefinitions of the macros should take this
+into account.
+
% \end{markdown}
+%
+% \iffalse
+
+##### \LaTeX{} Example {.unnumbered}
+
+Using a text editor, create a text document named `nested.md` with the
+following content:
+``` md
+This is a *nested* markdown document.
+```
+
+Using a text editor, create a text document named `document.tex` with the
+following content:
+``` tex
+\documentclass{article}
+\usepackage[contentBlocks]{markdown}
+\markdownSetup{
+ renderers = {
+ contentBlock = {%
+ \markdownInput{#3}%
+ },
+ documentBegin = {%
+ \par
+ \emph{(The beginning of a document)}
+ \par
+ \begingroup
+ \markdownSetup{snippet=first-nesting-level}%
+ },
+ documentEnd = {%
+ \endgroup
+ \par
+ \emph{(The end of a document)}
+ \par
+ },
+ },
+}
+\markdownSetupSnippet{first-nesting-level}{
+ renderers = {
+ documentBegin = {
+ \par
+ \emph{(The beginning of a nested document)}
+ \par
+ \begingroup
+ \markdownSetup{snippet=second-nesting-level-and-below}
+ },
+ },
+}
+\markdownSetupSnippet{second-nesting-level-and-below}{
+ renderers = {
+ documentBegin = {
+ \par
+ \emph{(The beginning of a nested document)}
+ \par
+ \begingroup
+ },
+ documentEnd = {
+ \endgroup
+ \par
+ \emph{(The end of a nested document)}
+ \par
+ },
+ },
+}
+\begin{document}
+\begin{markdown}
+Hello *world*!
+
+/nested.md
+
+_Foo_ bar!
+\end{markdown}
+\begin{markdown}
+
+Bar baz!
+
+\end{markdown}
+\end{document}
+```````
+Next, invoke LuaTeX from the terminal:
+``` sh
+lualatex document.tex
+``````
+A PDF document named `document.pdf` should be produced and contain the
+following text:
+
+> *(The beginning of a document)*
+>
+> Hello *world*!
+>
+> *(The beginning of a nested document)*
+>
+> This is a *nested* markdown document.
+>
+> *(The end of a nested document)*
+>
+> _Foo_ bar!
+>
+> *(The end of a document)*
+>
+> *(The beginning of a document)*
+>
+> Bar baz!
+>
+> *(The end of a document)*
+
+%</manual-tokens>
+%<*tex>
+% \fi
+%
% \begin{macrocode}
+\def\markdownRendererDocumentBegin{%
+ \markdownRendererDocumentBeginPrototype}%
\ExplSyntaxOn
-\cs_new:Npn
- \markdownRendererThematicBreak
- {
- \cs_if_exist:NTF
- \markdownRendererHorizontalRule
- {
- \markdownWarning
- {
- Horizontal~rule~renderer~has~been~deprecated,~
- to~be~removed~in~Markdown~3.0.0
- }
- \markdownRendererHorizontalRule
- }
- {
- \cs_if_exist:NTF
- \markdownRendererHorizontalRulePrototype
- {
- \markdownWarning
- {
- Horizontal~rule~renderer~prototype~has~been~deprecated,~
- to~be~removed~in~Markdown~3.0.0
- }
- \markdownRendererHorizontalRulePrototype
- }
- {
- \markdownRendererThematicBreakPrototype
- }
- }
- }
\seq_gput_right:Nn
\g_@@_renderers_seq
- { horizontalRule }
+ { documentBegin }
\prop_gput:Nnn
\g_@@_renderer_arities_prop
- { horizontalRule }
+ { documentBegin }
{ 0 }
+\ExplSyntaxOff
+\def\markdownRendererDocumentEnd{%
+ \markdownRendererDocumentEndPrototype}%
+\ExplSyntaxOn
\seq_gput_right:Nn
\g_@@_renderers_seq
- { thematicBreak }
+ { documentEnd }
\prop_gput:Nnn
\g_@@_renderer_arities_prop
- { thematicBreak }
+ { documentEnd }
+ { 0 }
+\ExplSyntaxOff
+% \end{macrocode}
+% \par
+%
+% \iffalse
+%</tex>
+%<*manual-tokens>
+% \fi
+%
+% \begin{markdown}
+
+#### Non-Breaking Space Renderer
+The \mdef{markdownRendererNbsp} macro represents a non-breaking space.
+
+% \end{markdown}
+%
+% \iffalse
+
+##### \LaTeX{} Example {.unnumbered}
+
+Using a text editor, create a text document named `document.bib` with the
+following content:
+``` bib
+@book{knuth:tex,
+ author = "Knuth, Donald Ervin",
+ title = "The \TeX book, volume A of Computers and typesetting",
+ publisher = "Addison-Wesley",
+ year = "1984"
+}
+```````
+Using a text editor, create a text document named `document.tex` with the
+following content:
+``` tex
+\documentclass{article}
+\usepackage[
+ citations,
+ citationNbsps,
+]{markdown}
+\markdownSetup{
+ renderers = {
+ nbsp = {$\cdot$},
+ },
+}
+\begin{document}
+
+\begin{markdown}
+The TeXbook [@knuth:tex, p. 123 and 130] is good.
+\end{markdown}
+
+\bibliographystyle{plain}
+\bibliography{document.bib}
+
+\end{document}
+```````
+Next, invoke LuaTeX and BibTeX from the terminal:
+``` sh
+lualatex document.tex
+bibtex document.aux
+lualatex document.tex
+lualatex document.tex
+``````
+A PDF document named `document.pdf` should be produced and contain the
+following text:
+
+> The TeXbook [1, p.·123·and·130] is good.
+>
+> ### References
+> [1] Donald Ervin Knuth. _The TeXbook, volume A of Computers and typesetting._
+> Addison-Wesley, 1984.
+
+%</manual-tokens>
+%<*tex>
+% \fi
+%
+% \begin{macrocode}
+\def\markdownRendererNbsp{%
+ \markdownRendererNbspPrototype}%
+\ExplSyntaxOn
+\seq_gput_right:Nn
+ \g_@@_renderers_seq
+ { nbsp }
+\prop_gput:Nnn
+ \g_@@_renderer_arities_prop
+ { nbsp }
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
@@ -14596,92 +13778,102 @@ following text:
%
% \begin{markdown}
-#### Parenthesized Citations Renderer
-The \mdef{markdownRendererCite} macro represents a string of one or more
-parenthetical citations. This macro will only be produced, when the
-\Opt{citations} option is enabled. The macro receives the parameter
-`{`\meta{number of citations}`}` followed by \meta{suppress author}
-`{`\meta{prenote}`}{`\meta{postnote}`}{`\meta{name}`}` repeated
-\meta{number of citations} times. The \meta{suppress author} parameter is
-either the token `-`, when the author's name is to be suppressed, or `+`
-otherwise.
+#### Ordered List Renderers
+The \mdef{markdownRendererOlBegin} macro represents the beginning of an
+ordered list that contains an item with several paragraphs of text (the
+list is not tight). This macro will only be produced, when the \Opt{fancyLists}
+option is disabled. The macro receives no arguments.
% \end{markdown}
%
% \iffalse
+%</manual-tokens>
+%<*tex>
+% \fi
+%
+% \begin{macrocode}
+\def\markdownRendererOlBegin{%
+ \markdownRendererOlBeginPrototype}%
+\ExplSyntaxOn
+\seq_gput_right:Nn
+ \g_@@_renderers_seq
+ { olBegin }
+\prop_gput:Nnn
+ \g_@@_renderer_arities_prop
+ { olBegin }
+ { 0 }
+\ExplSyntaxOff
+% \end{macrocode}
+% \par
+%
+% \iffalse
+%</tex>
+%<*manual-tokens>
+% \fi
+%
+% \begin{markdown}
-##### \LaTeX{} Example {.unnumbered}
+The \mdef{markdownRendererOlBeginTight} macro represents the beginning of an
+ordered list that contains no item with several paragraphs of text (the
+list is tight). This macro will only be produced, when the \Opt{tightLists}
+option is enabled and the \Opt{fancyLists} option is disabled. The macro
+receives no arguments.
-Using a text editor, create a text document named `document.tex` with the
-following content:
-``` tex
-\documentclass{article}
-\usepackage[citations]{markdown}
-\newcount\citationsCounter
-\newcount\citationsTotal
-\makeatletter
-\def\citations#1#2#3#4{%
- a parenthesized citation \emph{#4}
- \advance\citationsCounter by 1\relax
- \ifx\relax#2\relax
- \ifx\relax#3\relax\else
- with a postfix \emph{#3}%
- \fi
- \else
- with a prefix \emph{#2}%
- \ifx\relax#3\relax\else
- \ and a postfix \emph{#3}%
- \fi
- \fi
- \ifnum\citationsCounter>\citationsTotal\relax
- .%
- \expandafter\@gobble
- \else
- , and
- \fi\citations}
-\makeatother
-\markdownSetup{
- renderers = {
- cite = {%
- \citationsCounter=1%
- \citationsTotal=#1%
- This is
- \expandafter\citations
- },
- },
-}
-\begin{document}
-\begin{markdown}
-[see @abrahams90, pp. 12; @eijkhout91, pp. 34]
-\end{markdown}
-\end{document}
-```````
-Next, invoke LuaTeX from the terminal:
-``` sh
-lualatex document.tex
-``````
-A PDF document named `document.pdf` should be produced and contain the
-following text:
+% \end{markdown}
+%
+% \iffalse
+%</manual-tokens>
+%<*tex>
+% \fi
+%
+% \begin{macrocode}
+\def\markdownRendererOlBeginTight{%
+ \markdownRendererOlBeginTightPrototype}%
+\ExplSyntaxOn
+\seq_gput_right:Nn
+ \g_@@_renderers_seq
+ { olBeginTight }
+\prop_gput:Nnn
+ \g_@@_renderer_arities_prop
+ { olBeginTight }
+ { 0 }
+\ExplSyntaxOff
+% \end{macrocode}
+% \par
+%
+% \iffalse
+%</tex>
+%<*manual-tokens>
+% \fi
+%
+% \begin{markdown}
-> This is a parenthesized citation *abrahams90* with a prefix see
-> and a postfix *pp. 12*, and a citation *eijkhout91* with a
-> postfix *pp. 34*.
+The \mdef{markdownRendererFancyOlBegin} macro represents the beginning of a
+fancy ordered list that contains an item with several paragraphs of text (the
+list is not tight). This macro will only be produced, when the \Opt{fancyLists}
+option is enabled. The macro receives two arguments: the style of the list item
+labels (`Decimal`, `LowerRoman`, `UpperRoman`, `LowerAlpha`, and `UpperAlpha`),
+and the style of delimiters between list item labels and texts (`Default`,
+`OneParen`, and `Period`).
+% \end{markdown}
+%
+% \iffalse
%</manual-tokens>
%<*tex>
% \fi
%
% \begin{macrocode}
-\def\markdownRendererCite{%
- \markdownRendererCitePrototype}%
+\def\markdownRendererFancyOlBegin{%
+ \markdownRendererFancyOlBeginPrototype}%
\ExplSyntaxOn
\seq_gput_right:Nn
\g_@@_renderers_seq
- { cite }
+ { fancyOlBegin }
\prop_gput:Nnn
\g_@@_renderer_arities_prop
- { cite }
- { 1 }
+ { fancyOlBegin }
+ { 2 }
\ExplSyntaxOff
% \end{macrocode}
% \par
@@ -14693,86 +13885,132 @@ following text:
%
% \begin{markdown}
-#### Text Citations Renderer
-The \mdef{markdownRendererTextCite} macro represents a string of one or more
-text citations. This macro will only be produced, when the
-\Opt{citations} option is enabled. The macro receives parameters in the same
-format as the \mref{markdownRendererCite} macro.
+The \mdef{markdownRendererFancyOlBeginTight} macro represents the beginning of
+a fancy ordered list that contains no item with several paragraphs of text (the
+list is tight). This macro will only be produced, when the \Opt{fancyLists}
+and \Opt{tightLists} options are enabled. The macro receives two arguments: the
+style of the list item labels, and the style of delimiters between list
+item labels and texts. See the \mref{markdownRendererFancyOlBegin} macro for
+the valid style values.
% \end{markdown}
%
% \iffalse
+%</manual-tokens>
+%<*tex>
+% \fi
+%
+% \begin{macrocode}
+\def\markdownRendererFancyOlBeginTight{%
+ \markdownRendererFancyOlBeginTightPrototype}%
+\ExplSyntaxOn
+\seq_gput_right:Nn
+ \g_@@_renderers_seq
+ { fancyOlBeginTight }
+\prop_gput:Nnn
+ \g_@@_renderer_arities_prop
+ { fancyOlBeginTight }
+ { 2 }
+\ExplSyntaxOff
+% \end{macrocode}
+% \par
+%
+% \iffalse
+%</tex>
+%<*manual-tokens>
+% \fi
+%
+% \begin{markdown}
-##### \LaTeX{} Example {.unnumbered}
+The \mdef{markdownRendererOlItem} macro represents an item in an ordered list.
+This macro will only be produced, when the \Opt{startNumber} option is
+disabled and the \Opt{fancyLists} option is disabled. The macro receives no
+arguments.
-Using a text editor, create a text document named `document.tex` with the
-following content:
-``` tex
-\documentclass{article}
-\usepackage[citations]{markdown}
-\newcount\citationsCounter
-\newcount\citationsTotal
-\makeatletter
-\def\citations#1#2#3#4{%
- a text citation \emph{#4}
- \advance\citationsCounter by 1\relax
- \ifx\relax#2\relax
- \ifx\relax#3\relax\else
- with a postfix \emph{#3}%
- \fi
- \else
- with a prefix \emph{#2}%
- \ifx\relax#3\relax\else
- \ and a postfix \emph{#3}%
- \fi
- \fi
- \ifnum\citationsCounter>\citationsTotal\relax
- .%
- \expandafter\@gobble
- \else
- , and
- \fi\citations}
-\makeatother
-\markdownSetup{
- renderers = {
- textCite = {%
- \citationsCounter=1%
- \citationsTotal=#1%
- This is
- \expandafter\citations
- },
- },
-}
-\begin{document}
-\begin{markdown}
-@abrahams90 [pp. 12; also @eijkhout91]
-\end{markdown}
-\end{document}
-```````
-Next, invoke LuaTeX from the terminal:
-``` sh
-lualatex document.tex
-``````
-A PDF document named `document.pdf` should be produced and contain the
-following text:
+% \end{markdown}
+%
+% \iffalse
+%</manual-tokens>
+%<*tex>
+% \fi
+%
+% \begin{macrocode}
+\def\markdownRendererOlItem{%
+ \markdownRendererOlItemPrototype}%
+\ExplSyntaxOn
+\seq_gput_right:Nn
+ \g_@@_renderers_seq
+ { olItem }
+\prop_gput:Nnn
+ \g_@@_renderer_arities_prop
+ { olItem }
+ { 0 }
+\ExplSyntaxOff
+% \end{macrocode}
+% \par
+%
+% \iffalse
+%</tex>
+%<*manual-tokens>
+% \fi
+%
+% \begin{markdown}
-> This is a text citation *abrahams90* with a postfix *pp. 12*,
-> and a citation *eijkhout91* with a prefix *also*.
+The \mdef{markdownRendererOlItemEnd} macro represents the end of an item in
+an ordered list. This macro will only be produced, when the \Opt{fancyLists}
+option is disabled. The macro receives no arguments.
+% \end{markdown}
+%
+% \iffalse
%</manual-tokens>
%<*tex>
% \fi
%
% \begin{macrocode}
-\def\markdownRendererTextCite{%
- \markdownRendererTextCitePrototype}%
+\def\markdownRendererOlItemEnd{%
+ \markdownRendererOlItemEndPrototype}%
\ExplSyntaxOn
\seq_gput_right:Nn
\g_@@_renderers_seq
- { textCite }
+ { olItemEnd }
\prop_gput:Nnn
\g_@@_renderer_arities_prop
- { textCite }
+ { olItemEnd }
+ { 0 }
+\ExplSyntaxOff
+% \end{macrocode}
+% \par
+%
+% \iffalse
+%</tex>
+%<*manual-tokens>
+% \fi
+%
+% \begin{markdown}
+
+The \mdef{markdownRendererOlItemWithNumber} macro represents an item in an
+ordered list. This macro will only be produced, when the \Opt{startNumber}
+option is enabled and the \Opt{fancyLists} option is disabled. The macro
+receives a single numeric argument that corresponds to the item number.
+
+% \end{markdown}
+%
+% \iffalse
+%</manual-tokens>
+%<*tex>
+% \fi
+%
+% \begin{macrocode}
+\def\markdownRendererOlItemWithNumber{%
+ \markdownRendererOlItemWithNumberPrototype}%
+\ExplSyntaxOn
+\seq_gput_right:Nn
+ \g_@@_renderers_seq
+ { olItemWithNumber }
+\prop_gput:Nnn
+ \g_@@_renderer_arities_prop
+ { olItemWithNumber }
{ 1 }
\ExplSyntaxOff
% \end{macrocode}
@@ -14785,122 +14023,165 @@ following text:
%
% \begin{markdown}
-#### Table Renderer
-The \mdef{markdownRendererTable} macro represents a table. This macro will only
-be produced, when the \Opt{pipeTables} option is enabled. The macro receives the
-parameters `{`\meta{caption}`}{`\meta{number of rows}`}{`\meta{number of columns}`}`
-followed by `{`\meta{alignments}`}` and then by `{`\meta{row}`}` repeated
-\meta{number of rows} times, where \meta{row} is `{`\meta{column}`}` repeated
-\meta{number of columns} times, \meta{alignments} is \meta{alignment} repeated
-\meta{number of columns} times, and \meta{alignment} is one of the following:
+The \mdef{markdownRendererFancyOlItem} macro represents an item in a fancy
+ordered list. This macro will only be produced, when the \Opt{startNumber}
+option is disabled and the \Opt{fancyLists} option is enabled. The macro receives
+no arguments.
-- `d` -- The corresponding column has an unspecified (default) alignment.
-- `l` -- The corresponding column is left-aligned.
-- `c` -- The corresponding column is centered.
-- `r` -- The corresponding column is right-aligned.
+% \end{markdown}
+%
+% \iffalse
+%</manual-tokens>
+%<*tex>
+% \fi
+%
+% \begin{macrocode}
+\def\markdownRendererFancyOlItem{%
+ \markdownRendererFancyOlItemPrototype}%
+\ExplSyntaxOn
+\seq_gput_right:Nn
+ \g_@@_renderers_seq
+ { fancyOlItem }
+\prop_gput:Nnn
+ \g_@@_renderer_arities_prop
+ { fancyOlItem }
+ { 0 }
+\ExplSyntaxOff
+% \end{macrocode}
+% \par
+%
+% \iffalse
+%</tex>
+%<*manual-tokens>
+% \fi
+%
+% \begin{markdown}
+
+The \mdef{markdownRendererFancyOlItemEnd} macro represents the end of an item in
+a fancy ordered list. This macro will only be produced, when the \Opt{fancyLists}
+option is enabled. The macro receives no arguments.
% \end{markdown}
%
% \iffalse
+%</manual-tokens>
+%<*tex>
+% \fi
+%
+% \begin{macrocode}
+\def\markdownRendererFancyOlItemEnd{%
+ \markdownRendererFancyOlItemEndPrototype}%
+\ExplSyntaxOn
+\seq_gput_right:Nn
+ \g_@@_renderers_seq
+ { fancyOlItemEnd }
+\prop_gput:Nnn
+ \g_@@_renderer_arities_prop
+ { fancyOlItemEnd }
+ { 0 }
+\ExplSyntaxOff
+% \end{macrocode}
+% \par
+%
+% \iffalse
+%</tex>
+%<*manual-tokens>
+% \fi
+%
+% \begin{markdown}
-##### \LaTeX{} Example {.unnumbered}
+The \mdef{markdownRendererFancyOlItemWithNumber} macro represents an item in a
+fancy ordered list. This macro will only be produced, when the \Opt{startNumber}
+and \Opt{fancyLists} options are enabled. The macro receives a single numeric
+argument that corresponds to the item number.
-Using a text editor, create a text document named `document.tex` with the
-following content:
-``` tex
-\documentclass{article}
-\usepackage[pipeTables, tableCaptions]{markdown}
-\newcount\rowCounter
-\newcount\columnCounter
-\makeatletter
-\def\processRow#1{%
- \columnCounter=1%
- \ifnum\rowCounter=0\relax
- As for the alignment,
- \else
- In row \the\rowCounter,
- \fi
- \processColumn#1
- \advance\rowCounter by 1\relax
- \ifnum\rowCounter>\rowTotal\relax
- \expandafter\@gobble
- \fi\processRow}%
-\def\processColumn#1{%
- column number \the\columnCounter{}
- \ifnum\rowCounter=0\relax
- \if#1d{}has default alignment\fi
- \if#1l{}is left-aligned\fi
- \if#1c{}is centered\fi
- \if#1r{}is right-aligned\fi
- \else
- says \emph{#1}%
- \fi
- \advance\columnCounter by 1\relax
- \ifnum\columnCounter<\columnTotal\relax, \fi
- \ifnum\columnCounter=\columnTotal\relax, and \fi
- \ifnum\columnCounter>\columnTotal\relax
- .\expandafter\@gobble
- \fi\processColumn}%
-\makeatother
-\markdownSetup{
- renderers = {
- table = {%
- This is a table with caption \emph{#1} that is #3 colums wide
- and #2 rows long.
- \rowCounter=0%
- \def\rowTotal{#2}%
- \def\columnTotal{#3}%
- \processRow
- },
- },
-}
-\begin{document}
-\begin{markdown}
-| Right | Left | Default | Center |
-|------:|:-----|---------|:------:|
-| 12 | 12 | 12 | 12 |
-| 123 | 123 | 123 | 123 |
-| 1 | 1 | 1 | 1 |
+% \end{markdown}
+%
+% \iffalse
+%</manual-tokens>
+%<*tex>
+% \fi
+%
+% \begin{macrocode}
+\def\markdownRendererFancyOlItemWithNumber{%
+ \markdownRendererFancyOlItemWithNumberPrototype}%
+\ExplSyntaxOn
+\seq_gput_right:Nn
+ \g_@@_renderers_seq
+ { fancyOlItemWithNumber }
+\prop_gput:Nnn
+ \g_@@_renderer_arities_prop
+ { fancyOlItemWithNumber }
+ { 1 }
+\ExplSyntaxOff
+% \end{macrocode}
+% \par
+%
+% \iffalse
+%</tex>
+%<*manual-tokens>
+% \fi
+%
+% \begin{markdown}
- : Demonstration of pipe table syntax
-\end{markdown}
-\end{document}
-```````
-Next, invoke LuaTeX from the terminal:
-``` sh
-lualatex document.tex
-``````
-A PDF document named `document.pdf` should be produced and contain the
-following text:
+The \mdef{markdownRendererOlEnd} macro represents the end of an ordered list
+that contains an item with several paragraphs of text (the list is not
+tight). This macro will only be produced, when the \Opt{fancyLists} option is
+disabled. The macro receives no arguments.
-> This is a table with caption *Demonstration of pipe table syntax* 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
-> *Right*, column number 2 says *Left*, column number 3 says *Default*, and
-> column number 4 says *Center*. In row 2, column number 1 says *12*, column
-> number 2 says *12*, column number 3 says *12*, and column number 4 says *12*.
-> In row 3, column number 1 says *123*, column number 2 says *123*, column
-> number 3 says *123*, and column number 4 says *123*. In row 4, column number
-> 1 says *1*, column number 2 says *1*, column number 3 says *1*, and column
-> number 4 says *1*.
+% \end{markdown}
+%
+% \iffalse
+%</manual-tokens>
+%<*tex>
+% \fi
+%
+% \begin{macrocode}
+\def\markdownRendererOlEnd{%
+ \markdownRendererOlEndPrototype}%
+\ExplSyntaxOn
+\seq_gput_right:Nn
+ \g_@@_renderers_seq
+ { olEnd }
+\prop_gput:Nnn
+ \g_@@_renderer_arities_prop
+ { olEnd }
+ { 0 }
+\ExplSyntaxOff
+% \end{macrocode}
+% \par
+%
+% \iffalse
+%</tex>
+%<*manual-tokens>
+% \fi
+%
+% \begin{markdown}
+The \mdef{markdownRendererOlEndTight} 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 \Opt{tightLists} option is
+enabled and the \Opt{fancyLists} option is disabled. The macro receives no
+arguments.
+% \end{markdown}
+%
+% \iffalse
%</manual-tokens>
%<*tex>
% \fi
%
% \begin{macrocode}
-\def\markdownRendererTable{%
- \markdownRendererTablePrototype}%
+\def\markdownRendererOlEndTight{%
+ \markdownRendererOlEndTightPrototype}%
\ExplSyntaxOn
\seq_gput_right:Nn
\g_@@_renderers_seq
- { table }
+ { olEndTight }
\prop_gput:Nnn
\g_@@_renderer_arities_prop
- { table }
- { 3 }
+ { olEndTight }
+ { 0 }
\ExplSyntaxOff
% \end{macrocode}
% \par
@@ -14912,110 +14193,319 @@ following text:
%
% \begin{markdown}
-#### HTML Comment Renderers
+The \mdef{markdownRendererFancyOlEnd} macro represents the end of a fancy
+ordered list that contains an item with several paragraphs of text (the list
+is not tight). This macro will only be produced, when the \Opt{fancyLists}
+option is enabled. The macro receives no arguments.
-The \mdef{markdownRendererInlineHtmlComment} macro represents the contents of an
-inline \acro{HTML} comment. This macro will only be produced, when the
-\Opt{html} option is enabled. The macro receives a single argument that
-corresponds to the contents of the \acro{HTML} comment.
+% \end{markdown}
+%
+% \iffalse
+%</manual-tokens>
+%<*tex>
+% \fi
+%
+% \begin{macrocode}
+\def\markdownRendererFancyOlEnd{%
+ \markdownRendererFancyOlEndPrototype}%
+\ExplSyntaxOn
+\seq_gput_right:Nn
+ \g_@@_renderers_seq
+ { fancyOlEnd }
+\prop_gput:Nnn
+ \g_@@_renderer_arities_prop
+ { fancyOlEnd }
+ { 0 }
+\ExplSyntaxOff
+% \end{macrocode}
+% \par
+%
+% \iffalse
+%</tex>
+%<*manual-tokens>
+% \fi
+%
+% \begin{markdown}
-The \mdef{markdownRendererBlockHtmlCommentBegin} and
-\mdef{markdownRendererBlockHtmlCommentEnd} macros represent the beginning
-and the end of a block \acro{HTML} comment. The macros receive no arguments.
+The \mdef{markdownRendererFancyOlEndTight} macro represents the end of a
+fancy ordered list that contains no item with several paragraphs of text (the
+list is tight). This macro will only be produced, when the \Opt{fancyLists}
+and \Opt{tightLists} options are enabled. The macro receives no arguments.
% \end{markdown}
%
% \iffalse
+##### Plain \TeX{} Example {.unnumbered}
+
+Using a text editor, create a text document named `document.tex` with the
+following content:
+``` tex
+\input markdown
+\def\markdownOptionTightLists{true}
+\def\markdownOptionStartNumber{true}
+
+\def\markdownRendererInterblockSeparator{}
+\def\markdownRendererOlBeginTight{ (}
+\def\markdownRendererOlItemWithNumber#1{%
+ \ifnum #1=1\relax
+ the first
+ \else
+ \ifnum #1=2\relax
+ , the second
+ \else
+ , and the third
+ \fi
+ \fi
+}
+\def\markdownRendererOlItemEnd{}
+\def\markdownRendererOlEndTight{).}
+
+\markdownBegin
+This is a tight list
+
+1. item
+2. item
+3. item
+\markdownEnd
+
+\def\markdownRendererInterblockSeparator{%
+ :\par
+ \def\markdownRendererInterblockSeparator{\par}%
+}
+\def\markdownRendererOlBegin{}
+\def\markdownRendererOlItemWithNumber#1{%
+ #1.\kern 0.5em%
+ This is the
+ \ifnum #1=1\relax
+ first
+ \else
+ \ifnum #1=2\relax
+ second
+ \else
+ third
+ \fi
+ \fi
+}
+\def\markdownRendererOlItemEnd{.\par}
+\def\markdownRendererOlEnd{}
+
+\markdownBegin
+This is a loose list
+
+1. item
+
+2. item
+
+3. item
+\markdownEnd
+
+\bye
+```````
+Next, invoke LuaTeX from the terminal:
+``` sh
+luatex document.tex
+``````
+A PDF document named `document.pdf` should be produced and contain the
+following text:
+
+> This is a tight list (the first item, the second item, and the third item).
+>
+> This is a loose list:
+>
+> 1. This is the first item.
+>
+> 2. This is the second item.
+>
+> 3. This is the third item.
+
##### \LaTeX{} Example {.unnumbered}
Using a text editor, create a text document named `document.tex` with the
following content:
``` tex
\documentclass{article}
-\usepackage[html]{markdown}
-\usepackage{marginnote}
-\markdownSetup{
+\usepackage[tightLists, startNumber]{markdown}
+\begin{document}
+
+\begin{markdown*}{
renderers = {
- inlineHtmlComment = {\marginnote{#1}},
- blockHtmlCommentBegin = {\begin{quote}},
- blockHtmlCommentEnd = {\end{quote}},
- },
+ interblockSeparator = {},
+ olBeginTight = { (},
+ olItemWithNumber = {%
+ \ifnum #1=1\relax
+ the first
+ \else
+ \ifnum #1=2\relax
+ , the second
+ \else
+ , and the third
+ \fi
+ \fi
+ },
+ olItemEnd = {},
+ olEndTight = {).},
+ },
}
-\begin{document}
-\begin{markdown}
-A useful use of inline HTML comments are side notes.
-<!-- Side notes are displayed in the horizontal margins next to the relevant
-passages, which makes them *easier for the reader to find* than notes. -->
+This is a tight list
-We can render block HTML comments as blockquotes:
+1. item
+2. item
+3. item
+\end{markdown*}
-<!--
-Here is a block HTML comment with a code example that a programmer might understand:
+\begin{markdown*}{
+ renderers = {
+ interblockSeparator = {%
+ :\par
+ \def\markdownRendererInterblockSeparator{\par}%
+ },
+ olBeginTight = {\begin{enumerate}},
+ olItemWithNumber = {%
+ \item This is the
+ \ifnum #1=1\relax
+ first
+ \else
+ \ifnum #1=2\relax
+ second
+ \else
+ third
+ \fi
+ \fi
+ },
+ olItemEnd = {.},
+ olEnd = {\end{enumerate}},
+ },
+}
+This is a loose list
+
+1. item
+
+2. item
+
+3. item
+\end{markdown*}
- foo = bar + baz - 42
--->
-\end{markdown}
\end{document}
```````
Next, invoke LuaTeX from the terminal:
``` sh
lualatex document.tex
-lualatex document.tex
``````
A PDF document named `document.pdf` should be produced and contain the
-following body text:
+following text:
-> A useful use of HTML comments are side notes.
+> This is a tight list (the first item, the second item, and the third item).
>
-> We can render block HTML comments as blockquotes:
+> This is a loose list:
>
-> > Here is a block HTML comment with a code example that a programmer might
-> > understand:
-> >
-> > foo = bar + baz - 42
+> 1. This is the first item.
+>
+> 2. This is the second item.
+>
+> 3. This is the third item.
-The horizontal margins should contain the following text:
+##### \Hologo{ConTeXt} Example {.unnumbered}
-> Side notes are displayed in the horizontal margins next to the relevant
-> passages, which makes them *easier for the reader to find* than notes.
+Using a text editor, create a text document named `document.tex` with the
+following content:
+``` tex
+\usemodule[t][markdown]
+\setupmarkdown
+ [
+ tightLists = yes,
+ startNumber = yes,
+ ]
+\starttext
+
+\def\markdownRendererInterblockSeparator{}
+\def\markdownRendererOlBeginTight{ (}
+\def\markdownRendererOlItemWithNumber#1{%
+ \ifnum #1=1\relax
+ the first
+ \else
+ \ifnum #1=2\relax
+ , the second
+ \else
+ , and the third
+ \fi
+ \fi
+}
+\def\markdownRendererOlItemEnd{}
+\def\markdownRendererOlEndTight{).}
+
+\startmarkdown
+This is a tight list
+
+1. item
+2. item
+3. item
+\stopmarkdown
+
+\def\markdownRendererInterblockSeparator{%
+ :\par
+ \def\markdownRendererInterblockSeparator{\par}%
+}
+\def\markdownRendererOlBegin{\startitemize}
+\def\markdownRendererOlItemWithNumber#1{%
+ \sym{#1.}
+ This is the
+ \ifnum #1=1\relax
+ first
+ \else
+ \ifnum #1=2\relax
+ second
+ \else
+ third
+ \fi
+ \fi
+}
+\def\markdownRendererOlItemEnd{.\par}
+\def\markdownRendererOlEnd{\stopitemize}
+
+\startmarkdown
+This is a loose list
+
+1. item
+
+2. item
+
+3. item
+\stopmarkdown
+
+\stoptext
+```````
+Next, invoke LuaTeX from the terminal:
+``` sh
+context document.tex
+``````
+A PDF document named `document.pdf` should be produced and contain the
+following text:
+
+> This is a tight list (the first item, the second item, and the third item).
+>
+> This is a loose list:
+>
+> 1. This is the first item.
+>
+> 2. This is the second item.
+>
+> 3. This is the third item.
%</manual-tokens>
%<*tex>
% \fi
%
% \begin{macrocode}
-\def\markdownRendererInlineHtmlComment{%
- \markdownRendererInlineHtmlCommentPrototype}%
-\ExplSyntaxOn
-\seq_gput_right:Nn
- \g_@@_renderers_seq
- { inlineHtmlComment }
-\prop_gput:Nnn
- \g_@@_renderer_arities_prop
- { inlineHtmlComment }
- { 1 }
-\ExplSyntaxOff
-\def\markdownRendererBlockHtmlCommentBegin{%
- \markdownRendererBlockHtmlCommentBeginPrototype}%
-\ExplSyntaxOn
-\seq_gput_right:Nn
- \g_@@_renderers_seq
- { blockHtmlCommentBegin }
-\prop_gput:Nnn
- \g_@@_renderer_arities_prop
- { blockHtmlCommentBegin }
- { 0 }
-\ExplSyntaxOff
-\def\markdownRendererBlockHtmlCommentEnd{%
- \markdownRendererBlockHtmlCommentEndPrototype}%
+\def\markdownRendererFancyOlEndTight{%
+ \markdownRendererFancyOlEndTightPrototype}%
\ExplSyntaxOn
\seq_gput_right:Nn
\g_@@_renderers_seq
- { blockHtmlCommentEnd }
+ { fancyOlEndTight }
\prop_gput:Nnn
\g_@@_renderer_arities_prop
- { blockHtmlCommentEnd }
+ { fancyOlEndTight }
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
@@ -15028,17 +14518,15 @@ The horizontal margins should contain the following text:
%
% \begin{markdown}
-#### HTML Tag and Element Renderers
-
-The \mdef{markdownRendererInlineHtmlTag} macro represents an opening, closing,
-or empty inline \acro{HTML} tag. This macro will only be produced, when the
-\Opt{html} option is enabled. The macro receives a single argument that
-corresponds to the contents of the \acro{HTML} tag.
-
-The \mdef{markdownRendererInputBlockHtmlElement} macro represents a block
-\acro{HTML} element. This macro will only be produced, when the \Opt{html}
-option is enabled. The macro receives a single argument that filename of a file
-containing the contents of the \acro{HTML} element.
+#### Parenthesized Citations Renderer
+The \mdef{markdownRendererCite} macro represents a string of one or more
+parenthetical citations. This macro will only be produced, when the
+\Opt{citations} option is enabled. The macro receives the parameter
+`{`\meta{number of citations}`}` followed by \meta{suppress author}
+`{`\meta{prenote}`}{`\meta{postnote}`}{`\meta{name}`}` repeated
+\meta{number of citations} times. The \meta{suppress author} parameter is
+either the token `-`, when the author's name is to be suppressed, or `+`
+otherwise.
% \end{markdown}
%
@@ -15050,61 +14538,108 @@ Using a text editor, create a text document named `document.tex` with the
following content:
``` tex
\documentclass{article}
-\usepackage[html]{markdown}
-\usepackage{marginnote}
-\usepackage{verbatim}
+\usepackage[citations]{markdown}
+\newcount\citationsCounter
+\newcount\citationsTotal
+\makeatletter
+\def\citations#1#2#3#4{%
+ a parenthesized citation \emph{#4}
+ \advance\citationsCounter by 1\relax
+ \ifx\relax#2\relax
+ \ifx\relax#3\relax\else
+ with a postfix \emph{#3}%
+ \fi
+ \else
+ with a prefix \emph{#2}%
+ \ifx\relax#3\relax\else
+ \ and a postfix \emph{#3}%
+ \fi
+ \fi
+ \ifnum\citationsCounter>\citationsTotal\relax
+ .%
+ \expandafter\@gobble
+ \else
+ , and
+ \fi\citations}
+\makeatother
\markdownSetup{
renderers = {
- inlineHtmlTag = {\textbf{#1}},
- inputBlockHtmlElement = {\verbatiminput{#1}},
+ cite = {%
+ \citationsCounter=1%
+ \citationsTotal=#1%
+ This is
+ \expandafter\citations
+ },
},
}
\begin{document}
\begin{markdown}
-<b>_Hello,_ world!</b><br/>
-
-<div>_Hello,_ world!</div>
+[see @abrahams90, pp. 12; @eijkhout91, pp. 34]
\end{markdown}
\end{document}
```````
Next, invoke LuaTeX from the terminal:
``` sh
lualatex document.tex
-lualatex document.tex
``````
A PDF document named `document.pdf` should be produced and contain the
-following body text:
+following text:
-> **<b>**_Hello,_ world!**</b><br/>**
->
-> <div>_Hello,_ world!</div>
+> This is a parenthesized citation *abrahams90* with a prefix see
+> and a postfix *pp. 12*, and a citation *eijkhout91* with a
+> postfix *pp. 34*.
%</manual-tokens>
%<*tex>
% \fi
%
% \begin{macrocode}
-\def\markdownRendererInlineHtmlTag{%
- \markdownRendererInlineHtmlTagPrototype}%
+\def\markdownRendererCite{%
+ \markdownRendererCitePrototype}%
\ExplSyntaxOn
\seq_gput_right:Nn
\g_@@_renderers_seq
- { inlineHtmlTag }
+ { cite }
\prop_gput:Nnn
\g_@@_renderer_arities_prop
- { inlineHtmlTag }
+ { cite }
{ 1 }
\ExplSyntaxOff
-\def\markdownRendererInputBlockHtmlElement{%
- \markdownRendererInputBlockHtmlElementPrototype}%
+% \end{macrocode}
+% \par
+%
+% \iffalse
+%</tex>
+%<*manual-tokens>
+% \fi
+%
+% \begin{markdown}
+
+#### Raw Content Renderers
+The \mdef{markdownRendererInputRawInline} macro represents an inline raw span.
+The macro receives two arguments: the filename of a file contaning the inline
+raw span contents and the raw attribute that designates the format of the
+inline raw span. This macro will only be produced, when the \Opt{rawAttribute}
+option is enabled.
+
+% \end{markdown}
+%
+% \iffalse
+%</manual-tokens>
+%<*tex>
+% \fi
+%
+% \begin{macrocode}
+\def\markdownRendererInputRawInline{%
+ \markdownRendererInputRawInlinePrototype}%
\ExplSyntaxOn
\seq_gput_right:Nn
\g_@@_renderers_seq
- { inputBlockHtmlElement }
+ { inputRawInline }
\prop_gput:Nnn
\g_@@_renderer_arities_prop
- { inputBlockHtmlElement }
- { 1 }
+ { inputRawInline }
+ { 2 }
\ExplSyntaxOff
% \end{macrocode}
% \par
@@ -15116,25 +14651,11 @@ following body text:
%
% \begin{markdown}
-#### Attribute Renderers
-The following macros are only produced, when the \Opt{headerAttributes} option
-is enabled.
-
-\mdef{markdownRendererAttributeIdentifier} represents the \meta{identifier} of
-a markdown element (`id="`\meta{identifier}`"` in HTML and `#`\meta{identifier}
-in Markdown's \Opt{headerAttributes} syntax extension). The macro receives a
-single attribute that corresponds to the \meta{identifier}.
-
-\mdef{markdownRendererAttributeClassName} represents the \meta{class name} of a
-markdown element (`class="`\meta{class name} ...`"` in HTML and
-`.`\meta{class name} in Markdown's \Opt{headerAttributes} syntax extension).
-The macro receives a single attribute that corresponds to the \meta{class
-name}.
-
-\mdef{markdownRendererAttributeKeyValue} represents a HTML attribute in the form
-\meta{key}`=`\meta{value} that is neither an identifier nor a class name.
-The macro receives two attributes that correspond to the \meta{key} and the
-\meta{value}, respectively.
+The \mdef{markdownRendererInputRawBlock} macro represents a raw block. The
+macro receives two arguments: the filename of a file contaning the raw block
+and the raw attribute that designates the format of the raw block. This macro
+will only be produced, when the \Opt{rawAttribute} and \Opt{fencedCode} options
+are enabled.
% \end{markdown}
%
@@ -15144,40 +14665,39 @@ The macro receives two attributes that correspond to the \meta{key} and the
Using a text editor, create a text document named `document.tex` with the
following content:
-``` tex
+```` tex
\documentclass{article}
-\usepackage[headerAttributes, underscores=false]{markdown}
+\usepackage[rawAttribute, fencedCode]{markdown}
+\usepackage{expl3}
+\ExplSyntaxOn
+\cs_new:Nn
+ \display_raw_content:nn
+ {
+ % If the raw attribute is TeX, execute the content as a TeX document.
+ \str_if_eq:nnTF
+ { #2 }
+ { tex }
+ { \markdownEscape { #1 } }
+ % Otherwise, ignore the content.
+ { }
+ }
\markdownSetup{
renderers = {
- attributeIdentifier = {%
- \par
- \emph{(Identifier: #1)}
- \par
- },
- attributeClassName = {%
- \par
- \emph{(Class name: #1)}
- \par
- },
- attributeKeyValue = {%
- \par
- \emph{(Key: #1, Value: #2)}
- \par
- },
+ rawInline = { \display_raw_content:nn { #1 } { #2 } },
+ rawBlock = { \display_raw_content:nn { #1 } { #2 } }
},
}
+\ExplSyntaxOff
\begin{document}
\begin{markdown}
+`$H_2 O$`{=tex} is a liquid.
-# First top-level heading {jane=doe}
-
-## A subheading {#identifier}
-
-# Second top-level heading {.class_name}
-
+``` {=html}
+<p>Here is some HTML content that will be ignored.</p>
+```
\end{markdown}
\end{document}
-```````
+````
Next, invoke LuaTeX from the terminal:
``` sh
lualatex document.tex
@@ -15185,54 +14705,22 @@ lualatex document.tex
A PDF document named `document.pdf` should be produced and contain the
following text:
-> # First top-level heading
->
-> *(Key: Jane, Value: Doe)*
->
-> ## A subheading
->
-> *(Identifier: identifier)*
->
-> # Second top-level heading
->
-> *(Class name: class\_name)*
+> H~2~O is a liquid.
%</manual-tokens>
%<*tex>
% \fi
%
% \begin{macrocode}
-\def\markdownRendererAttributeIdentifier{%
- \markdownRendererAttributeIdentifierPrototype}%
-\ExplSyntaxOn
-\seq_gput_right:Nn
- \g_@@_renderers_seq
- { attributeIdentifier }
-\prop_gput:Nnn
- \g_@@_renderer_arities_prop
- { attributeIdentifier }
- { 1 }
-\ExplSyntaxOff
-\def\markdownRendererAttributeClassName{%
- \markdownRendererAttributeClassNamePrototype}%
-\ExplSyntaxOn
-\seq_gput_right:Nn
- \g_@@_renderers_seq
- { attributeClassName }
-\prop_gput:Nnn
- \g_@@_renderer_arities_prop
- { attributeClassName }
- { 1 }
-\ExplSyntaxOff
-\def\markdownRendererAttributeKeyValue{%
- \markdownRendererAttributeKeyValuePrototype}%
+\def\markdownRendererInputRawBlock{%
+ \markdownRendererInputRawBlockPrototype}%
\ExplSyntaxOn
\seq_gput_right:Nn
\g_@@_renderers_seq
- { attributeKeyValue }
+ { inputRawBlock }
\prop_gput:Nnn
\g_@@_renderer_arities_prop
- { attributeKeyValue }
+ { inputRawBlock }
{ 2 }
\ExplSyntaxOff
% \end{macrocode}
@@ -15245,49 +14733,70 @@ following text:
%
% \begin{markdown}
-#### Header Attribute Context Renderers
-The following macros are only produced, when the \Opt{headerAttributes} option
-is enabled.
+#### Special Character Renderers
+The following macros replace any special plain \TeX{} characters, including
+% \iffalse
+the active pipe character (`|`) of \Hologo{ConTeXt}, in the input text:
-The \mdef{markdownRendererHeaderAttributeContextBegin} and
-\mdef{markdownRendererHeaderAttributeContextEnd} macros represent the beginning
-and the end of a section in which the attributes of a heading apply. The macros
-receive no arguments.
+- \mdef{markdownRendererAmpersand} replaces the ampersand (`&`).
+- \mdef{markdownRendererBackslash} replaces the backslash (`\`).
+- \mdef{markdownRendererCircumflex} replaces the circumflex (`^`).
+- \mdef{markdownRendererDollarSign} replaces the dollar sign (`$`).
+- \mdef{markdownRendererHash} replaces the hash sign (`#`).
+- \mdef{markdownRendererLeftBrace} replaces the left brace (`{`).
+- \mdef{markdownRendererPercentSign} replaces the percent sign (`%`).
+- \mdef{markdownRendererPipe} replaces the pipe character (`|`).
+- \mdef{markdownRendererRightBrace} replaces the right brace (`}`).
+- \mdef{markdownRendererTilde} replaces the tilde (`~`).
+- \mdef{markdownRendererUnderscore} replaces the underscore (`_`).
+
+% \fi
+% the active pipe character (`|`) of \Hologo{ConTeXt}, in the input text.
+% These macros will only be produced, when the \Opt{hybrid} option is
+% `false`.
% \end{markdown}
%
% \iffalse
+##### Plain \TeX{} Example {.unnumbered}
+
+Using a text editor, create a text document named `document.tex` with the
+following content. We will make the tilde behave as if it were written in
+\TeX{}, where it represents a non-breaking space.
+``` tex
+\input markdown
+\def\markdownRendererTilde{~}
+\markdownBegin
+Bartel~Leendert van~der~Waerden
+\markdownEnd
+\bye
+```````
+Next, invoke LuaTeX from the terminal:
+``` sh
+luatex document.tex
+``````
+A PDF document named `document.pdf` should be produced and contain the
+following text, where the middot (`·`) denotes a non-breaking space:
+
+> Bartel·Leendert van·der·Waerden
+
##### \LaTeX{} Example {.unnumbered}
Using a text editor, create a text document named `document.tex` with the
-following content:
+following content. We will make the tilde behave as if it were written in
+\TeX{}, where it represents a non-breaking space.
``` tex
\documentclass{article}
-\usepackage[headerAttributes]{markdown}
+\usepackage{markdown}
\markdownSetup{
renderers = {
- headerAttributeContextBegin = {%
- \par
- \emph{(The beginning of a header attribute context)}
- \par
- },
- headerAttributeContextBegin = {%
- \par
- \emph{(The end of a header attribute context)}
- \par
- },
+ tilde = ~,
},
}
\begin{document}
\begin{markdown}
-
-# First top-level heading
-
-## A subheading {#identifier}
-
-# Second top-level heading {.class_name}
-
+Bartel~Leendert van~der~Waerden
\end{markdown}
\end{document}
```````
@@ -15296,47 +14805,157 @@ Next, invoke LuaTeX from the terminal:
lualatex document.tex
``````
A PDF document named `document.pdf` should be produced and contain the
-following text:
+following text, where the middot (`·`) denotes a non-breaking space:
-> # First top-level heading
->
-> *(The beginning of a header attribute context)*
->
-> ## A subheading
->
-> *(The end of a header attribute context)*
->
-> *(The beginning of a header attribute context)*
->
-> # Second top-level heading
->
-> *(The end of a header attribute context)*
+> Bartel·Leendert van·der·Waerden
+
+##### \Hologo{ConTeXt} Example {.unnumbered}
+
+Using a text editor, create a text document named `document.tex` with the
+following content. We will make the tilde behave as if it were written in
+\TeX{}, where it represents a non-breaking space.
+``` tex
+\usemodule[t][markdown]
+\def\markdownRendererTilde{~}
+\starttext
+\startmarkdown
+Bartel~Leendert van~der~Waerden
+\stopmarkdown
+\stoptext
+```````
+Next, invoke LuaTeX from the terminal:
+``` sh
+context document.tex
+``````
+A PDF document named `document.pdf` should be produced and contain the
+following text, where the middot (`·`) denotes a non-breaking space:
+
+> Bartel·Leendert van·der·Waerden
%</manual-tokens>
%<*tex>
% \fi
%
% \begin{macrocode}
-\def\markdownRendererHeaderAttributeContextBegin{%
- \markdownRendererHeaderAttributeContextBeginPrototype}%
+\def\markdownRendererLeftBrace{%
+ \markdownRendererLeftBracePrototype}%
\ExplSyntaxOn
\seq_gput_right:Nn
\g_@@_renderers_seq
- { headerAttributeContextBegin }
+ { leftBrace }
\prop_gput:Nnn
\g_@@_renderer_arities_prop
- { headerAttributeContextBegin }
+ { leftBrace }
{ 0 }
\ExplSyntaxOff
-\def\markdownRendererHeaderAttributeContextEnd{%
- \markdownRendererHeaderAttributeContextEndPrototype}%
+\def\markdownRendererRightBrace{%
+ \markdownRendererRightBracePrototype}%
\ExplSyntaxOn
\seq_gput_right:Nn
\g_@@_renderers_seq
- { headerAttributeContextEnd }
+ { rightBrace }
\prop_gput:Nnn
\g_@@_renderer_arities_prop
- { headerAttributeContextEnd }
+ { rightBrace }
+ { 0 }
+\ExplSyntaxOff
+\def\markdownRendererDollarSign{%
+ \markdownRendererDollarSignPrototype}%
+\ExplSyntaxOn
+\seq_gput_right:Nn
+ \g_@@_renderers_seq
+ { dollarSign }
+\prop_gput:Nnn
+ \g_@@_renderer_arities_prop
+ { dollarSign }
+ { 0 }
+\ExplSyntaxOff
+\def\markdownRendererPercentSign{%
+ \markdownRendererPercentSignPrototype}%
+\ExplSyntaxOn
+\seq_gput_right:Nn
+ \g_@@_renderers_seq
+ { percentSign }
+\prop_gput:Nnn
+ \g_@@_renderer_arities_prop
+ { percentSign }
+ { 0 }
+\ExplSyntaxOff
+\def\markdownRendererAmpersand{%
+ \markdownRendererAmpersandPrototype}%
+\ExplSyntaxOn
+\seq_gput_right:Nn
+ \g_@@_renderers_seq
+ { ampersand }
+\prop_gput:Nnn
+ \g_@@_renderer_arities_prop
+ { ampersand }
+ { 0 }
+\ExplSyntaxOff
+\def\markdownRendererUnderscore{%
+ \markdownRendererUnderscorePrototype}%
+\ExplSyntaxOn
+\seq_gput_right:Nn
+ \g_@@_renderers_seq
+ { underscore }
+\prop_gput:Nnn
+ \g_@@_renderer_arities_prop
+ { underscore }
+ { 0 }
+\ExplSyntaxOff
+\def\markdownRendererHash{%
+ \markdownRendererHashPrototype}%
+\ExplSyntaxOn
+\seq_gput_right:Nn
+ \g_@@_renderers_seq
+ { hash }
+\prop_gput:Nnn
+ \g_@@_renderer_arities_prop
+ { hash }
+ { 0 }
+\ExplSyntaxOff
+\def\markdownRendererCircumflex{%
+ \markdownRendererCircumflexPrototype}%
+\ExplSyntaxOn
+\seq_gput_right:Nn
+ \g_@@_renderers_seq
+ { circumflex }
+\prop_gput:Nnn
+ \g_@@_renderer_arities_prop
+ { circumflex }
+ { 0 }
+\ExplSyntaxOff
+\def\markdownRendererBackslash{%
+ \markdownRendererBackslashPrototype}%
+\ExplSyntaxOn
+\seq_gput_right:Nn
+ \g_@@_renderers_seq
+ { backslash }
+\prop_gput:Nnn
+ \g_@@_renderer_arities_prop
+ { backslash }
+ { 0 }
+\ExplSyntaxOff
+\def\markdownRendererTilde{%
+ \markdownRendererTildePrototype}%
+\ExplSyntaxOn
+\seq_gput_right:Nn
+ \g_@@_renderers_seq
+ { tilde }
+\prop_gput:Nnn
+ \g_@@_renderer_arities_prop
+ { tilde }
+ { 0 }
+\ExplSyntaxOff
+\def\markdownRendererPipe{%
+ \markdownRendererPipePrototype}%
+\ExplSyntaxOn
+\seq_gput_right:Nn
+ \g_@@_renderers_seq
+ { pipe }
+\prop_gput:Nnn
+ \g_@@_renderer_arities_prop
+ { pipe }
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
@@ -15459,6 +15078,113 @@ following text:
%
% \begin{markdown}
+#### Subscript Renderer
+The \mdef{markdownRendererSubscript} macro represents a subscript span of
+text. The macro receives a single argument that corresponds to the subscript
+span of text. This macro will only be produced, when the \Opt{subscripts}
+option is enabled.
+
+% \end{markdown}
+%
+% \iffalse
+
+##### Plain \TeX{} Example {.unnumbered}
+
+Using a text editor, create a text document named `document.tex` with the
+following content:
+``` tex
+\input markdown
+\def\markdownOptionSubscripts{true}
+\def\markdownRendererSubscript#1{ (#1 moles) and }
+\markdownBegin
+H~2~O is a liquid.
+\markdownEnd
+\bye
+```````
+Next, invoke LuaTeX from the terminal:
+``` sh
+luatex document.tex
+``````
+A PDF document named `document.pdf` should be produced and contain the
+following text:
+
+> H (2 moles) and O is a liquid.
+
+##### \LaTeX{} Example {.unnumbered}
+
+Using a text editor, create a text document named `document.tex` with the
+following content:
+``` tex
+\documentclass{article}
+\usepackage[subscripts]{markdown}
+\markdownSetup{
+ renderers = {
+ subscript = { (#1 moles) and },
+ },
+}
+\begin{document}
+\begin{markdown}
+H~2~O is a liquid.
+\end{markdown}
+\end{document}
+```````
+Next, invoke LuaTeX from the terminal:
+``` sh
+lualatex document.tex
+``````
+A PDF document named `document.pdf` should be produced and contain the
+following text:
+
+> H (2 moles) and O is a liquid.
+
+##### \Hologo{ConTeXt} Example {.unnumbered}
+
+Using a text editor, create a text document named `document.tex` with the
+following content:
+``` tex
+\usemodule[t][markdown]
+\setupmarkdown[subscripts = yes]
+\def\markdownRendererSubscript#1{ (#1 moles) and }
+\starttext
+\startmarkdown
+H~2~O is a liquid.
+\stopmarkdown
+\stoptext
+```````
+Next, invoke LuaTeX from the terminal:
+``` sh
+context document.tex
+``````
+A PDF document named `document.pdf` should be produced and contain the
+following text:
+
+> H (2 moles) and O is a liquid.
+
+%</manual-tokens>
+%<*tex>
+% \fi
+%
+% \begin{macrocode}
+\def\markdownRendererSubscript{%
+ \markdownRendererSubscriptPrototype}%
+\ExplSyntaxOn
+\seq_gput_right:Nn
+ \g_@@_renderers_seq
+ { subscript }
+\prop_gput:Nnn
+ \g_@@_renderer_arities_prop
+ { subscript }
+ { 1 }
+% \end{macrocode}
+% \par
+%
+% \iffalse
+%</tex>
+%<*manual-tokens>
+% \fi
+%
+% \begin{markdown}
+
#### Superscript Renderer
The \mdef{markdownRendererSuperscript} macro represents a superscript span of
text. The macro receives a single argument that corresponds to the superscript
@@ -15567,11 +15293,228 @@ following text:
%
% \begin{markdown}
-#### Subscript Renderer
-The \mdef{markdownRendererSubscript} macro represents a subscript span of
-text. The macro receives a single argument that corresponds to the subscript
-span of text. This macro will only be produced, when the \Opt{subscripts}
-option is enabled.
+#### Table Renderer
+The \mdef{markdownRendererTable} macro represents a table. This macro will only
+be produced, when the \Opt{pipeTables} option is enabled. The macro receives the
+parameters `{`\meta{caption}`}{`\meta{number of rows}`}{`\meta{number of columns}`}`
+followed by `{`\meta{alignments}`}` and then by `{`\meta{row}`}` repeated
+\meta{number of rows} times, where \meta{row} is `{`\meta{column}`}` repeated
+\meta{number of columns} times, \meta{alignments} is \meta{alignment} repeated
+\meta{number of columns} times, and \meta{alignment} is one of the following:
+
+- `d` -- The corresponding column has an unspecified (default) alignment.
+- `l` -- The corresponding column is left-aligned.
+- `c` -- The corresponding column is centered.
+- `r` -- The corresponding column is right-aligned.
+
+% \end{markdown}
+%
+% \iffalse
+
+##### \LaTeX{} Example {.unnumbered}
+
+Using a text editor, create a text document named `document.tex` with the
+following content:
+``` tex
+\documentclass{article}
+\usepackage[pipeTables, tableCaptions]{markdown}
+\newcount\rowCounter
+\newcount\columnCounter
+\makeatletter
+\def\processRow#1{%
+ \columnCounter=1%
+ \ifnum\rowCounter=0\relax
+ As for the alignment,
+ \else
+ In row \the\rowCounter,
+ \fi
+ \processColumn#1
+ \advance\rowCounter by 1\relax
+ \ifnum\rowCounter>\rowTotal\relax
+ \expandafter\@gobble
+ \fi\processRow}%
+\def\processColumn#1{%
+ column number \the\columnCounter{}
+ \ifnum\rowCounter=0\relax
+ \if#1d{}has default alignment\fi
+ \if#1l{}is left-aligned\fi
+ \if#1c{}is centered\fi
+ \if#1r{}is right-aligned\fi
+ \else
+ says \emph{#1}%
+ \fi
+ \advance\columnCounter by 1\relax
+ \ifnum\columnCounter<\columnTotal\relax, \fi
+ \ifnum\columnCounter=\columnTotal\relax, and \fi
+ \ifnum\columnCounter>\columnTotal\relax
+ .\expandafter\@gobble
+ \fi\processColumn}%
+\makeatother
+\markdownSetup{
+ renderers = {
+ table = {%
+ This is a table with caption \emph{#1} that is #3 colums wide
+ and #2 rows long.
+ \rowCounter=0%
+ \def\rowTotal{#2}%
+ \def\columnTotal{#3}%
+ \processRow
+ },
+ },
+}
+\begin{document}
+\begin{markdown}
+| Right | Left | Default | Center |
+|------:|:-----|---------|:------:|
+| 12 | 12 | 12 | 12 |
+| 123 | 123 | 123 | 123 |
+| 1 | 1 | 1 | 1 |
+
+ : Demonstration of pipe table syntax
+\end{markdown}
+\end{document}
+```````
+Next, invoke LuaTeX from the terminal:
+``` sh
+lualatex document.tex
+``````
+A PDF document named `document.pdf` should be produced and contain the
+following text:
+
+> This is a table with caption *Demonstration of pipe table syntax* 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
+> *Right*, column number 2 says *Left*, column number 3 says *Default*, and
+> column number 4 says *Center*. In row 2, column number 1 says *12*, column
+> number 2 says *12*, column number 3 says *12*, and column number 4 says *12*.
+> In row 3, column number 1 says *123*, column number 2 says *123*, column
+> number 3 says *123*, and column number 4 says *123*. In row 4, column number
+> 1 says *1*, column number 2 says *1*, column number 3 says *1*, and column
+> number 4 says *1*.
+
+
+%</manual-tokens>
+%<*tex>
+% \fi
+%
+% \begin{macrocode}
+\def\markdownRendererTable{%
+ \markdownRendererTablePrototype}%
+\ExplSyntaxOn
+\seq_gput_right:Nn
+ \g_@@_renderers_seq
+ { table }
+\prop_gput:Nnn
+ \g_@@_renderer_arities_prop
+ { table }
+ { 3 }
+\ExplSyntaxOff
+% \end{macrocode}
+% \par
+%
+% \iffalse
+%</tex>
+%<*manual-tokens>
+% \fi
+%
+% \begin{markdown}
+
+#### Text Citations Renderer
+The \mdef{markdownRendererTextCite} macro represents a string of one or more
+text citations. This macro will only be produced, when the
+\Opt{citations} option is enabled. The macro receives parameters in the same
+format as the \mref{markdownRendererCite} macro.
+
+% \end{markdown}
+%
+% \iffalse
+
+##### \LaTeX{} Example {.unnumbered}
+
+Using a text editor, create a text document named `document.tex` with the
+following content:
+``` tex
+\documentclass{article}
+\usepackage[citations]{markdown}
+\newcount\citationsCounter
+\newcount\citationsTotal
+\makeatletter
+\def\citations#1#2#3#4{%
+ a text citation \emph{#4}
+ \advance\citationsCounter by 1\relax
+ \ifx\relax#2\relax
+ \ifx\relax#3\relax\else
+ with a postfix \emph{#3}%
+ \fi
+ \else
+ with a prefix \emph{#2}%
+ \ifx\relax#3\relax\else
+ \ and a postfix \emph{#3}%
+ \fi
+ \fi
+ \ifnum\citationsCounter>\citationsTotal\relax
+ .%
+ \expandafter\@gobble
+ \else
+ , and
+ \fi\citations}
+\makeatother
+\markdownSetup{
+ renderers = {
+ textCite = {%
+ \citationsCounter=1%
+ \citationsTotal=#1%
+ This is
+ \expandafter\citations
+ },
+ },
+}
+\begin{document}
+\begin{markdown}
+@abrahams90 [pp. 12; also @eijkhout91]
+\end{markdown}
+\end{document}
+```````
+Next, invoke LuaTeX from the terminal:
+``` sh
+lualatex document.tex
+``````
+A PDF document named `document.pdf` should be produced and contain the
+following text:
+
+> This is a text citation *abrahams90* with a postfix *pp. 12*,
+> and a citation *eijkhout91* with a prefix *also*.
+
+%</manual-tokens>
+%<*tex>
+% \fi
+%
+% \begin{macrocode}
+\def\markdownRendererTextCite{%
+ \markdownRendererTextCitePrototype}%
+\ExplSyntaxOn
+\seq_gput_right:Nn
+ \g_@@_renderers_seq
+ { textCite }
+\prop_gput:Nnn
+ \g_@@_renderer_arities_prop
+ { textCite }
+ { 1 }
+\ExplSyntaxOff
+% \end{macrocode}
+% \par
+%
+% \iffalse
+%</tex>
+%<*manual-tokens>
+% \fi
+%
+% \begin{markdown}
+
+#### Thematic Break Renderer
+The \mdef{markdownRendererThematicBreak} macro represents a thematic break.
+The macro receives no arguments.
% \end{markdown}
%
@@ -15583,10 +15526,13 @@ Using a text editor, create a text document named `document.tex` with the
following content:
``` tex
\input markdown
-\def\markdownOptionSubscripts{true}
-\def\markdownRendererSubscript#1{ (#1 moles) and }
+\def\markdownRendererThematicBreak{\vfil\break}
\markdownBegin
-H~2~O is a liquid.
+This is the first page.
+
+***
+
+This is the second page.
\markdownEnd
\bye
```````
@@ -15597,7 +15543,11 @@ luatex document.tex
A PDF document named `document.pdf` should be produced and contain the
following text:
-> H (2 moles) and O is a liquid.
+> This is the first page.
+>
+> ***
+>
+> This is the second page.
##### \LaTeX{} Example {.unnumbered}
@@ -15605,15 +15555,19 @@ Using a text editor, create a text document named `document.tex` with the
following content:
``` tex
\documentclass{article}
-\usepackage[subscripts]{markdown}
+\usepackage{markdown}
\markdownSetup{
renderers = {
- subscript = { (#1 moles) and },
+ thematicBreak = \newpage,
},
}
\begin{document}
\begin{markdown}
-H~2~O is a liquid.
+This is the first page.
+
+***
+
+This is the second page.
\end{markdown}
\end{document}
```````
@@ -15624,7 +15578,11 @@ lualatex document.tex
A PDF document named `document.pdf` should be produced and contain the
following text:
-> H (2 moles) and O is a liquid.
+> This is the first page.
+>
+> ***
+>
+> This is the second page.
##### \Hologo{ConTeXt} Example {.unnumbered}
@@ -15632,11 +15590,14 @@ Using a text editor, create a text document named `document.tex` with the
following content:
``` tex
\usemodule[t][markdown]
-\setupmarkdown[subscripts = yes]
-\def\markdownRendererSubscript#1{ (#1 moles) and }
+\def\markdownRendererThematicBreak{\page[yes]}
\starttext
\startmarkdown
-H~2~O is a liquid.
+This is the first page.
+
+***
+
+This is the second page.
\stopmarkdown
\stoptext
```````
@@ -15647,23 +15608,68 @@ context document.tex
A PDF document named `document.pdf` should be produced and contain the
following text:
-> H (2 moles) and O is a liquid.
+> This is the first page.
+>
+> ***
+>
+> This is the second page.
%</manual-tokens>
%<*tex>
% \fi
+% \begin{markdown}
%
+% The \mdef{markdownRendererHorizontalRule} and
+% \mdef{markdownRendererHorizontalRulePrototype} macros have been deprecated
+% and will be removed in Markdown 3.0.0.
+%
+% \end{markdown}
% \begin{macrocode}
-\def\markdownRendererSubscript{%
- \markdownRendererSubscriptPrototype}%
\ExplSyntaxOn
+\cs_new:Npn
+ \markdownRendererThematicBreak
+ {
+ \cs_if_exist:NTF
+ \markdownRendererHorizontalRule
+ {
+ \markdownWarning
+ {
+ Horizontal~rule~renderer~has~been~deprecated,~
+ to~be~removed~in~Markdown~3.0.0
+ }
+ \markdownRendererHorizontalRule
+ }
+ {
+ \cs_if_exist:NTF
+ \markdownRendererHorizontalRulePrototype
+ {
+ \markdownWarning
+ {
+ Horizontal~rule~renderer~prototype~has~been~deprecated,~
+ to~be~removed~in~Markdown~3.0.0
+ }
+ \markdownRendererHorizontalRulePrototype
+ }
+ {
+ \markdownRendererThematicBreakPrototype
+ }
+ }
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
- { subscript }
+ { horizontalRule }
\prop_gput:Nnn
\g_@@_renderer_arities_prop
- { subscript }
- { 1 }
+ { horizontalRule }
+ { 0 }
+\seq_gput_right:Nn
+ \g_@@_renderers_seq
+ { thematicBreak }
+\prop_gput:Nnn
+ \g_@@_renderer_arities_prop
+ { thematicBreak }
+ { 0 }
+\ExplSyntaxOff
% \end{macrocode}
% \par
%
@@ -15674,30 +15680,213 @@ following text:
%
% \begin{markdown}
-#### Raw Content Renderers
-The \mdef{markdownRendererInputRawInline} macro represents an inline raw span.
-The macro receives two arguments: the filename of a file contaning the inline
-raw span contents and the raw attribute that designates the format of the
-inline raw span. This macro will only be produced, when the \Opt{rawAttribute}
-option is enabled.
+#### Tickbox Renderers
+The macros named \mdef{markdownRendererTickedBox},
+\mdef{markdownRendererHalfTickedBox}, and \mdef{markdownRendererUntickedBox}
+represent ticked and unticked boxes, respectively. These macros will either be
+produced, when the \Opt{taskLists} option is enabled, or when the Ballot Box
+with X (☒, U+2612), Hourglass (⌛, U+231B) or Ballot Box (☐, U+2610) Unicode
+characters are encountered in the markdown input, respectively.
% \end{markdown}
%
% \iffalse
+
+##### \LaTeX{} Example {.unnumbered}
+
+Using a text editor, create a text document named `document.tex` with the
+following content:
+``` tex
+\documentclass{article}
+\usepackage[taskLists]{markdown}
+\markdownSetup{
+ renderers = {
+ untickedBox = No,
+ tickedBox = Yes,
+ },
+}
+\begin{document}
+\begin{markdown}
+- [ ] you can't.
+- [x] I can!
+\end{markdown}
+\end{document}
+```````
+Next, invoke LuaTeX from the terminal:
+``` sh
+lualatex document.tex
+``````
+A PDF document named `document.pdf` should be produced and contain the
+following text:
+
+> - No you can't.
+> - Yes I can!
+
+##### \Hologo{ConTeXt} Example {.unnumbered}
+
+Using a text editor, create a text document named `document.tex` with the
+following content:
+``` tex
+\usemodule[t][markdown]
+\setupmarkdown[taskLists = yes]
+\def\markdownRendererUntickedBox{No}
+\def\markdownRendererTickedBox{Yes}
+\starttext
+\startmarkdown
+- [ ] you can't.
+- [x] I can!
+\stopmarkdown
+\stoptext
+````````
+Next, invoke LuaTeX from the terminal:
+``` sh
+context document.tex
+`````
+A PDF document named `document.pdf` should be produced and contain the
+following text:
+
+> - No you can't.
+> - Yes I can!
+
%</manual-tokens>
%<*tex>
% \fi
%
% \begin{macrocode}
-\def\markdownRendererInputRawInline{%
- \markdownRendererInputRawInlinePrototype}%
+\def\markdownRendererTickedBox{%
+ \markdownRendererTickedBoxPrototype}%
\ExplSyntaxOn
\seq_gput_right:Nn
\g_@@_renderers_seq
- { inputRawInline }
+ { tickedBox }
\prop_gput:Nnn
\g_@@_renderer_arities_prop
- { inputRawInline }
+ { tickedBox }
+ { 0 }
+\ExplSyntaxOff
+\def\markdownRendererHalfTickedBox{%
+ \markdownRendererHalfTickedBoxPrototype}%
+\ExplSyntaxOn
+\seq_gput_right:Nn
+ \g_@@_renderers_seq
+ { halfTickedBox }
+\prop_gput:Nnn
+ \g_@@_renderer_arities_prop
+ { halfTickedBox }
+ { 0 }
+\ExplSyntaxOff
+\def\markdownRendererUntickedBox{%
+ \markdownRendererUntickedBoxPrototype}%
+\ExplSyntaxOn
+\seq_gput_right:Nn
+ \g_@@_renderers_seq
+ { untickedBox }
+\prop_gput:Nnn
+ \g_@@_renderer_arities_prop
+ { untickedBox }
+ { 0 }
+\ExplSyntaxOff
+% \end{macrocode}
+% \par
+%
+% \iffalse
+%</tex>
+%<*manual-tokens>
+% \fi
+%
+% \begin{markdown}
+
+#### YAML Metadata Renderers {#yamlmetadatarenderers}
+
+The \mdef{markdownRendererJekyllDataBegin} macro represents the beginning of a
+\acro{yaml} document. This macro will only be produced when the \Opt{jekyllData}
+option is enabled. The macro receives no arguments.
+
+% \end{markdown}
+%
+% \iffalse
+%</manual-tokens>
+%<*tex>
+% \fi
+%
+% \begin{macrocode}
+\def\markdownRendererJekyllDataBegin{%
+ \markdownRendererJekyllDataBeginPrototype}%
+\ExplSyntaxOn
+\seq_gput_right:Nn
+ \g_@@_renderers_seq
+ { jekyllDataBegin }
+\prop_gput:Nnn
+ \g_@@_renderer_arities_prop
+ { jekyllDataBegin }
+ { 0 }
+\ExplSyntaxOff
+% \end{macrocode}
+% \par
+%
+% \iffalse
+%</tex>
+%<*manual-tokens>
+% \fi
+%
+% \begin{markdown}
+
+The \mdef{markdownRendererJekyllDataEnd} macro represents the end of a
+\acro{yaml} document. This macro will only be produced when the
+\Opt{jekyllData} option is enabled. The macro receives no arguments.
+
+% \end{markdown}
+%
+% \iffalse
+%</manual-tokens>
+%<*tex>
+% \fi
+%
+% \begin{macrocode}
+\def\markdownRendererJekyllDataEnd{%
+ \markdownRendererJekyllDataEndPrototype}%
+\ExplSyntaxOn
+\seq_gput_right:Nn
+ \g_@@_renderers_seq
+ { jekyllDataEnd }
+\prop_gput:Nnn
+ \g_@@_renderer_arities_prop
+ { jekyllDataEnd }
+ { 0 }
+\ExplSyntaxOff
+% \end{macrocode}
+% \par
+%
+% \iffalse
+%</tex>
+%<*manual-tokens>
+% \fi
+%
+% \begin{markdown}
+
+The \mdef{markdownRendererJekyllDataMappingBegin} macro represents the
+beginning of a mapping in a \acro{yaml} document. This macro will only be
+produced when the \Opt{jekyllData} option is enabled. The macro receives two
+arguments: the scalar key in the parent structure, cast to a string following
+\acro{yaml} serialization rules, and the number of items in the mapping.
+
+% \end{markdown}
+%
+% \iffalse
+%</manual-tokens>
+%<*tex>
+% \fi
+%
+% \begin{macrocode}
+\def\markdownRendererJekyllDataMappingBegin{%
+ \markdownRendererJekyllDataMappingBeginPrototype}%
+\ExplSyntaxOn
+\seq_gput_right:Nn
+ \g_@@_renderers_seq
+ { jekyllDataMappingBegin }
+\prop_gput:Nnn
+ \g_@@_renderer_arities_prop
+ { jekyllDataMappingBegin }
{ 2 }
\ExplSyntaxOff
% \end{macrocode}
@@ -15710,76 +15899,130 @@ option is enabled.
%
% \begin{markdown}
-The \mdef{markdownRendererInputRawBlock} macro represents a raw block. The
-macro receives two arguments: the filename of a file contaning the raw block
-and the raw attribute that designates the format of the raw block. This macro
-will only be produced, when the \Opt{rawAttribute} and \Opt{fencedCode} options
-are enabled.
+The \mdef{markdownRendererJekyllDataMappingEnd} macro represents the
+end of a mapping in a \acro{yaml} document. This macro will only be produced
+when the \Opt{jekyllData} option is enabled. The macro receives no arguments.
% \end{markdown}
%
% \iffalse
+%</manual-tokens>
+%<*tex>
+% \fi
+%
+% \begin{macrocode}
+\def\markdownRendererJekyllDataMappingEnd{%
+ \markdownRendererJekyllDataMappingEndPrototype}%
+\ExplSyntaxOn
+\seq_gput_right:Nn
+ \g_@@_renderers_seq
+ { jekyllDataMappingEnd }
+\prop_gput:Nnn
+ \g_@@_renderer_arities_prop
+ { jekyllDataMappingEnd }
+ { 0 }
+\ExplSyntaxOff
+% \end{macrocode}
+% \par
+%
+% \iffalse
+%</tex>
+%<*manual-tokens>
+% \fi
+%
+% \begin{markdown}
-##### \LaTeX{} Example {.unnumbered}
+The \mdef{markdownRendererJekyllDataSequenceBegin} macro represents the
+beginning of a sequence in a \acro{yaml} document. This macro will only be
+produced when the \Opt{jekyllData} option is enabled. The macro receives two
+arguments: the scalar key in the parent structure, cast to a string following
+\acro{yaml} serialization rules, and the number of items in the sequence.
-Using a text editor, create a text document named `document.tex` with the
-following content:
-```` tex
-\documentclass{article}
-\usepackage[rawAttribute, fencedCode]{markdown}
-\usepackage{expl3}
+% \end{markdown}
+%
+% \iffalse
+%</manual-tokens>
+%<*tex>
+% \fi
+%
+% \begin{macrocode}
+\def\markdownRendererJekyllDataSequenceBegin{%
+ \markdownRendererJekyllDataSequenceBeginPrototype}%
\ExplSyntaxOn
-\cs_new:Nn
- \display_raw_content:nn
- {
- % If the raw attribute is TeX, execute the content as a TeX document.
- \str_if_eq:nnTF
- { #2 }
- { tex }
- { \markdownEscape { #1 } }
- % Otherwise, ignore the content.
- { }
- }
-\markdownSetup{
- renderers = {
- rawInline = { \display_raw_content:nn { #1 } { #2 } },
- rawBlock = { \display_raw_content:nn { #1 } { #2 } }
- },
-}
+\seq_gput_right:Nn
+ \g_@@_renderers_seq
+ { jekyllDataSequenceBegin }
+\prop_gput:Nnn
+ \g_@@_renderer_arities_prop
+ { jekyllDataSequenceBegin }
+ { 2 }
\ExplSyntaxOff
-\begin{document}
-\begin{markdown}
-`$H_2 O$`{=tex} is a liquid.
+% \end{macrocode}
+% \par
+%
+% \iffalse
+%</tex>
+%<*manual-tokens>
+% \fi
+%
+% \begin{markdown}
-``` {=html}
-<p>Here is some HTML content that will be ignored.</p>
-```
-\end{markdown}
-\end{document}
-````
-Next, invoke LuaTeX from the terminal:
-``` sh
-lualatex document.tex
-``````
-A PDF document named `document.pdf` should be produced and contain the
-following text:
+The \mdef{markdownRendererJekyllDataSequenceEnd} macro represents the
+end of a sequence in a \acro{yaml} document. This macro will only be produced
+when the \Opt{jekyllData} option is enabled. The macro receives no arguments.
-> H~2~O is a liquid.
+% \end{markdown}
+%
+% \iffalse
+%</manual-tokens>
+%<*tex>
+% \fi
+%
+% \begin{macrocode}
+\def\markdownRendererJekyllDataSequenceEnd{%
+ \markdownRendererJekyllDataSequenceEndPrototype}%
+\ExplSyntaxOn
+\seq_gput_right:Nn
+ \g_@@_renderers_seq
+ { jekyllDataSequenceEnd }
+\prop_gput:Nnn
+ \g_@@_renderer_arities_prop
+ { jekyllDataSequenceEnd }
+ { 0 }
+\ExplSyntaxOff
+% \end{macrocode}
+% \par
+%
+% \iffalse
+%</tex>
+%<*manual-tokens>
+% \fi
+%
+% \begin{markdown}
+The \mdef{markdownRendererJekyllDataBoolean} macro represents a boolean scalar
+value in a \acro{yaml} document. This macro will only be produced when the
+\Opt{jekyllData} option is enabled. The macro receives two arguments: the
+scalar key in the parent structure, and the scalar value, both cast to a string
+following \acro{yaml} serialization rules.
+
+% \end{markdown}
+%
+% \iffalse
%</manual-tokens>
%<*tex>
% \fi
%
% \begin{macrocode}
-\def\markdownRendererInputRawBlock{%
- \markdownRendererInputRawBlockPrototype}%
+\def\markdownRendererJekyllDataBoolean{%
+ \markdownRendererJekyllDataBooleanPrototype}%
\ExplSyntaxOn
\seq_gput_right:Nn
\g_@@_renderers_seq
- { inputRawBlock }
+ { jekyllDataBoolean }
\prop_gput:Nnn
\g_@@_renderer_arities_prop
- { inputRawBlock }
+ { jekyllDataBoolean }
{ 2 }
\ExplSyntaxOff
% \end{macrocode}
@@ -15792,6 +16035,209 @@ following text:
%
% \begin{markdown}
+The \mdef{markdownRendererJekyllDataNumber} macro represents a numeric scalar
+value in a \acro{yaml} document. This macro will only be produced when the
+\Opt{jekyllData} option is enabled. The macro receives two arguments: the
+scalar key in the parent structure, and the scalar value, both cast to a string
+following \acro{yaml} serialization rules.
+
+% \end{markdown}
+%
+% \iffalse
+%</manual-tokens>
+%<*tex>
+% \fi
+%
+% \begin{macrocode}
+\def\markdownRendererJekyllDataNumber{%
+ \markdownRendererJekyllDataNumberPrototype}%
+\ExplSyntaxOn
+\seq_gput_right:Nn
+ \g_@@_renderers_seq
+ { jekyllDataNumber }
+\prop_gput:Nnn
+ \g_@@_renderer_arities_prop
+ { jekyllDataNumber }
+ { 2 }
+\ExplSyntaxOff
+% \end{macrocode}
+% \par
+%
+% \iffalse
+%</tex>
+%<*manual-tokens>
+% \fi
+%
+% \begin{markdown}
+
+The \mdef{markdownRendererJekyllDataString} macro represents a string scalar
+value in a \acro{yaml} document. This macro will only be produced when the
+\Opt{jekyllData} option is enabled. The macro receives two arguments: the
+scalar key in the parent structure, cast to a string following \acro{yaml}
+serialization rules, and the scalar value.
+
+% \end{markdown}
+%
+% \iffalse
+%</manual-tokens>
+%<*tex>
+% \fi
+%
+% \begin{macrocode}
+\def\markdownRendererJekyllDataString{%
+ \markdownRendererJekyllDataStringPrototype}%
+\ExplSyntaxOn
+\seq_gput_right:Nn
+ \g_@@_renderers_seq
+ { jekyllDataString }
+\prop_gput:Nnn
+ \g_@@_renderer_arities_prop
+ { jekyllDataString }
+ { 2 }
+\ExplSyntaxOff
+% \end{macrocode}
+% \par
+%
+% \iffalse
+%</tex>
+%<*manual-tokens>
+% \fi
+%
+% \begin{markdown}
+
+The \mdef{markdownRendererJekyllDataEmpty} macro represents an empty scalar
+value in a \acro{yaml} document. This macro will only be produced when the
+\Opt{jekyllData} option is enabled. The macro receives one argument: the
+scalar key in the parent structure, cast to a string following \acro{yaml}
+serialization rules.
+
+% See also Section <#sec:expl3yamlmetadata> for the description of the
+% high-level expl3 interface that you can also use to react to \acro{yaml}
+% metadata.
+%
+% \end{markdown}
+%
+% \iffalse
+%</manual-tokens>
+%<*tex>
+% \fi
+%
+% \begin{macrocode}
+\def\markdownRendererJekyllDataEmpty{%
+ \markdownRendererJekyllDataEmptyPrototype}%
+\ExplSyntaxOn
+\seq_gput_right:Nn
+ \g_@@_renderers_seq
+ { jekyllDataEmpty }
+\prop_gput:Nnn
+ \g_@@_renderer_arities_prop
+ { jekyllDataEmpty }
+ { 1 }
+\ExplSyntaxOff
+% \end{macrocode}
+% \par
+%
+% \iffalse
+%</tex>
+%<*manual-tokens>
+
+##### Plain \TeX{} Example {.unnumbered}
+
+Using a text editor, create a text document named `document.tex` with the
+following content:
+``` tex
+\input markdown
+\def\markdownOptionJekyllData{true}
+\def\markdownRendererJekyllDataString#1#2{\gdef\name{#2}}
+\def\markdownRendererJekyllDataNumber#1#2{\gdef\age{#2}}
+\def\markdownRendererJekyllDataEnd{%
+ \name{} is \age{} years old.}
+\markdownBegin
+---
+name: Jane Doe
+age: 99
+---
+\markdownEnd
+\bye
+```````
+Next, invoke LuaTeX from the terminal:
+``` sh
+luatex document.tex
+``````
+A PDF document named `document.pdf` should be produced and contain the
+following text:
+
+> Jane Doe is 99 years old.
+
+##### \LaTeX{} Example {.unnumbered}
+
+Using a text editor, create a text document named `document.tex` with the
+following content:
+``` tex
+\documentclass{article}
+\usepackage[jekyllData]{markdown}
+\markdownSetup{
+ renderers = {
+ jekyllDataString = {\gdef\name{#2}},
+ jekyllDataNumber = {\gdef\age{#2}},
+ jekyllDataEnd = {\name{} is \age{} years old.},
+ }
+}
+\begin{document}
+
+\begin{markdown}
+---
+name: Jane Doe
+age: 99
+---
+\end{markdown}
+
+\end{document}
+```````
+Next, invoke LuaTeX from the terminal:
+``` sh
+lualatex document.tex
+``````
+A PDF document named `document.pdf` should be produced and contain the
+following text:
+
+> Jane Doe is 99 years old.
+
+##### \Hologo{ConTeXt} Example {.unnumbered}
+
+Using a text editor, create a text document named `document.tex` with the
+following content:
+``` tex
+\usemodule[t][markdown]
+\setupmarkdown[jekyllData = yes]
+\def\markdownRendererJekyllDataString#1#2{\gdef\name{#2}}
+\def\markdownRendererJekyllDataNumber#1#2{\gdef\age{#2}}
+\def\markdownRendererJekyllDataEnd{%
+ \name{} is \age{} years old.}
+\starttext
+
+\startmarkdown
+---
+name: Jane Doe
+age: 99
+---
+\stopmarkdown
+
+\stoptext
+```````
+Next, invoke LuaTeX from the terminal:
+``` sh
+context document.tex
+``````
+A PDF document named `document.pdf` should be produced and contain the
+following text:
+
+> Jane Doe is 99 years old.
+
+% \fi
+%
+% \begin{markdown}
+
### Token Renderer Prototypes {#texrendererprototypes}
% \end{markdown}
@@ -16056,8 +16502,8 @@ following text:
% \end{macrocode}
% \begin{markdown}
%
-% The \mdef{markdownRendererFootnote} and
-% \mdef{markdownRendererFootnotePrototype} macros have been deprecated
+% The \mref{markdownRendererFootnote} and
+% \mref{markdownRendererFootnotePrototype} macros have been deprecated
% and will be removed in Markdown 3.0.0.
%
% \end{markdown}
@@ -16067,8 +16513,8 @@ following text:
% \end{macrocode}
% \begin{markdown}
%
-% The \mdef{markdownRendererHorizontalRule} and
-% \mdef{markdownRendererHorizontalRulePrototype} macros have been deprecated
+% The \mref{markdownRendererHorizontalRule} and
+% \mref{markdownRendererHorizontalRulePrototype} macros have been deprecated
% and will be removed in Markdown 3.0.0.
%
% \end{markdown}
@@ -16181,7 +16627,7 @@ following text:
% as follows:
%
% - `0` – Shell escape via the 18 output file stream
-% - `1` – Shell escape via the Lua \luamref{os.execute} method
+% - `1` – Shell escape via the Lua `os.execute` method
% - `2` – Direct Lua access
% - `3` – The \pkg{lt3luabridge} Lua package
%
@@ -16223,6 +16669,7 @@ following text:
}
}
}
+\ExplSyntaxOff
% \end{macrocode}
% \par
% \begin{markdown}
@@ -16307,8 +16754,8 @@ pdflatex --shell-escape document.tex
% Section <#sec:texinterface>).
%
% The \LaTeX{} implementation redefines the plain \TeX{} logging macros (see
-% Section <#sec:texinterfacelogging>) to use the \LaTeX{} \mref{PackageInfo},
-% \mref{PackageWarning}, and \mref{PackageError} macros.
+% Section <#sec:texinterfacelogging>) to use the \LaTeX{} `\PackageInfo`,
+% `\PackageWarning`, and `\PackageError` macros.
%
% \end{markdown}
% \begin{macrocode}
@@ -16327,7 +16774,7 @@ pdflatex --shell-escape document.tex
% \end{Verbatim}
% \begin{markdown}
% where \meta{options} are the \LaTeX{} interface options (see Section
-% <#sec:latexoptions>). Note that \meta{options} inside the \mref{usepackage}
+% <#sec:latexoptions>). Note that \meta{options} inside the `\usepackage`
% macro may not set the `markdownRenderers` (see Section
% <#sec:latexrenderers>) and `markdownRendererPrototypes` (see Section
% <#sec:latexrendererprototypes>) keys. This limitation is due to the way
@@ -16354,8 +16801,8 @@ pdflatex --shell-escape document.tex
% \end{macrocode}
% \markdownBegin
%
-% You may prepend your own code to the \mref{markdown} macro and append your own
-% code to the \mref{endmarkdown} macro to produce special effects before and after
+% You may prepend your own code to the \mdef{markdown} macro and append your own
+% code to the \mdef{endmarkdown} macro to produce special effects before and after
% the \envmref{markdown} \LaTeX{} environment (and likewise for the starred
% version).
%
@@ -16597,7 +17044,7 @@ without low-level programming.
% *name* is *qualified* and contains no underscores, and a value is qualified
% if and only if it contains at least one forward slash. Themes are inspired by
% the Beamer \LaTeX{} package, which provides similar functionality with its
-% \mref{usetheme} macro [@tantau21, Section 15.1].
+% `\usetheme` macro [@tantau21, Section 15.1].
%
% Theme names must be qualified to minimize naming conflicts between different
% themes intended for a single \LaTeX{} document class or for a single \LaTeX{}
@@ -16615,7 +17062,7 @@ without low-level programming.
% package named `markdownthemewitiko_beamer_MU.sty`.
%
% If the \LaTeX{} option with key `theme` is (repeatedly) specified in the
-% \mref{usepackage} macro, the loading of the theme(s) will be postponed in
+% `\usepackage` macro, the loading of the theme(s) will be postponed in
% first-in-first-out order until after the Markdown \LaTeX{} package has been
% loaded. Otherwise, the theme(s) will be loaded immediately. For example,
% there is a theme named `witiko/dot`, which typesets fenced code blocks with
@@ -16796,7 +17243,7 @@ Example themes provided with the Markdown package include:
% ```
The theme requires a Unix-like operating system with GNU Diffutils and
Graphviz installed. The theme also requires shell access unless the
- \mref{markdownOptionFrozenCache} plain \TeX{} option is enabled.
+ \Opt{frozenCache} plain \TeX{} option is enabled.
% \markdownEnd
% \iffalse
@@ -16889,7 +17336,7 @@ conference article:
The theme requires the \pkg{catchfile} \LaTeX{} package and a Unix-like
operating system with GNU Coreutils `md5sum` and either GNU Wget or cURL
installed. The theme also requires shell access unless the
- \mref{markdownOptionFrozenCache} plain \TeX{} option is enabled.
+ \Opt{frozenCache} plain \TeX{} option is enabled.
% \markdownEnd
% \iffalse
@@ -17231,7 +17678,7 @@ The following ordered list will be preceded by roman numerals:
% \par
% \begin{markdown}
%
-% The \mref{markdownOptionFinalizeCache} and \mref{markdownOptionFrozenCache} plain
+% The \Opt{finalizeCache} and \Opt{frozenCache} plain
% \TeX{} options are exposed through \LaTeX{} options with keys `finalizeCache`
% and `frozenCache`.
%
@@ -17263,8 +17710,8 @@ The following ordered list will be preceded by roman numerals:
% \begin{markdown}
%
% The following example \LaTeX{} code showcases a possible configuration of
-% plain \TeX{} interface options \mref{markdownOptionHybrid},
-% \mref{markdownOptionSmartEllipses}, and \mref{markdownOptionCacheDir}.
+% plain \TeX{} interface options \Opt{hybrid}, \Opt{smartEllipses}, and
+% \Opt{cacheDir}.
% ``` tex
% \markdownSetup{
% hybrid,
@@ -17411,7 +17858,7 @@ The following ordered list will be preceded by roman numerals:
% \begin{markdown}
%
% The following example \LaTeX{} code showcases a possible configuration of the
-% \mref{markdownRendererImagePrototype} and \mref{markdownRendererCodeSpanPrototype}
+% `\markdownRendererImagePrototype` and `\markdownRendererCodeSpanPrototype`
% markdown token renderer prototypes.
% ``` tex
% \markdownSetup{
@@ -17498,7 +17945,7 @@ texexec --passon=--shell-escape document.tex
%
% The \Hologo{ConTeXt} implementation redefines the plain \TeX{} logging macros
% (see Section <#sec:texinterfacelogging>) to use the \Hologo{ConTeXt}
-% \mref{writestatus} macro.
+% `\writestatus` macro.
%
% \end{markdown}
% \begin{macrocode}
@@ -17517,7 +17964,7 @@ texexec --passon=--shell-escape document.tex
% \usemodule[t][markdown]
% ```````
% \noindent It is expected that the special plain \TeX{} characters have the
-% expected category codes, when \mref{input}ting the file.
+% expected category codes, when `\input`ting the file.
%
%### Typesetting Markdown
% The interface exposes the \mdef{startmarkdown} and \mdef{stopmarkdown} macro
@@ -20402,7 +20849,6 @@ function M.writer.new(options)
self.escaped_uri_chars = {
["{"] = "\\markdownRendererLeftBrace{}",
["}"] = "\\markdownRendererRightBrace{}",
- ["%"] = "\\markdownRendererPercentSign{}",
["\\"] = "\\markdownRendererBackslash{}",
}
self.escaped_minimal_strings = {
@@ -20759,9 +21205,39 @@ function M.writer.new(options)
% \par
% \begin{markdown}
%
+% Define \luamdef{writer->attributes} as a function that will transform
+% input attributes `attr` to the output format.
+%
+% \end{markdown}
+% \begin{macrocode}
+ function self.attributes(attr)
+ local buf = {}
+
+ table.sort(attr)
+ local key, value
+ for i = 1, #attr do
+ if attr[i]:sub(1, 1) == "#" then
+ table.insert(buf, {"\\markdownRendererAttributeIdentifier{",
+ attr[i]:sub(2), "}"})
+ elseif attr[i]:sub(1, 1) == "." then
+ table.insert(buf, {"\\markdownRendererAttributeClassName{",
+ attr[i]:sub(2), "}"})
+ else
+ key, value = attr[i]:match("([^= ]+)%s*=%s*(.*)")
+ table.insert(buf, {"\\markdownRendererAttributeKeyValue{",
+ key, "}{", value, "}"})
+ end
+ end
+
+ return buf
+ end
+% \end{macrocode}
+% \par
+% \begin{markdown}
+%
% Define \luamdef{writer->active\_attributes} as a stack of attributes
% of the headings that are currently active. The
-% \luamref{writer->active\_headings} member variable is mutable.
+% \luamdef{writer->active\_headings} member variable is mutable.
%
% \end{markdown}
% \begin{macrocode}
@@ -20771,7 +21247,7 @@ function M.writer.new(options)
% \begin{markdown}
%
% Define \luamdef{writer->heading} as a function that will transform an
-% input heading `s` at level `level` with identifiers `identifiers` to the
+% input heading `s` at level `level` with attributes `attributes` to the
% output format.
%
% \end{markdown}
@@ -20853,21 +21329,7 @@ function M.writer.new(options)
end
if self.is_writing then
- table.sort(attributes)
- local key, value
- for i = 1, #attributes do
- if attributes[i]:sub(1, 1) == "#" then
- table.insert(buf, {"\\markdownRendererAttributeIdentifier{",
- attributes[i]:sub(2), "}"})
- elseif attributes[i]:sub(1, 1) == "." then
- table.insert(buf, {"\\markdownRendererAttributeClassName{",
- attributes[i]:sub(2), "}"})
- else
- key, value = attributes[i]:match("([^= ]+)%s*=%s*(.*)")
- table.insert(buf, {"\\markdownRendererAttributeKeyValue{",
- key, "}{", value, "}"})
- end
- end
+ table.insert(buf, self.attributes(attributes))
end
local cmd
@@ -21015,7 +21477,8 @@ parsers.doubletildes = P("~~")
parsers.fourspaces = P(" ")
parsers.any = P(1)
-parsers.fail = parsers.any - 1
+parsers.succeed = P(true)
+parsers.fail = P(false)
parsers.escapable = S("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~")
parsers.anyescaped = parsers.backslash / "" * parsers.escapable
@@ -21232,14 +21695,31 @@ local function captures_geq_length(_,i,a,b)
return #a >= #b and i
end
-parsers.infostring = (parsers.linechar - (parsers.backtick
- + parsers.space^1 * (parsers.newline + parsers.eof)))^0
+parsers.tilde_infostring
+ = C((parsers.linechar
+ - (parsers.spacechar^1 * parsers.newline))^0)
+ * parsers.optionalspace
+ * (parsers.newline + parsers.eof)
+
+parsers.backtick_infostring
+ = C((parsers.linechar
+ - (parsers.backtick
+ + parsers.spacechar^1 * parsers.newline))^0)
+ * parsers.optionalspace
+ * (parsers.newline + parsers.eof)
local fenceindent
-parsers.fencehead = function(char)
+parsers.fencehead = function(char, infostring)
+ return C(parsers.nonindentspace) / function(s) fenceindent = #s end
+ * Cg(char^3, "fencelength")
+ * parsers.optionalspace * infostring
+end
+
+parsers.fencehead_with_attributes
+ = function(char)
return C(parsers.nonindentspace) / function(s) fenceindent = #s end
* Cg(char^3, "fencelength")
- * parsers.optionalspace * C(parsers.infostring)
+ * parsers.optionalspace * Ct(parsers.attributes)
* parsers.optionalspace * (parsers.newline + parsers.eof)
end
@@ -21503,12 +21983,14 @@ parsers.urlchar = parsers.anyescaped - parsers.newline - parsers.more
% \end{markdown}
% \begin{macrocode}
parsers.TildeFencedCode
- = parsers.fencehead(parsers.tilde)
+ = parsers.fencehead(parsers.tilde,
+ parsers.tilde_infostring)
* Cs(parsers.fencedline(parsers.tilde)^0)
* parsers.fencetail(parsers.tilde)
parsers.BacktickFencedCode
- = parsers.fencehead(parsers.backtick)
+ = parsers.fencehead(parsers.backtick,
+ parsers.backtick_infostring)
* Cs(parsers.fencedline(parsers.backtick)^0)
* parsers.fencetail(parsers.backtick)
@@ -21578,7 +22060,7 @@ function M.reader.new(writer, options)
% \begin{markdown}
%
% Create a \luamdef{reader->parsers} hash table that stores \acro{peg} patterns
-% that depend on the received `options`. Make \luamdef{reader->parsers} inherit
+% that depend on the received `options`. Make \luamref{reader->parsers} inherit
% from the global \luamref{parsers} table.
%
% \end{markdown}
@@ -21804,14 +22286,6 @@ function M.reader.new(writer, options)
% \par
% \begin{markdown}
%
-%#### Parsers Used for Notes (local)
-%
-% \end{markdown}
-% \begin{macrocode}
-% \end{macrocode}
-% \par
-% \begin{markdown}
-%
%#### Helpers for Links and References (local)
%
% \end{markdown}
@@ -22220,7 +22694,7 @@ function M.reader.new(writer, options)
% \begin{markdown}
%
% Create a local writable copy of the global read-only
-% \luamdef{walkable_syntax} hash table. This table can be used by user-defined
+% \luamref{walkable_syntax} hash table. This table can be used by user-defined
% syntax extensions to insert new \acro{peg} patterns into existing rules
% of the \acro{peg} grammar of markdown using
% the \luamref{reader->insert_pattern} method. Furthermore, built-in syntax
@@ -22300,12 +22774,12 @@ function M.reader.new(writer, options)
local syntax =
{ "Blocks",
- Blocks = ( V("ExpectedJekyllData")
- * (V("Blank")^0 / writer.interblocksep)
- )^-1
+ Blocks = V("InitializeState")
+ * ( V("ExpectedJekyllData")
+ * (V("Blank")^0 / writer.interblocksep))^-1
* V("Blank")^0
* V("Block")^-1
- * (V("Blank")^0 / writer.interblocksep
+ * ( V("Blank")^0 / writer.interblocksep
* V("Block"))^0
* V("Blank")^0 * parsers.eof,
@@ -22344,23 +22818,37 @@ function M.reader.new(writer, options)
Smart = parsers.Smart,
Symbol = parsers.Symbol,
SpecialChar = parsers.fail,
+ InitializeState = parsers.succeed,
}
% \end{macrocode}
% \par
% \begin{markdown}
%
% Define \luamref{reader->update_rule} as a function that receives two
-% arguments: a left-hand side terminal symbol and a \acro{peg} pattern.
-% The function (re)defines \luamref{walkable_syntax}`[`left-hand side terminal
-% symbol`]` to be equal to pattern.
+% arguments: a left-hand side terminal symbol and a function that accepts
+% the current \acro{peg} pattern in \luamref{walkable_syntax}`[`left-hand side
+% terminal symbol`]` if defined or `nil` otherwise and returns a
+% \acro{peg} pattern that will (re)define \luamref{walkable_syntax}`[`left-hand
+% side terminal symbol`]`.
%
% \end{markdown}
% \begin{macrocode}
- self.update_rule = function(rule_name, pattern)
+ self.update_rule = function(rule_name, get_pattern)
assert(current_extension_name ~= nil)
assert(syntax[rule_name] ~= nil,
[[Rule ]] .. rule_name .. [[ -> ... does not exist in markdown grammar]])
- local accountable_pattern = { pattern, current_extension_name, rule_name }
+ local previous_pattern
+ local extension_name
+ if walkable_syntax[rule_name] then
+ local previous_accountable_pattern = walkable_syntax[rule_name][1]
+ previous_pattern = previous_accountable_pattern[1]
+ extension_name = previous_accountable_pattern[2] .. ", " .. current_extension_name
+ else
+ previous_pattern = nil
+ extension_name = current_extension_name
+ end
+ local pattern = get_pattern(previous_pattern)
+ local accountable_pattern = { pattern, extension_name, rule_name }
walkable_syntax[rule_name] = { accountable_pattern }
end
% \end{macrocode}
@@ -22390,6 +22878,19 @@ function M.reader.new(writer, options)
% \par
% \begin{markdown}
%
+% Add method \luamdef{reader->initialize_named_group} that defines named groups
+% with a default capture value.
+%
+% \end{markdown}
+% \begin{macrocode}
+ self.initialize_named_group = function(name, value)
+ syntax.InitializeState = syntax.InitializeState
+ * Cg(Ct("") / value, name)
+ end
+% \end{macrocode}
+% \par
+% \begin{markdown}
+%
% Apply syntax extensions.
%
% \end{markdown}
@@ -22556,7 +23057,10 @@ function M.reader.new(writer, options)
local inlines_t = util.table_copy(syntax)
inlines_t[1] = "Inlines"
- inlines_t.Inlines = parsers.Inline^0 * (parsers.spacing^0 * parsers.eof / "")
+ inlines_t.Inlines = V("InitializeState")
+ * parsers.Inline^0
+ * ( parsers.spacing^0
+ * parsers.eof / "")
parsers.inlines = Ct(inlines_t)
local inlines_no_link_t = util.table_copy(inlines_t)
@@ -22665,7 +23169,7 @@ end
%
%### Built-In Syntax Extensions {#luabuiltinextensions}
%
-% Create \luamdef{extensions} hash table that contains built-in syntax
+% Create \luamref{extensions} hash table that contains built-in syntax
% extensions. Syntax extensions are functions that produce objects with two
% methods: `extend_writer` and `extend_reader`. The `extend_writer` object
% takes a \luamref{writer} object as the only parameter and mutates it.
@@ -22678,6 +23182,50 @@ M.extensions = {}
% \end{macrocode}
% \begin{markdown}
%
+%#### Bracketed Spans
+%
+% The \luamdef{extensions.bracketed_spans} function implements the Pandoc
+% bracketed spans syntax extension.
+%
+% \end{markdown}
+% \begin{macrocode}
+M.extensions.bracketed_spans = function()
+ return {
+ name = "built-in bracketed_spans syntax extension",
+ extend_writer = function(self)
+% \end{macrocode}
+% \par
+% \begin{markdown}
+%
+% Define \luamdef{writer->span} as a function that will transform an input
+% bracketed span `s` with attributes `attr` to the output format.
+%
+% \end{markdown}
+% \begin{macrocode}
+ function self.span(s, attr)
+ return {"\\markdownRendererBracketedSpanAttributeContextBegin",
+ self.attributes(attr),
+ s,
+ "\\markdownRendererBracketedSpanAttributeContextEnd{}"}
+ end
+ end, extend_reader = function(self)
+ local parsers = self.parsers
+ local writer = self.writer
+
+ local Span = parsers.between(parsers.Inline,
+ parsers.lbracket,
+ parsers.rbracket)
+ * Ct(parsers.attributes)
+ / writer.span
+
+ self.insert_pattern("Inline after Emph",
+ Span, "Span")
+ end
+ }
+end
+% \end{macrocode}
+% \begin{markdown}
+%
%#### Citations
%
% The \luamdef{extensions.citations} function implements the Pandoc citation
@@ -22726,7 +23274,7 @@ M.extensions.citations = function(citation_nbsps)
% \begin{markdown}
%
% Define \luamdef{writer->citation} as a function that will transform an input
-% citation name `c` to the output format. If \luamref{writer->hybrid} is `true`,
+% citation name `c` to the output format. If option \Opt{hybrid} is enabled,
% use the \luamref{writer->escape_minimal} function. Otherwise, use the
% \luamref{escape_citation} function.
%
@@ -23052,9 +23600,9 @@ end
%
%#### Definition Lists
%
-% The \luamdef{extensions.definition_lists} function implements the definition
-% list syntax extension. If the `tight_lists` parameter is `true`, tight lists
-% will produce special right item renderers.
+% The \luamdef{extensions.definition_lists} function implements the Pandoc
+% definition list syntax extension. If the `tight_lists` parameter is `true`,
+% tight lists will produce special right item renderers.
%
% \end{markdown}
% \begin{macrocode}
@@ -23150,12 +23698,213 @@ end
% \end{macrocode}
% \begin{markdown}
%
+%#### Fancy Lists
+%
+% The \luamdef{extensions.fancy_lists} function implements the Pandoc fancy
+% list syntax extension.
+%
+% \end{markdown}
+% \begin{macrocode}
+M.extensions.fancy_lists = function()
+ return {
+ name = "built-in fancy_lists syntax extension",
+ extend_writer = function(self)
+ local options = self.options
+
+% \end{macrocode}
+% \par
+% \begin{markdown}
+%
+% Define \luamdef{writer->fancylist} as a function that will transform an
+% input ordered list to the output format, where:
+%
+%- `items` is an array of the list items,
+%- `tight` specifies, whether the list is tight or not,
+%- `startnum` is the number of the first list item,
+%- `numstyle` is the style of the list item labels from among the following:
+% - `Decimal` -- decimal arabic numbers,
+% - `LowerRoman` -- lower roman numbers,
+% - `UpperRoman` -- upper roman numbers,
+% - `LowerAlpha` -- lower ASCII alphabetic characters, and
+% - `UpperAlpha` -- upper ASCII alphabetic characters, and
+%- `numdelim` is the style of delimiters between list item labels and
+% texts from among the following:
+% - `Default` -- default style,
+% - `OneParen` -- parentheses, and
+% - `Period` -- periods.
+%
+% \end{markdown}
+% \begin{macrocode}
+ function self.fancylist(items,tight,startnum,numstyle,numdelim)
+ if not self.is_writing then return "" end
+ local buffer = {}
+ local num = startnum
+ for _,item in ipairs(items) do
+ buffer[#buffer + 1] = self.fancyitem(item,num)
+ if num ~= nil then
+ num = num + 1
+ end
+ end
+ local contents = util.intersperse(buffer,"\n")
+ if tight and options.tightLists then
+ return {"\\markdownRendererFancyOlBeginTight{",
+ numstyle,"}{",numdelim,"}",contents,
+ "\n\\markdownRendererFancyOlEndTight "}
+ else
+ return {"\\markdownRendererFancyOlBegin{",
+ numstyle,"}{",numdelim,"}",contents,
+ "\n\\markdownRendererFancyOlEnd "}
+ end
+ end
+% \end{macrocode}
+% \begin{markdown}
+%
+% Define \luamdef{writer->fancyitem} as a function that will transform an
+% input fancy ordered list item to the output format, where `s` is the text of
+% the list item. If the optional parameter `num` is present, it is the number
+% of the list item.
+%
+% \end{markdown}
+% \begin{macrocode}
+ function self.fancyitem(s,num)
+ if num ~= nil then
+ return {"\\markdownRendererFancyOlItemWithNumber{",num,"}",s,
+ "\\markdownRendererFancyOlItemEnd "}
+ else
+ return {"\\markdownRendererFancyOlItem ",s,"\\markdownRendererFancyOlItemEnd "}
+ end
+ end
+ end, extend_reader = function(self)
+ local parsers = self.parsers
+ local options = self.options
+ local writer = self.writer
+
+ local label = parsers.dig + parsers.letter
+ local numdelim = parsers.period + parsers.rparent
+ local enumerator = C(label^3 * numdelim) * #parsers.spacing
+ + C(label^2 * numdelim) * #parsers.spacing
+ * (parsers.tab + parsers.space^1)
+ + C(label * numdelim) * #parsers.spacing
+ * (parsers.tab + parsers.space^-2)
+ + parsers.space * C(label^2 * numdelim)
+ * #parsers.spacing
+ + parsers.space * C(label * numdelim)
+ * #parsers.spacing
+ * (parsers.tab + parsers.space^-1)
+ + parsers.space * parsers.space * C(label^1
+ * numdelim) * #parsers.spacing
+ local starter = parsers.bullet + enumerator
+
+ local NestedList = Cs((parsers.optionallyindentedline
+ - starter)^1)
+ / function(a) return "\001"..a end
+
+ local ListBlockLine = parsers.optionallyindentedline
+ - parsers.blankline - (parsers.indent^-1
+ * starter)
+
+ local ListBlock = parsers.line * ListBlockLine^0
+
+ local ListContinuationBlock = parsers.blanklines * (parsers.indent / "")
+ * ListBlock
+
+ local TightListItem = function(starter)
+ return -parsers.ThematicBreak
+ * (Cs(starter / "" * parsers.tickbox^-1 * ListBlock * NestedList^-1)
+ / self.parser_functions.parse_blocks_nested)
+ * -(parsers.blanklines * parsers.indent)
+ end
+
+ local LooseListItem = function(starter)
+ return -parsers.ThematicBreak
+ * Cs( starter / "" * parsers.tickbox^-1 * ListBlock * Cc("\n")
+ * (NestedList + ListContinuationBlock^0)
+ * (parsers.blanklines / "\n\n")
+ ) / self.parser_functions.parse_blocks_nested
+ end
+
+ local function roman2number(roman)
+ local romans = { ["L"] = 50, ["X"] = 10, ["V"] = 5, ["I"] = 1 }
+ local numeral = 0
+
+ local i = 1
+ local len = string.len(roman)
+ while i < len do
+ local z1, z2 = romans[ string.sub(roman, i, i) ], romans[ string.sub(roman, i+1, i+1) ]
+ if z1 < z2 then
+ numeral = numeral + (z2 - z1)
+ i = i + 2
+ else
+ numeral = numeral + z1
+ i = i + 1
+ end
+ end
+ if i <= len then numeral = numeral + romans[ string.sub(roman,i,i) ] end
+ return numeral
+ end
+
+ local function sniffstyle(itemprefix)
+ local numstr, delimend = itemprefix:match("^([A-Za-z0-9]*)([.)]*)")
+ local numdelim
+ if delimend == ")" then
+ numdelim = "OneParen"
+ elseif delimend == "." then
+ numdelim = "Period"
+ else
+ numdelim = "Default"
+ end
+ numstr = numstr or itemprefix
+
+ local num
+ num = numstr:match("^([IVXL]+)")
+ if num then
+ return roman2number(num), "UpperRoman", numdelim
+ end
+ num = numstr:match("^([ivxl]+)")
+ if num then
+ return roman2number(string.upper(num)), "LowerRoman", numdelim
+ end
+ num = numstr:match("^([A-Z])")
+ if num then
+ return string.byte(num) - string.byte("A") + 1, "UpperAlpha", numdelim
+ end
+ num = numstr:match("^([a-z])")
+ if num then
+ return string.byte(num) - string.byte("a") + 1, "LowerAlpha", numdelim
+ end
+ return math.floor(tonumber(numstr) or 1), "Decimal", numdelim
+ end
+
+ local function fancylist(items,tight,start)
+ local startnum, numstyle, numdelim = sniffstyle(start)
+ return writer.fancylist(items,tight,
+ options.startNumber and startnum,
+ numstyle or "Decimal",
+ numdelim or "Default")
+ end
+
+ local FancyList = Cg(enumerator, "listtype") *
+ ( Ct(TightListItem(Cb("listtype"))
+ * TightListItem(enumerator)^0)
+ * Cc(true) * parsers.skipblanklines * -enumerator
+ + Ct(LooseListItem(Cb("listtype"))
+ * LooseListItem(enumerator)^0)
+ * Cc(false) * parsers.skipblanklines
+ ) * Cb("listtype") / fancylist
+
+ self.update_rule("OrderedList", function() return FancyList end)
+ end
+ }
+end
+% \end{macrocode}
+% \begin{markdown}
+%
%#### Fenced Code
%
% The \luamdef{extensions.fenced_code} function implements the commonmark
% fenced code block syntax extension. When the `blank_before_code_fence`
-% parameter is `true`, the syntax extension requires between a paragraph and
-% the following fenced code block.
+% parameter is `true`, the syntax extension requires a blank line between a
+% paragraph and the following fenced code block.
%
% \end{markdown}
% \begin{macrocode}
@@ -23186,12 +23935,12 @@ M.extensions.fenced_code = function(blank_before_code_fence)
local writer = self.writer
local FencedCode = (parsers.TildeFencedCode
- + parsers.BacktickFencedCode)
- / function(infostring, code)
- local expanded_code = self.expandtabs(code)
- return writer.fencedCode(expanded_code,
- infostring)
- end
+ + parsers.BacktickFencedCode)
+ / function(infostring, code)
+ local expanded_code = self.expandtabs(code)
+ return writer.fencedCode(expanded_code,
+ infostring)
+ end
self.insert_pattern("Block after Verbatim",
FencedCode, "FencedCode")
@@ -23200,12 +23949,18 @@ M.extensions.fenced_code = function(blank_before_code_fence)
if blank_before_code_fence then
fencestart = parsers.fail
else
- fencestart = parsers.fencehead(parsers.backtick)
- + parsers.fencehead(parsers.tilde)
+ fencestart = parsers.fencehead(parsers.backtick,
+ parsers.backtick_infostring)
+ + parsers.fencehead(parsers.tilde,
+ parsers.tilde_infostring)
end
- local EndlineExceptions = parsers.EndlineExceptions + fencestart
- self.update_rule("EndlineExceptions", EndlineExceptions)
+ self.update_rule("EndlineExceptions", function(previous_pattern)
+ if previous_pattern == nil then
+ previous_pattern = parsers.EndlineExceptions
+ end
+ return previous_pattern + fencestart
+ end)
self.add_special_character("~")
end
@@ -23214,91 +23969,133 @@ end
% \end{macrocode}
% \begin{markdown}
%
-%#### Notes
+%#### Fenced Divs
%
-% The \luamdef{extensions.notes} function implements the Pandoc note
-% and inline note syntax extensions. When the `note` parameter is
-% `true`, the Pandoc note syntax extension will be enabled. When the
-% `inline_notes` parameter is `true`, the Pandoc inline note syntax
-% extension will be enabled.
+% The \luamdef{extensions.fenced_divs} function implements the Pandoc fenced
+% divs syntax extension. When the `blank_before_div_fence` parameter is `true`,
+% the syntax extension requires a blank line between a paragraph and the
+% following fenced code block.
%
% \end{markdown}
% \begin{macrocode}
-M.extensions.notes = function(notes, inline_notes)
- assert(notes or inline_notes)
+M.extensions.fenced_divs = function(blank_before_div_fence)
return {
- name = "built-in notes syntax extension",
+ name = "built-in fenced_divs syntax extension",
extend_writer = function(self)
% \end{macrocode}
% \par
% \begin{markdown}
%
-% Define \luamdef{writer->note} as a function that will transform an
-% input note `s` to the output format.
+% Define \luamdef{writer->div} as a function that will transform an input
+% fenced div with content `c` and with attributes `attr` to the output format.
%
% \end{markdown}
% \begin{macrocode}
- function self.note(s)
- return {"\\markdownRendererNote{",s,"}"}
+ function self.div(c, attr)
+ return {"\\markdownRendererFencedDivAttributeContextBegin",
+ self.attributes(attr),
+ c,
+ "\\markdownRendererFencedDivAttributeContextEnd"}
end
end, extend_reader = function(self)
local parsers = self.parsers
local writer = self.writer
+% \end{macrocode}
+% \par
+% \begin{markdown}
+%
+% Define basic patterns for matching the opening and the closing tag of a div.
+%
+% \end{markdown}
+% \begin{macrocode}
+ local fenced_div_infostring
+ = C((parsers.linechar
+ - ( parsers.spacechar^1
+ * parsers.colon^1))^1)
- if inline_notes then
- local InlineNote
- = parsers.circumflex
- * (parsers.tag / self.parser_functions.parse_inlines_no_inline_note)
- / writer.note
-
- self.insert_pattern("Inline after Emph",
- InlineNote, "InlineNote")
- end
- if notes then
- local function strip_first_char(s)
- return s:sub(2)
- end
-
- local RawNoteRef
- = #(parsers.lbracket * parsers.circumflex)
- * parsers.tag / strip_first_char
+ local fenced_div_begin = parsers.nonindentspace
+ * parsers.colon^3
+ * parsers.optionalspace
+ * fenced_div_infostring
+ * ( parsers.spacechar^1
+ * parsers.colon^1)^0
+ * parsers.optionalspace
+ * (parsers.newline + parsers.eof)
- local rawnotes = {}
+ local fenced_div_end = parsers.nonindentspace
+ * parsers.colon^3
+ * parsers.optionalspace
+ * (parsers.newline + parsers.eof)
+% \end{macrocode}
+% \par
+% \begin{markdown}
+%
+% Initialize a named group named `div_level` for tracking how deep we are
+% nested in divs.
+%
+% \end{markdown}
+% \begin{macrocode}
+ self.initialize_named_group("div_level", "0")
- -- like indirect_link
- local function lookup_note(ref)
- return writer.defer_call(function()
- local found = rawnotes[self.normalize_tag(ref)]
- if found then
- return writer.note(
- self.parser_functions.parse_blocks_nested(found))
- else
- return {"[",
- self.parser_functions.parse_inlines("^" .. ref), "]"}
- end
- end)
+ local function increment_div_level(increment)
+ local function update_div_level(s, i, current_level) -- luacheck: ignore s i
+ current_level = tonumber(current_level)
+ local next_level = tostring(current_level + increment)
+ return true, next_level
end
- local function register_note(ref,rawnote)
- rawnotes[self.normalize_tag(ref)] = rawnote
- return ""
- end
+ return Cg( Cmt(Cb("div_level"), update_div_level)
+ , "div_level")
+ end
- local NoteRef = RawNoteRef / lookup_note
+ local FencedDiv = fenced_div_begin * increment_div_level(1)
+ * parsers.skipblanklines
+ * Ct( (V("Block") - fenced_div_end)^-1
+ * ( parsers.blanklines
+ / function()
+ return writer.interblocksep
+ end
+ * (V("Block") - fenced_div_end))^0)
+ * parsers.skipblanklines
+ * fenced_div_end * increment_div_level(-1)
+ / function (infostring, div)
+ local attr = lpeg.match(Ct(parsers.attributes), infostring)
+ if attr == nil then
+ attr = {"." .. infostring}
+ end
+ return div, attr
+ end
+ / writer.div
- local NoteBlock
- = parsers.leader * RawNoteRef * parsers.colon
- * parsers.spnl * parsers.indented_blocks(parsers.chunk)
- / register_note
+ self.insert_pattern("Block after Verbatim",
+ FencedDiv, "FencedDiv")
- local Blank = NoteBlock + parsers.Blank
- self.update_rule("Blank", Blank)
+ self.add_special_character(":")
+% \end{macrocode}
+% \par
+% \begin{markdown}
+%
+% If the `blank_before_div_fence` parameter is `false`, we will have the
+% closing div at the beginning of a line break the current paragraph if
+% we are currently nested in a div.
+%
+% \end{markdown}
+% \begin{macrocode}
+ if not blank_before_div_fence then
+ local function check_div_level(s, i, current_level) -- luacheck: ignore s i
+ current_level = tonumber(current_level)
+ return current_level > 0
+ end
- self.insert_pattern("Inline after Emph",
- NoteRef, "NoteRef")
+ local is_inside_div = Cmt(Cb("div_level"), check_div_level)
+ local fencestart = is_inside_div * fenced_div_end
+ self.update_rule("EndlineExceptions", function(previous_pattern)
+ if previous_pattern == nil then
+ previous_pattern = parsers.EndlineExceptions
+ end
+ return previous_pattern + fencestart
+ end)
end
-
- self.add_special_character("^")
end
}
end
@@ -23307,8 +24104,8 @@ end
%
%#### Header Attributes
%
-% The \luamdef{extensions.header_attributes} function implements a syntax
-% extension that enables the assignment of HTML attributes to headings.
+% The \luamdef{extensions.header_attributes} function implements the Pandoc
+% header attributes syntax extension.
%
% \end{markdown}
% \begin{macrocode}
@@ -23363,164 +24160,98 @@ M.extensions.header_attributes = function()
/ writer.heading
local Heading = AtxHeading + SetextHeading
- self.update_rule("Heading", Heading)
+ self.update_rule("Heading", function() return Heading end)
end
}
end
% \end{macrocode}
% \begin{markdown}
%
-%#### YAML Metadata
+%#### Notes
%
-% The \luamdef{extensions.jekyll_data} function implements the Pandoc
-% `yaml_metadata_block` syntax extension for entering metadata in \acro{yaml}.
-% When the `expect_jekyll_data` parameter is `true`, then a markdown document
-% may begin directly with \acro{yaml} metadata and may contain nothing but
-% \acro{yaml} metadata
+% The \luamdef{extensions.notes} function implements the Pandoc note
+% and inline note syntax extensions. When the `note` parameter is
+% `true`, the Pandoc note syntax extension will be enabled. When the
+% `inline_notes` parameter is `true`, the Pandoc inline note syntax
+% extension will be enabled.
%
% \end{markdown}
% \begin{macrocode}
-M.extensions.jekyll_data = function(expect_jekyll_data)
+M.extensions.notes = function(notes, inline_notes)
+ assert(notes or inline_notes)
return {
- name = "built-in jekyll_data syntax extension",
+ name = "built-in notes syntax extension",
extend_writer = function(self)
% \end{macrocode}
% \par
% \begin{markdown}
%
-% Define \luamdef{writer->jekyllData} as a function that will transform an
-% input \acro{yaml} table `d` to the output format. The table is the value for
-% the key `p` in the parent table; if `p` is nil, then the table has no parent.
-% All scalar keys and values encountered in the table will be cast to a string
-% following \acro{yaml} serialization rules. String values will also be
-% transformed using the function `t`.
+% Define \luamdef{writer->note} as a function that will transform an
+% input note `s` to the output format.
%
% \end{markdown}
% \begin{macrocode}
- function self.jekyllData(d, t, p)
- if not self.is_writing then return "" end
+ function self.note(s)
+ return {"\\markdownRendererNote{",s,"}"}
+ end
+ end, extend_reader = function(self)
+ local parsers = self.parsers
+ local writer = self.writer
- local buf = {}
+ if inline_notes then
+ local InlineNote
+ = parsers.circumflex
+ * (parsers.tag / self.parser_functions.parse_inlines_no_inline_note)
+ / writer.note
- local keys = {}
- for k, _ in pairs(d) do
- table.insert(keys, k)
+ self.insert_pattern("Inline after Emph",
+ InlineNote, "InlineNote")
+ end
+ if notes then
+ local function strip_first_char(s)
+ return s:sub(2)
end
- table.sort(keys)
- if not p then
- table.insert(buf, "\\markdownRendererJekyllDataBegin")
- end
+ local RawNoteRef
+ = #(parsers.lbracket * parsers.circumflex)
+ * parsers.tag / strip_first_char
- if #d > 0 then
- table.insert(buf, "\\markdownRendererJekyllDataSequenceBegin{")
- table.insert(buf, self.uri(p or "null"))
- table.insert(buf, "}{")
- table.insert(buf, #keys)
- table.insert(buf, "}")
- else
- table.insert(buf, "\\markdownRendererJekyllDataMappingBegin{")
- table.insert(buf, self.uri(p or "null"))
- table.insert(buf, "}{")
- table.insert(buf, #keys)
- table.insert(buf, "}")
- end
+ local rawnotes = {}
- for _, k in ipairs(keys) do
- local v = d[k]
- local typ = type(v)
- k = tostring(k or "null")
- if typ == "table" and next(v) ~= nil then
- table.insert(
- buf,
- self.jekyllData(v, t, k)
- )
- else
- k = self.uri(k)
- v = tostring(v)
- if typ == "boolean" then
- table.insert(buf, "\\markdownRendererJekyllDataBoolean{")
- table.insert(buf, k)
- table.insert(buf, "}{")
- table.insert(buf, v)
- table.insert(buf, "}")
- elseif typ == "number" then
- table.insert(buf, "\\markdownRendererJekyllDataNumber{")
- table.insert(buf, k)
- table.insert(buf, "}{")
- table.insert(buf, v)
- table.insert(buf, "}")
- elseif typ == "string" then
- table.insert(buf, "\\markdownRendererJekyllDataString{")
- table.insert(buf, k)
- table.insert(buf, "}{")
- table.insert(buf, t(v))
- table.insert(buf, "}")
- elseif typ == "table" then
- table.insert(buf, "\\markdownRendererJekyllDataEmpty{")
- table.insert(buf, k)
- table.insert(buf, "}")
+ -- like indirect_link
+ local function lookup_note(ref)
+ return writer.defer_call(function()
+ local found = rawnotes[self.normalize_tag(ref)]
+ if found then
+ return writer.note(
+ self.parser_functions.parse_blocks_nested(found))
else
- error(format("Unexpected type %s for value of " ..
- "YAML key %s", typ, k))
+ return {"[",
+ self.parser_functions.parse_inlines("^" .. ref), "]"}
end
- end
- end
-
- if #d > 0 then
- table.insert(buf, "\\markdownRendererJekyllDataSequenceEnd")
- else
- table.insert(buf, "\\markdownRendererJekyllDataMappingEnd")
+ end)
end
- if not p then
- table.insert(buf, "\\markdownRendererJekyllDataEnd")
+ local function register_note(ref,rawnote)
+ rawnotes[self.normalize_tag(ref)] = rawnote
+ return ""
end
- return buf
- end
- end, extend_reader = function(self)
- local parsers = self.parsers
- local writer = self.writer
-
- local JekyllData
- = Cmt( C((parsers.line - P("---") - P("..."))^0)
- , function(s, i, text) -- luacheck: ignore s i
- local data
- local ran_ok, _ = pcall(function()
- local tinyyaml = require("markdown-tinyyaml")
- data = tinyyaml.parse(text, {timestamps=false})
- end)
- if ran_ok and data ~= nil then
- return true, writer.jekyllData(data, function(s)
- return self.parser_functions.parse_blocks_nested(s)
- end, nil)
- else
- return false
- end
- end
- )
+ local NoteRef = RawNoteRef / lookup_note
- local UnexpectedJekyllData
- = P("---")
- * parsers.blankline / 0
- * #(-parsers.blankline) -- if followed by blank, it's thematic break
- * JekyllData
- * (P("---") + P("..."))
+ local NoteBlock
+ = parsers.leader * RawNoteRef * parsers.colon
+ * parsers.spnl * parsers.indented_blocks(parsers.chunk)
+ / register_note
- local ExpectedJekyllData
- = ( P("---")
- * parsers.blankline / 0
- * #(-parsers.blankline) -- if followed by blank, it's thematic break
- )^-1
- * JekyllData
- * (P("---") + P("..."))^-1
+ local Blank = NoteBlock + parsers.Blank
+ self.update_rule("Blank", function() return Blank end)
- self.insert_pattern("Block before Blockquote",
- UnexpectedJekyllData, "UnexpectedJekyllData")
- if expect_jekyll_data then
- self.update_rule("ExpectedJekyllData", ExpectedJekyllData)
+ self.insert_pattern("Inline after Emph",
+ NoteRef, "NoteRef")
end
+
+ self.add_special_character("^")
end
}
end
@@ -23530,7 +24261,7 @@ end
%#### Pipe Tables
%
% The \luamdef{extensions.pipe_table} function implements the \acro{PHP}
-% Markdown table syntax extension (affectionately known as pipe tables). When
+% Markdown table syntax extension (also known as pipe tables in Pandoc). When
% the `table_captions` parameter is `true`, the function also implements the
% Pandoc `table_captions` syntax extension for table captions.
%
@@ -23708,7 +24439,7 @@ M.extensions.raw_attribute = function()
% \begin{markdown}
%
% Define \luamdef{writer->rawInline} as a function that will transform an
-% input inline raw span `s` with the raw attribute `i` to the output format.
+% input inline raw span `s` with the raw attribute `attr` to the output format.
%
% \end{markdown}
% \begin{macrocode}
@@ -23725,7 +24456,7 @@ M.extensions.raw_attribute = function()
% \begin{markdown}
%
% Define \luamdef{writer->rawBlock} as a function that will transform an
-% input raw block `s` with the raw attribute `i` to the output format.
+% input raw block `s` with the raw attribute `attr` to the output format.
%
% \end{markdown}
% \begin{macrocode}
@@ -23756,17 +24487,17 @@ M.extensions.raw_attribute = function()
if options.fencedCode then
local RawBlock = (parsers.TildeFencedCode
- + parsers.BacktickFencedCode)
- / function(infostring, code)
- local expanded_code = self.expandtabs(code)
- local attr = lpeg.match(raw_attribute, infostring)
- if attr then
- return writer.rawBlock(expanded_code, attr)
- else
- return writer.fencedCode(expanded_code,
- infostring)
- end
+ + parsers.BacktickFencedCode)
+ / function(infostring, code)
+ local expanded_code = self.expandtabs(code)
+ local attr = lpeg.match(raw_attribute, infostring)
+ if attr then
+ return writer.rawBlock(expanded_code, attr)
+ else
+ return writer.fencedCode(expanded_code,
+ infostring)
end
+ end
self.insert_pattern("Block after Verbatim",
RawBlock, "RawBlock")
@@ -23819,283 +24550,238 @@ end
% \end{macrocode}
% \begin{markdown}
%
-%#### Superscripts
+%#### Subscripts
%
-% The \luamdef{extensions.superscripts} function implements the Pandoc
-% superscript syntax extension.
+% The \luamdef{extensions.subscripts} function implements the Pandoc
+% subscript syntax extension.
%
% \end{markdown}
% \begin{macrocode}
-M.extensions.superscripts = function()
+M.extensions.subscripts = function()
return {
- name = "built-in superscripts syntax extension",
+ name = "built-in subscripts syntax extension",
extend_writer = function(self)
% \end{macrocode}
% \par
% \begin{markdown}
%
-% Define \luamdef{writer->superscript} as a function that will transform
-% a superscript span `s` of input text to the output format.
+% Define \luamdef{writer->subscript} as a function that will transform
+% a subscript span `s` of input text to the output format.
%
% \end{markdown}
% \begin{macrocode}
- function self.superscript(s)
- return {"\\markdownRendererSuperscript{",s,"}"}
+ function self.subscript(s)
+ return {"\\markdownRendererSubscript{",s,"}"}
end
end, extend_reader = function(self)
local parsers = self.parsers
local writer = self.writer
- local Superscript = (
- parsers.between(parsers.Str, parsers.circumflex, parsers.circumflex)
- ) / writer.superscript
+ local Subscript = (
+ parsers.between(parsers.Str, parsers.tilde, parsers.tilde)
+ ) / writer.subscript
self.insert_pattern("Inline after Emph",
- Superscript, "Superscript")
+ Subscript, "Subscript")
- self.add_special_character("^")
+ self.add_special_character("~")
end
}
end
% \end{macrocode}
% \begin{markdown}
%
-%#### Subscripts
+%#### Superscripts
%
-% The \luamdef{extensions.subscripts} function implements the Pandoc
-% subscript syntax extension.
+% The \luamdef{extensions.superscripts} function implements the Pandoc
+% superscript syntax extension.
%
% \end{markdown}
% \begin{macrocode}
-M.extensions.subscripts = function()
+M.extensions.superscripts = function()
return {
- name = "built-in subscripts syntax extension",
+ name = "built-in superscripts syntax extension",
extend_writer = function(self)
% \end{macrocode}
% \par
% \begin{markdown}
%
-% Define \luamdef{writer->subscript} as a function that will transform
-% a subscript span `s` of input text to the output format.
+% Define \luamdef{writer->superscript} as a function that will transform
+% a superscript span `s` of input text to the output format.
%
% \end{markdown}
% \begin{macrocode}
- function self.subscript(s)
- return {"\\markdownRendererSubscript{",s,"}"}
+ function self.superscript(s)
+ return {"\\markdownRendererSuperscript{",s,"}"}
end
end, extend_reader = function(self)
local parsers = self.parsers
local writer = self.writer
- local Subscript = (
- parsers.between(parsers.Str, parsers.tilde, parsers.tilde)
- ) / writer.subscript
+ local Superscript = (
+ parsers.between(parsers.Str, parsers.circumflex, parsers.circumflex)
+ ) / writer.superscript
self.insert_pattern("Inline after Emph",
- Subscript, "Subscript")
+ Superscript, "Superscript")
- self.add_special_character("~")
+ self.add_special_character("^")
end
}
end
% \end{macrocode}
% \begin{markdown}
%
-%#### Fancy Lists
+%#### YAML Metadata
%
-% The \luamdef{extensions.fancy_lists} function implements the Pandoc fancy
-% list extension.
+% The \luamdef{extensions.jekyll_data} function implements the Pandoc
+% `yaml_metadata_block` syntax extension. When the `expect_jekyll_data`
+% parameter is `true`, then a markdown document may begin directly with
+% \acro{yaml} metadata and may contain nothing but \acro{yaml} metadata.
%
% \end{markdown}
% \begin{macrocode}
-M.extensions.fancy_lists = function()
+M.extensions.jekyll_data = function(expect_jekyll_data)
return {
- name = "built-in fancy_lists syntax extension",
+ name = "built-in jekyll_data syntax extension",
extend_writer = function(self)
- local options = self.options
-
% \end{macrocode}
% \par
% \begin{markdown}
%
-% Define \luamdef{writer->fancylist} as a function that will transform an
-% input ordered list to the output format, where:
-%
-%- `items` is an array of the list items,
-%- `tight` specifies, whether the list is tight or not,
-%- `startnum` is the number of the first list item,
-%- `numstyle` is the style of the list item labels from among the following:
-% - `Decimal` -- decimal arabic numbers,
-% - `LowerRoman` -- lower roman numbers,
-% - `UpperRoman` -- upper roman numbers,
-% - `LowerAlpha` -- lower ASCII alphabetic characters, and
-% - `UpperAlpha` -- upper ASCII alphabetic characters, and
-%- `numdelim` is the style of delimiters between list item labels and
-% texts from among the following:
-% - `Default` -- default style,
-% - `OneParen` -- parentheses, and
-% - `Period` -- periods.
+% Define \luamdef{writer->jekyllData} as a function that will transform an
+% input \acro{yaml} table `d` to the output format. The table is the value for
+% the key `p` in the parent table; if `p` is nil, then the table has no parent.
+% All scalar keys and values encountered in the table will be cast to a string
+% following \acro{yaml} serialization rules. String values will also be
+% transformed using the function `t`.
%
% \end{markdown}
% \begin{macrocode}
- function self.fancylist(items,tight,startnum,numstyle,numdelim)
+ function self.jekyllData(d, t, p)
if not self.is_writing then return "" end
- local buffer = {}
- local num = startnum
- for _,item in ipairs(items) do
- buffer[#buffer + 1] = self.fancyitem(item,num)
- if num ~= nil then
- num = num + 1
- end
- end
- local contents = util.intersperse(buffer,"\n")
- if tight and options.tightLists then
- return {"\\markdownRendererFancyOlBeginTight{",
- numstyle,"}{",numdelim,"}",contents,
- "\n\\markdownRendererFancyOlEndTight "}
- else
- return {"\\markdownRendererFancyOlBegin{",
- numstyle,"}{",numdelim,"}",contents,
- "\n\\markdownRendererFancyOlEnd "}
- end
- end
-% \end{macrocode}
-% \begin{markdown}
-%
-% Define \luamdef{writer->fancyitem} as a function that will transform an
-% input fancy ordered list item to the output format, where `s` is the text of
-% the list item. If the optional parameter `num` is present, it is the number
-% of the list item.
-%
-% \end{markdown}
-% \begin{macrocode}
- function self.fancyitem(s,num)
- if num ~= nil then
- return {"\\markdownRendererFancyOlItemWithNumber{",num,"}",s,
- "\\markdownRendererFancyOlItemEnd "}
- else
- return {"\\markdownRendererFancyOlItem ",s,"\\markdownRendererFancyOlItemEnd "}
- end
- end
- end, extend_reader = function(self)
- local parsers = self.parsers
- local options = self.options
- local writer = self.writer
-
- local label = parsers.dig + parsers.letter
- local numdelim = parsers.period + parsers.rparent
- local enumerator = C(label^3 * numdelim) * #parsers.spacing
- + C(label^2 * numdelim) * #parsers.spacing
- * (parsers.tab + parsers.space^1)
- + C(label * numdelim) * #parsers.spacing
- * (parsers.tab + parsers.space^-2)
- + parsers.space * C(label^2 * numdelim)
- * #parsers.spacing
- + parsers.space * C(label * numdelim)
- * #parsers.spacing
- * (parsers.tab + parsers.space^-1)
- + parsers.space * parsers.space * C(label^1
- * numdelim) * #parsers.spacing
- local starter = parsers.bullet + enumerator
-
- local NestedList = Cs((parsers.optionallyindentedline
- - starter)^1)
- / function(a) return "\001"..a end
-
- local ListBlockLine = parsers.optionallyindentedline
- - parsers.blankline - (parsers.indent^-1
- * starter)
-
- local ListBlock = parsers.line * ListBlockLine^0
- local ListContinuationBlock = parsers.blanklines * (parsers.indent / "")
- * ListBlock
+ local buf = {}
- local TightListItem = function(starter)
- return -parsers.ThematicBreak
- * (Cs(starter / "" * parsers.tickbox^-1 * ListBlock * NestedList^-1)
- / self.parser_functions.parse_blocks_nested)
- * -(parsers.blanklines * parsers.indent)
- end
+ local keys = {}
+ for k, _ in pairs(d) do
+ table.insert(keys, k)
+ end
+ table.sort(keys)
- local LooseListItem = function(starter)
- return -parsers.ThematicBreak
- * Cs( starter / "" * parsers.tickbox^-1 * ListBlock * Cc("\n")
- * (NestedList + ListContinuationBlock^0)
- * (parsers.blanklines / "\n\n")
- ) / self.parser_functions.parse_blocks_nested
- end
+ if not p then
+ table.insert(buf, "\\markdownRendererJekyllDataBegin")
+ end
- local function roman2number(roman)
- local romans = { ["L"] = 50, ["X"] = 10, ["V"] = 5, ["I"] = 1 }
- local numeral = 0
+ if #d > 0 then
+ table.insert(buf, "\\markdownRendererJekyllDataSequenceBegin{")
+ table.insert(buf, self.uri(p or "null"))
+ table.insert(buf, "}{")
+ table.insert(buf, #keys)
+ table.insert(buf, "}")
+ else
+ table.insert(buf, "\\markdownRendererJekyllDataMappingBegin{")
+ table.insert(buf, self.uri(p or "null"))
+ table.insert(buf, "}{")
+ table.insert(buf, #keys)
+ table.insert(buf, "}")
+ end
- local i = 1
- local len = string.len(roman)
- while i < len do
- local z1, z2 = romans[ string.sub(roman, i, i) ], romans[ string.sub(roman, i+1, i+1) ]
- if z1 < z2 then
- numeral = numeral + (z2 - z1)
- i = i + 2
+ for _, k in ipairs(keys) do
+ local v = d[k]
+ local typ = type(v)
+ k = tostring(k or "null")
+ if typ == "table" and next(v) ~= nil then
+ table.insert(
+ buf,
+ self.jekyllData(v, t, k)
+ )
else
- numeral = numeral + z1
- i = i + 1
+ k = self.uri(k)
+ v = tostring(v)
+ if typ == "boolean" then
+ table.insert(buf, "\\markdownRendererJekyllDataBoolean{")
+ table.insert(buf, k)
+ table.insert(buf, "}{")
+ table.insert(buf, v)
+ table.insert(buf, "}")
+ elseif typ == "number" then
+ table.insert(buf, "\\markdownRendererJekyllDataNumber{")
+ table.insert(buf, k)
+ table.insert(buf, "}{")
+ table.insert(buf, v)
+ table.insert(buf, "}")
+ elseif typ == "string" then
+ table.insert(buf, "\\markdownRendererJekyllDataString{")
+ table.insert(buf, k)
+ table.insert(buf, "}{")
+ table.insert(buf, t(v))
+ table.insert(buf, "}")
+ elseif typ == "table" then
+ table.insert(buf, "\\markdownRendererJekyllDataEmpty{")
+ table.insert(buf, k)
+ table.insert(buf, "}")
+ else
+ error(format("Unexpected type %s for value of " ..
+ "YAML key %s", typ, k))
+ end
end
end
- if i <= len then numeral = numeral + romans[ string.sub(roman,i,i) ] end
- return numeral
- end
- local function sniffstyle(itemprefix)
- local numstr, delimend = itemprefix:match("^([A-Za-z0-9]*)([.)]*)")
- local numdelim
- if delimend == ")" then
- numdelim = "OneParen"
- elseif delimend == "." then
- numdelim = "Period"
+ if #d > 0 then
+ table.insert(buf, "\\markdownRendererJekyllDataSequenceEnd")
else
- numdelim = "Default"
+ table.insert(buf, "\\markdownRendererJekyllDataMappingEnd")
end
- numstr = numstr or itemprefix
- local num
- num = numstr:match("^([IVXL]+)")
- if num then
- return roman2number(num), "UpperRoman", numdelim
- end
- num = numstr:match("^([ivxl]+)")
- if num then
- return roman2number(string.upper(num)), "LowerRoman", numdelim
- end
- num = numstr:match("^([A-Z])")
- if num then
- return string.byte(num) - string.byte("A") + 1, "UpperAlpha", numdelim
- end
- num = numstr:match("^([a-z])")
- if num then
- return string.byte(num) - string.byte("a") + 1, "LowerAlpha", numdelim
+ if not p then
+ table.insert(buf, "\\markdownRendererJekyllDataEnd")
end
- return math.floor(tonumber(numstr) or 1), "Decimal", numdelim
- end
- local function fancylist(items,tight,start)
- local startnum, numstyle, numdelim = sniffstyle(start)
- return writer.fancylist(items,tight,
- options.startNumber and startnum,
- numstyle or "Decimal",
- numdelim or "Default")
+ return buf
end
+ end, extend_reader = function(self)
+ local parsers = self.parsers
+ local writer = self.writer
- local FancyList = Cg(enumerator, "listtype") *
- ( Ct(TightListItem(Cb("listtype"))
- * TightListItem(enumerator)^0)
- * Cc(true) * parsers.skipblanklines * -enumerator
- + Ct(LooseListItem(Cb("listtype"))
- * LooseListItem(enumerator)^0)
- * Cc(false) * parsers.skipblanklines
- ) * Cb("listtype") / fancylist
+ local JekyllData
+ = Cmt( C((parsers.line - P("---") - P("..."))^0)
+ , function(s, i, text) -- luacheck: ignore s i
+ local data
+ local ran_ok, _ = pcall(function()
+ local tinyyaml = require("markdown-tinyyaml")
+ data = tinyyaml.parse(text, {timestamps=false})
+ end)
+ if ran_ok and data ~= nil then
+ return true, writer.jekyllData(data, function(s)
+ return self.parser_functions.parse_blocks_nested(s)
+ end, nil)
+ else
+ return false
+ end
+ end
+ )
+
+ local UnexpectedJekyllData
+ = P("---")
+ * parsers.blankline / 0
+ * #(-parsers.blankline) -- if followed by blank, it's thematic break
+ * JekyllData
+ * (P("---") + P("..."))
+
+ local ExpectedJekyllData
+ = ( P("---")
+ * parsers.blankline / 0
+ * #(-parsers.blankline) -- if followed by blank, it's thematic break
+ )^-1
+ * JekyllData
+ * (P("---") + P("..."))^-1
- self.update_rule("OrderedList", FancyList)
+ self.insert_pattern("Block before Blockquote",
+ UnexpectedJekyllData, "UnexpectedJekyllData")
+ if expect_jekyll_data then
+ self.update_rule("ExpectedJekyllData", function() return ExpectedJekyllData end)
+ end
end
}
end
@@ -24132,6 +24818,11 @@ function M.new(options)
% \begin{macrocode}
local extensions = {}
+ if options.bracketedSpans then
+ local bracketed_spans_extension = M.extensions.bracketed_spans()
+ table.insert(extensions, bracketed_spans_extension)
+ end
+
if options.contentBlocks then
local content_blocks_extension = M.extensions.content_blocks(
options.contentBlocksLanguageMap)
@@ -24150,6 +24841,12 @@ function M.new(options)
table.insert(extensions, fenced_code_extension)
end
+ if options.fencedDivs then
+ local fenced_div_extension = M.extensions.fenced_divs(
+ options.blankBeforeDivFence)
+ table.insert(extensions, fenced_div_extension)
+ end
+
if options.headerAttributes then
local header_attributes_extension = M.extensions.header_attributes()
table.insert(extensions, header_attributes_extension)
@@ -24870,14 +25567,14 @@ end
%
% The \mdef{markdownPrepare} macro contains the Lua code that is executed prior
% to any conversion from markdown to plain \TeX{}. It exposes the
-% \luamref{convert} function for the use by any further Lua code.
+% `convert` function for the use by any further Lua code.
%
% \end{markdown}
% \begin{macrocode}
\def\markdownPrepare{%
% \end{macrocode}
% \begin{markdown}
-% First, ensure that the \mref{markdownOptionCacheDir} directory exists.
+% First, ensure that the \Opt{cacheDir} directory exists.
% \end{markdown}
% \begin{macrocode}
local lfs = require("lfs")
@@ -24973,7 +25670,7 @@ end
% \begin{markdown}
%
% The \mref{markdownReadAndConvert} macro is largely a rewrite of the
-% \Hologo{LaTeX2e} \mref{filecontents} macro to plain \TeX{}.
+% \Hologo{LaTeX2e} `\filecontents` macro to plain \TeX{}.
%
% \end{markdown}
% \begin{macrocode}
@@ -24985,7 +25682,7 @@ end
% backslash as an ordinary character inside the macro definition. Likewise,
% swap the character codes of the percent sign (`\%`) and the ampersand (`@`),
% so that we can remove percent signs from the beginning of lines when
-% \mref{markdownOptionStripPercentSigns} is enabled.
+% \Opt{stripPercentSigns} is enabled.
% \end{markdown}
% \begin{macrocode}
\catcode`\^^M=13%
@@ -24999,7 +25696,7 @@ end
% \end{macrocode}
% \begin{markdown}
% If we are not reading markdown documents from the frozen cache,
-% open the \mref{markdownOptionInputTempFileName} file for writing.
+% open the \Opt{inputTempFileName} file for writing.
% \end{markdown}
% \begin{macrocode}
|markdownIfOption{frozenCache}{}{@
@@ -25024,7 +25721,7 @@ end
% \begin{markdown}
% The \mdef{markdownReadAndConvertStripPercentSigns} macro will process the
% individual lines of output, stipping away leading percent signs (`\%`) when
-% \mref{markdownOptionStripPercentSigns} is enabled.
+% \Opt{stripPercentSigns} is enabled.
% Notice the use of the comments (`@`) to ensure that the entire macro is at
% a single line and therefore no (active) newline symbols
% (`^^M`) are produced.
@@ -25060,7 +25757,7 @@ end
% \begin{markdown}
% If we are not reading markdown documents from the frozen cache and the ending
% token sequence does not appear in the line, store the line in the
-% \mref{markdownOptionInputTempFileName} file.
+% \Opt{inputTempFileName} file.
% If we are reading markdown documents from the frozen cache and the
% ending token sequence does not appear in the line, gobble the line.
% \end{markdown}
@@ -25073,10 +25770,10 @@ end
% \end{macrocode}
% \begin{markdown}
% When the ending token sequence appears in the line, make the next newline
-% character close the \mref{markdownOptionInputTempFileName} file, return the
+% character close the \Opt{inputTempFileName} file, return the
% character categories back to the former state, convert the
-% \mref{markdownOptionInputTempFileName} file from markdown to plain \TeX{},
-% \mref{input} the result of the conversion, and expand the ending control
+% \Opt{inputTempFileName} file from markdown to plain \TeX{},
+% `\input` the result of the conversion, and expand the ending control
% sequence.
% \end{markdown}
% \begin{macrocode}
@@ -25181,10 +25878,10 @@ end
% whether the shell access is enabled (`1`), disabled (`0`), or restricted
% (`2`).
%
-% Inherit the value of the the \mref{pdfshellescape} (Lua\TeX{}, \Hologo{pdfTeX})
-% or the \mref{shellescape} (\Hologo{XeTeX}) commands. If neither of these
+% Inherit the value of the the `\pdfshellescape` (Lua\TeX{}, \Hologo{pdfTeX})
+% or the `\shellescape` (\Hologo{XeTeX}) commands. If neither of these
% commands is defined and Lua is available, attempt to access the
-% \luamref{status.shell_escape} configuration item.
+% `status.shell_escape` configuration item.
%
% If you cannot detect, whether the shell access is enabled, act as if it were.
%
@@ -25210,7 +25907,7 @@ end
%
% The \mdef{markdownExecuteDirect} macro executes the code it has received as
% its first argument by writing it to the output file stream 18, if Lua is
-% unavailable, or by using the Lua \luamref{os.execute} method otherwise.
+% unavailable, or by using the Lua `os.execute` method otherwise.
%
% \end{markdown}
% \begin{macrocode}
@@ -25245,8 +25942,8 @@ end
%
% The \mdef{markdownLuaExecute} macro executes the Lua code it has received as
% its first argument. The Lua code may not directly interact with the \TeX{}
-% engine, but it can use the \luamref{print} function in the same manner it
-% would use the \luamref{tex.print} method.
+% engine, but it can use the `print` function in the same manner it
+% would use the `tex.print` method.
%
% \end{markdown}
% \begin{macrocode}
@@ -25262,7 +25959,7 @@ end
|gdef|markdownLuaExecute#1{%
% \end{macrocode}
% \begin{markdown}
-% Create the file \mref{markdownOptionHelperScriptFileName} and fill it with the
+% Create the file \Opt{helperScriptFileName} and fill it with the
% input Lua code prepended with \pkg{kpathsea} initialization, so that Lua
% modules from the \TeX{} distribution are available.
% \end{markdown}
@@ -25279,7 +25976,7 @@ end
end)
% \end{macrocode}
% \begin{markdown}
-% If there was an error, use the file \mref{markdownOptionErrorTempFileName} to
+% If there was an error, use the file \Opt{errorTempFileName} to
% store the error message.
% \end{markdown}
% \begin{macrocode}
@@ -25299,9 +25996,9 @@ end
|immediate|closeout|markdownOutputFileStream
% \end{macrocode}
% \begin{markdown}
-% Execute the generated \mref{markdownOptionHelperScriptFileName} Lua script using
+% Execute the generated \Opt{helperScriptFileName} Lua script using
% the \TeX{}Lua binary and store the output in the
-% \mref{markdownOptionOutputTempFileName} file.
+% \Opt{outputTempFileName} file.
% \end{markdown}
% \begin{macrocode}
|markdownInfo{Executing a helper Lua script from the file
@@ -25313,7 +26010,7 @@ end
/|markdownOptionOutputTempFileName"}%
% \end{macrocode}
% \begin{markdown}
-% \mref{input} the generated \mref{markdownOptionOutputTempFileName} file.
+% `\input` the generated \Opt{outputTempFileName} file.
% \end{markdown}
% \begin{macrocode}
|input|markdownOptionOutputTempFileName|relax}%
@@ -25340,8 +26037,8 @@ end
% \begin{markdown}
%
% The direct Lua access version of the \mref{markdownLuaExecute} macro is defined
-% in terms of the \mref{directlua} primitive. The \luamref{print} function is set as
-% an alias to the \luamref{tex.print} method in order to mimic the behaviour of the
+% in terms of the `\directlua` primitive. The `print` function is set as
+% an alias to the `tex.print` method in order to mimic the behaviour of the
% \mref{markdownLuaExecute} definition from Section <#sec:luabridge>,
%
% \end{markdown}
@@ -25520,8 +26217,8 @@ end
%
%### Logging Facilities
% The \LaTeX{} implementation redefines the plain \TeX{} logging macros (see
-% Section <#sec:texinterfacelogging>) to use the \LaTeX{} \mref{PackageInfo},
-% \mref{PackageWarning}, and \mref{PackageError} macros.
+% Section <#sec:texinterfacelogging>) to use the \LaTeX{} `\PackageInfo`,
+% `\PackageWarning`, and `\PackageError` macros.
%
% \end{markdown}
% \begin{macrocode}
@@ -25660,7 +26357,7 @@ end
%
% If the infostring starts with `dot …`, we redefine the fenced code block
% token renderer prototype, so that it typesets the code block via Graphviz
-% tools if and only if the \mref{markdownOptionFrozenCache} plain \TeX{} option is
+% tools if and only if the \Opt{frozenCache} plain \TeX{} option is
% disabled and the code block has not been previously typeset:
%
% \end{markdown}
@@ -25723,8 +26420,8 @@ end
% \end{macrocode}
% \begin{markdown}
%
-% We define the \mref{markdown@witiko@graphicx@http@counter} counter to enumerate
-% the images for caching and the \mref{markdown@witiko@graphicx@http@filename}
+% We define the \mdef{markdown@witiko@graphicx@http@counter} counter to enumerate
+% the images for caching and the \mdef{markdown@witiko@graphicx@http@filename}
% command, which will store the pathname of the file containing the pathname
% of the downloaded image file.
%
@@ -25738,7 +26435,7 @@ end
% \end{macrocode}
% \begin{markdown}
%
-% We define the \mref{markdown@witiko@graphicx@http@download} command, which will
+% We define the \mdef{markdown@witiko@graphicx@http@download} command, which will
% receive two arguments that correspond to the URL of the online image and to
% the pathname, where the online image should be downloaded. The command will
% produce a shell command that tries to downloads the online image to the
@@ -25774,7 +26471,7 @@ end
% \begin{markdown}
%
% The image will be downloaded only if the image URL has the http or https
-% protocols and the \mref{markdownOptionFrozenCache} plain \TeX{} option is disabled:
+% protocols and the \Opt{frozenCache} plain \TeX{} option is disabled:
%
% \end{markdown}
% \begin{macrocode}
@@ -25786,7 +26483,7 @@ end
% \end{macrocode}
% \begin{markdown}
%
-% The image will be downloaded to the pathname \mref{markdownOptionCacheDir}<!--
+% The image will be downloaded to the pathname \Opt{cacheDir}<!--
% -->`/`\meta{the MD5 digest of the image URL}`.`\meta{the suffix of the
% image URL}:
%
@@ -26255,7 +26952,7 @@ end
% \begin{markdown}
%
% If identifier attributes appear at the beginning of a section, we make the
-% next heading produce the \mref{label} macro.
+% next heading produce the `\label` macro.
%
% \end{markdown}
% \begin{macrocode}
@@ -26439,9 +27136,9 @@ end
% \begin{markdown}
%
%#### Citations
-% Here is a basic implementation for citations that uses the \LaTeX{} \mref{cite}
-% macro. There are also implementations that use the \pkg{natbib} \mref{citep},
-% and \mref{citet} macros, and the Bib\LaTeX{} \mref{autocites} and \mref{textcites}
+% Here is a basic implementation for citations that uses the \LaTeX{} `\cite`
+% macro. There are also implementations that use the \pkg{natbib} `\citep`,
+% and `\citet` macros, and the Bib\LaTeX{} `\autocites` and `\textcites`
% macros. These implementations will be used, when the respective packages are
% loaded.
%
@@ -26849,8 +27546,8 @@ end
%
%#### YAML Metadata {#latexyamlmetadata}
%
-% The default setup of \acro{yaml} metadata will invoke the \mref{title},
-% \mref{author}, and \mref{date} macros when scalar values for keys that
+% The default setup of \acro{yaml} metadata will invoke the `\title`,
+% `\author`, and `\date` macros when scalar values for keys that
% correspond to the `title`, `author`, and `date` relative wildcards are
% encountered, respectively.
%
@@ -26868,10 +27565,10 @@ end
% \begin{markdown}
%
% To complement the default setup of our key--values, we will use
-% the \mref{maketitle} macro to typeset the title page of a document
+% the `\maketitle` macro to typeset the title page of a document
% at the end of \acro{yaml} metadata. If we are in the preamble, we will wait
% macro until after the beginning of the document. Otherwise, we will use
-% the \mref{maketitle} macro straight away.
+% the `\maketitle` macro straight away.
%
% \end{markdown}
% \begin{macrocode}
@@ -26984,7 +27681,7 @@ end
% after supplying the missing plain \TeX{} macros.
%
% When buffering user input, we should disable the bytes with the high bit set,
-% since these are made active by the \mref{enableregime} macro. We will do this
+% since these are made active by the `\enableregime` macro. We will do this
% by redefining the \mref{markdownMakeOther} macro accordingly. The code is
% courtesy of Scott Pakin, the creator of the \pkg{filecontents} \LaTeX{}
% package.
@@ -27169,7 +27866,7 @@ end
% \begin{markdown}
%
% The code fence infostring is used as a name from the \Hologo{ConTeXt}
-% \mref{definetyping} macro. This allows the user to set up code highlighting
+% `\definetyping` macro. This allows the user to set up code highlighting
% mapping as follows:
% ````` tex
% % Map the `TEX` syntax highlighter to the `latex` infostring.
diff --git a/macros/generic/markdown/markdown.html b/macros/generic/markdown/markdown.html
index 8f66e86c6e..4d62b54fc2 100644
--- a/macros/generic/markdown/markdown.html
+++ b/macros/generic/markdown/markdown.html
@@ -84,7 +84,7 @@
<header id="title-block-header">
<h1 class="title">Markdown Package User Manual</h1>
<p class="author">Vít Novotný</p>
-<p class="date">2.18.0-0-gd8ae860 2022-10-30</p>
+<p class="date">2.19.0-0-g80fcf20 2022-12-23</p>
</header>
<nav id="TOC" role="doc-toc">
<ul>
@@ -1047,7 +1047,7 @@ auxiliary cache files.</p>
<p>The frozen cache makes it possible to later typeset a plain <span
class="tex">T<sub>e</sub>X</span> document that contains markdown
documents without invoking Lua using the
-<code>\markdownOptionFrozenCache</code> plain <span
+<strong><code>frozenCache</code></strong> plain <span
class="tex">T<sub>e</sub>X</span> option. As a result, the plain <span
class="tex">T<sub>e</sub>X</span> document becomes more portable, but
further changes in the order and the content of markdown documents will
@@ -1451,7 +1451,7 @@ class="sourceCode tex"><code class="sourceCode latex"><span id="cb96-1"><a href=
<span id="cb96-8"><a href="#cb96-8" aria-hidden="true" tabindex="-1"></a> convert = markdown.new({fencedCode = true})</span>
<span id="cb96-9"><a href="#cb96-9" aria-hidden="true" tabindex="-1"></a> input = &quot;A paragraph.&quot; .. newline ..</span>
<span id="cb96-10"><a href="#cb96-10" aria-hidden="true" tabindex="-1"></a> &quot;```&quot; .. newline ..</span>
-<span id="cb96-11"><a href="#cb96-11" aria-hidden="true" tabindex="-1"></a> &quot;A code fence.&quot; .. newline ..</span>
+<span id="cb96-11"><a href="#cb96-11" aria-hidden="true" tabindex="-1"></a> &quot;A fenced code.&quot; .. newline ..</span>
<span id="cb96-12"><a href="#cb96-12" aria-hidden="true" tabindex="-1"></a> &quot;```&quot; .. newline</span>
<span id="cb96-13"><a href="#cb96-13" aria-hidden="true" tabindex="-1"></a> tex.sprint(convert(input))</span>
<span id="cb96-14"><a href="#cb96-14" aria-hidden="true" tabindex="-1"></a></span>
@@ -1459,7 +1459,7 @@ class="sourceCode tex"><code class="sourceCode latex"><span id="cb96-1"><a href=
<span id="cb96-16"><a href="#cb96-16" aria-hidden="true" tabindex="-1"></a> fencedCode = true, blankBeforeCodeFence = true})</span>
<span id="cb96-17"><a href="#cb96-17" aria-hidden="true" tabindex="-1"></a> input = &quot;A paragraph.&quot; .. newline ..</span>
<span id="cb96-18"><a href="#cb96-18" aria-hidden="true" tabindex="-1"></a> &quot;```&quot; .. newline ..</span>
-<span id="cb96-19"><a href="#cb96-19" aria-hidden="true" tabindex="-1"></a> &quot;Not a code fence.&quot; .. newline ..</span>
+<span id="cb96-19"><a href="#cb96-19" aria-hidden="true" tabindex="-1"></a> &quot;Not a fenced code.&quot; .. newline ..</span>
<span id="cb96-20"><a href="#cb96-20" aria-hidden="true" tabindex="-1"></a> &quot;```&quot; .. newline</span>
<span id="cb96-21"><a href="#cb96-21" aria-hidden="true" tabindex="-1"></a> tex.sprint(convert(input)) }</span>
<span id="cb96-22"><a href="#cb96-22" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
@@ -1470,8 +1470,8 @@ class="sourceCode sh"><code class="sourceCode bash"><span id="cb97-1"><a href="#
contain the following text:</p>
<blockquote>
<p>A paragraph.</p>
-<pre><code>A code fence.</code></pre>
-<p>A paragraph. <code>Not a code fence.</code></p>
+<pre><code>A fenced code.</code></pre>
+<p>A paragraph. <code>Not a fenced code.</code></p>
</blockquote>
<h5 class="unnumbered" id="lua-cli-example-3">Lua CLI Example</h5>
<p>Using a text editor, create a text document named
@@ -1521,7 +1521,7 @@ class="sourceCode tex"><code class="sourceCode latex"><span id="cb103-1"><a href
<span id="cb103-4"><a href="#cb103-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
<span id="cb103-5"><a href="#cb103-5" aria-hidden="true" tabindex="-1"></a>A paragraph.</span>
<span id="cb103-6"><a href="#cb103-6" aria-hidden="true" tabindex="-1"></a>```</span>
-<span id="cb103-7"><a href="#cb103-7" aria-hidden="true" tabindex="-1"></a>A code fence.</span>
+<span id="cb103-7"><a href="#cb103-7" aria-hidden="true" tabindex="-1"></a>A fenced code.</span>
<span id="cb103-8"><a href="#cb103-8" aria-hidden="true" tabindex="-1"></a>```</span>
<span id="cb103-9"><a href="#cb103-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
<span id="cb103-10"><a href="#cb103-10" aria-hidden="true" tabindex="-1"></a></span>
@@ -1529,7 +1529,7 @@ class="sourceCode tex"><code class="sourceCode latex"><span id="cb103-1"><a href
<span id="cb103-12"><a href="#cb103-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
<span id="cb103-13"><a href="#cb103-13" aria-hidden="true" tabindex="-1"></a>A paragraph.</span>
<span id="cb103-14"><a href="#cb103-14" aria-hidden="true" tabindex="-1"></a>```</span>
-<span id="cb103-15"><a href="#cb103-15" aria-hidden="true" tabindex="-1"></a>Not a code fence.</span>
+<span id="cb103-15"><a href="#cb103-15" aria-hidden="true" tabindex="-1"></a>Not a fenced code.</span>
<span id="cb103-16"><a href="#cb103-16" aria-hidden="true" tabindex="-1"></a>```</span>
<span id="cb103-17"><a href="#cb103-17" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
<span id="cb103-18"><a href="#cb103-18" aria-hidden="true" tabindex="-1"></a></span>
@@ -1541,8 +1541,8 @@ class="sourceCode sh"><code class="sourceCode bash"><span id="cb104-1"><a href="
contain the following text:</p>
<blockquote>
<p>A paragraph.</p>
-<pre><code>A code fence.</code></pre>
-<p>A paragraph. <code>Not a code fence.</code></p>
+<pre><code>A fenced code.</code></pre>
+<p>A paragraph. <code>Not a fenced code.</code></p>
</blockquote>
<h5 class="unnumbered" id="latex-example-4"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
@@ -1556,14 +1556,14 @@ class="sourceCode tex"><code class="sourceCode latex"><span id="cb106-1"><a href
<span id="cb106-5"><a href="#cb106-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
<span id="cb106-6"><a href="#cb106-6" aria-hidden="true" tabindex="-1"></a>A paragraph.</span>
<span id="cb106-7"><a href="#cb106-7" aria-hidden="true" tabindex="-1"></a>```</span>
-<span id="cb106-8"><a href="#cb106-8" aria-hidden="true" tabindex="-1"></a>A code fence.</span>
+<span id="cb106-8"><a href="#cb106-8" aria-hidden="true" tabindex="-1"></a>A fenced code.</span>
<span id="cb106-9"><a href="#cb106-9" aria-hidden="true" tabindex="-1"></a>```</span>
<span id="cb106-10"><a href="#cb106-10" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
<span id="cb106-11"><a href="#cb106-11" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb106-12"><a href="#cb106-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{blankBeforeCodeFence}</span>
<span id="cb106-13"><a href="#cb106-13" aria-hidden="true" tabindex="-1"></a>A paragraph.</span>
<span id="cb106-14"><a href="#cb106-14" aria-hidden="true" tabindex="-1"></a>```</span>
-<span id="cb106-15"><a href="#cb106-15" aria-hidden="true" tabindex="-1"></a>Not a code fence.</span>
+<span id="cb106-15"><a href="#cb106-15" aria-hidden="true" tabindex="-1"></a>Not a fenced code.</span>
<span id="cb106-16"><a href="#cb106-16" aria-hidden="true" tabindex="-1"></a>```</span>
<span id="cb106-17"><a href="#cb106-17" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span>
<span id="cb106-18"><a href="#cb106-18" aria-hidden="true" tabindex="-1"></a></span>
@@ -1575,8 +1575,8 @@ class="sourceCode sh"><code class="sourceCode bash"><span id="cb107-1"><a href="
contain the following text:</p>
<blockquote>
<p>A paragraph.</p>
-<pre><code>A code fence.</code></pre>
-<p>A paragraph. <code>Not a code fence.</code></p>
+<pre><code>A fenced code.</code></pre>
+<p>A paragraph. <code>Not a fenced code.</code></p>
</blockquote>
<h5 class="unnumbered" id="context-example-4">Con<span
class="tex">T<sub>e</sub>X</span>t Example</h5>
@@ -1590,7 +1590,7 @@ class="sourceCode tex"><code class="sourceCode latex"><span id="cb109-1"><a href
<span id="cb109-5"><a href="#cb109-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
<span id="cb109-6"><a href="#cb109-6" aria-hidden="true" tabindex="-1"></a>A paragraph.</span>
<span id="cb109-7"><a href="#cb109-7" aria-hidden="true" tabindex="-1"></a>```</span>
-<span id="cb109-8"><a href="#cb109-8" aria-hidden="true" tabindex="-1"></a>A code fence.</span>
+<span id="cb109-8"><a href="#cb109-8" aria-hidden="true" tabindex="-1"></a>A fenced code.</span>
<span id="cb109-9"><a href="#cb109-9" aria-hidden="true" tabindex="-1"></a>```</span>
<span id="cb109-10"><a href="#cb109-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
<span id="cb109-11"><a href="#cb109-11" aria-hidden="true" tabindex="-1"></a></span>
@@ -1598,7 +1598,7 @@ class="sourceCode tex"><code class="sourceCode latex"><span id="cb109-1"><a href
<span id="cb109-13"><a href="#cb109-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
<span id="cb109-14"><a href="#cb109-14" aria-hidden="true" tabindex="-1"></a>A paragraph.</span>
<span id="cb109-15"><a href="#cb109-15" aria-hidden="true" tabindex="-1"></a>```</span>
-<span id="cb109-16"><a href="#cb109-16" aria-hidden="true" tabindex="-1"></a>Not a code fence.</span>
+<span id="cb109-16"><a href="#cb109-16" aria-hidden="true" tabindex="-1"></a>Not a fenced code.</span>
<span id="cb109-17"><a href="#cb109-17" aria-hidden="true" tabindex="-1"></a>```</span>
<span id="cb109-18"><a href="#cb109-18" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
<span id="cb109-19"><a href="#cb109-19" aria-hidden="true" tabindex="-1"></a></span>
@@ -1610,11 +1610,65 @@ class="sourceCode sh"><code class="sourceCode bash"><span id="cb110-1"><a href="
contain the following text:</p>
<blockquote>
<p>A paragraph.</p>
-<pre><code>A code fence.</code></pre>
-<p>A paragraph. <code>Not a code fence.</code></p>
+<pre><code>A fenced code.</code></pre>
+<p>A paragraph. <code>Not a fenced code.</code></p>
</blockquote>
-<h4 data-number="2.2.1.7" id="option-blankbeforeheading"><span
+<h4 data-number="2.2.1.7" id="option-blankbeforedivfence"><span
class="header-section-number">2.2.1.7</span> Option
+<code>blankBeforeDivFence</code></h4>
+<dl>
+<dt><code>blankBeforeDivFence</code> (default value:
+<code>false</code>)</dt>
+<dd>
+<dl>
+<dt>true</dt>
+<dd>
+<p>Require a blank line before the closing fence of a fenced div.</p>
+</dd>
+<dt>false</dt>
+<dd>
+<p>Do not require a blank line before the closing fence of a fenced
+div.</p>
+</dd>
+</dl>
+</dd>
+</dl>
+<h5 class="unnumbered" id="latex-example-5"><span
+class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
+<p>Using a text editor, create a text document named
+<code>document.tex</code> with the following content:</p>
+<div class="sourceCode" id="cb112"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb112-1"><a href="#cb112-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb112-2"><a href="#cb112-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[fencedDivs]{<span class="ex">markdown</span>}</span>
+<span id="cb112-3"><a href="#cb112-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb112-4"><a href="#cb112-4" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb112-5"><a href="#cb112-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb112-6"><a href="#cb112-6" aria-hidden="true" tabindex="-1"></a>A paragraph.</span>
+<span id="cb112-7"><a href="#cb112-7" aria-hidden="true" tabindex="-1"></a>::: {.identifier}</span>
+<span id="cb112-8"><a href="#cb112-8" aria-hidden="true" tabindex="-1"></a>A fenced div.</span>
+<span id="cb112-9"><a href="#cb112-9" aria-hidden="true" tabindex="-1"></a>:::</span>
+<span id="cb112-10"><a href="#cb112-10" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb112-11"><a href="#cb112-11" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb112-12"><a href="#cb112-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{blankBeforeDivFence}</span>
+<span id="cb112-13"><a href="#cb112-13" aria-hidden="true" tabindex="-1"></a>A paragraph.</span>
+<span id="cb112-14"><a href="#cb112-14" aria-hidden="true" tabindex="-1"></a>```</span>
+<span id="cb112-15"><a href="#cb112-15" aria-hidden="true" tabindex="-1"></a>Not a fenced div.</span>
+<span id="cb112-16"><a href="#cb112-16" aria-hidden="true" tabindex="-1"></a>```</span>
+<span id="cb112-17"><a href="#cb112-17" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span>
+<span id="cb112-18"><a href="#cb112-18" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb112-19"><a href="#cb112-19" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<p>Next, invoke LuaTeX from the terminal:</p>
+<div class="sourceCode" id="cb113"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb113-1"><a href="#cb113-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+<p>A PDF document named <code>document.pdf</code> should be produced and
+contain the following text:</p>
+<blockquote>
+<p>A paragraph.</p>
+<p>A fenced div.</p>
+<p>A paragraph. ::: {.identifier} Not a fenced div. :::</p>
+</blockquote>
+<h4 data-number="2.2.1.8" id="option-blankbeforeheading"><span
+class="header-section-number">2.2.1.8</span> Option
<code>blankBeforeHeading</code></h4>
<dl>
<dt><code>blankBeforeHeading</code> (default value:
@@ -1637,30 +1691,30 @@ header.</p>
<h5 class="unnumbered" id="lua-module-example-4">Lua Module Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb112"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb112-1"><a href="#cb112-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
-<span id="cb112-2"><a href="#cb112-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span>
-<span id="cb112-3"><a href="#cb112-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHeadingOne</span>#1{{<span class="fu">\bf</span> #1}<span class="fu">\par</span>}</span>
-<span id="cb112-4"><a href="#cb112-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\directlua</span>{</span>
-<span id="cb112-5"><a href="#cb112-5" aria-hidden="true" tabindex="-1"></a> local markdown = require(&quot;markdown&quot;)</span>
-<span id="cb112-6"><a href="#cb112-6" aria-hidden="true" tabindex="-1"></a> local newline = [[^^J^^J]]</span>
-<span id="cb112-7"><a href="#cb112-7" aria-hidden="true" tabindex="-1"></a> local convert, input</span>
-<span id="cb112-8"><a href="#cb112-8" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb112-9"><a href="#cb112-9" aria-hidden="true" tabindex="-1"></a> convert = markdown.new()</span>
-<span id="cb112-10"><a href="#cb112-10" aria-hidden="true" tabindex="-1"></a> input = &quot;A paragraph.&quot; .. newline ..</span>
-<span id="cb112-11"><a href="#cb112-11" aria-hidden="true" tabindex="-1"></a> &quot;A heading.&quot; .. newline ..</span>
-<span id="cb112-12"><a href="#cb112-12" aria-hidden="true" tabindex="-1"></a> &quot;==========&quot; .. newline</span>
-<span id="cb112-13"><a href="#cb112-13" aria-hidden="true" tabindex="-1"></a> tex.sprint(convert(input))</span>
-<span id="cb112-14"><a href="#cb112-14" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb112-15"><a href="#cb112-15" aria-hidden="true" tabindex="-1"></a> convert = markdown.new({blankBeforeHeading = true})</span>
-<span id="cb112-16"><a href="#cb112-16" aria-hidden="true" tabindex="-1"></a> input = &quot;A paragraph.&quot; .. newline ..</span>
-<span id="cb112-17"><a href="#cb112-17" aria-hidden="true" tabindex="-1"></a> &quot;Not a heading.&quot; .. newline ..</span>
-<span id="cb112-18"><a href="#cb112-18" aria-hidden="true" tabindex="-1"></a> &quot;==============&quot; .. newline</span>
-<span id="cb112-19"><a href="#cb112-19" aria-hidden="true" tabindex="-1"></a> tex.sprint(convert(input)) }</span>
-<span id="cb112-20"><a href="#cb112-20" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
+<div class="sourceCode" id="cb114"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb114-1"><a href="#cb114-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
+<span id="cb114-2"><a href="#cb114-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span>
+<span id="cb114-3"><a href="#cb114-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHeadingOne</span>#1{{<span class="fu">\bf</span> #1}<span class="fu">\par</span>}</span>
+<span id="cb114-4"><a href="#cb114-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\directlua</span>{</span>
+<span id="cb114-5"><a href="#cb114-5" aria-hidden="true" tabindex="-1"></a> local markdown = require(&quot;markdown&quot;)</span>
+<span id="cb114-6"><a href="#cb114-6" aria-hidden="true" tabindex="-1"></a> local newline = [[^^J^^J]]</span>
+<span id="cb114-7"><a href="#cb114-7" aria-hidden="true" tabindex="-1"></a> local convert, input</span>
+<span id="cb114-8"><a href="#cb114-8" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb114-9"><a href="#cb114-9" aria-hidden="true" tabindex="-1"></a> convert = markdown.new()</span>
+<span id="cb114-10"><a href="#cb114-10" aria-hidden="true" tabindex="-1"></a> input = &quot;A paragraph.&quot; .. newline ..</span>
+<span id="cb114-11"><a href="#cb114-11" aria-hidden="true" tabindex="-1"></a> &quot;A heading.&quot; .. newline ..</span>
+<span id="cb114-12"><a href="#cb114-12" aria-hidden="true" tabindex="-1"></a> &quot;==========&quot; .. newline</span>
+<span id="cb114-13"><a href="#cb114-13" aria-hidden="true" tabindex="-1"></a> tex.sprint(convert(input))</span>
+<span id="cb114-14"><a href="#cb114-14" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb114-15"><a href="#cb114-15" aria-hidden="true" tabindex="-1"></a> convert = markdown.new({blankBeforeHeading = true})</span>
+<span id="cb114-16"><a href="#cb114-16" aria-hidden="true" tabindex="-1"></a> input = &quot;A paragraph.&quot; .. newline ..</span>
+<span id="cb114-17"><a href="#cb114-17" aria-hidden="true" tabindex="-1"></a> &quot;Not a heading.&quot; .. newline ..</span>
+<span id="cb114-18"><a href="#cb114-18" aria-hidden="true" tabindex="-1"></a> &quot;==============&quot; .. newline</span>
+<span id="cb114-19"><a href="#cb114-19" aria-hidden="true" tabindex="-1"></a> tex.sprint(convert(input)) }</span>
+<span id="cb114-20"><a href="#cb114-20" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
<p>Then, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb113"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb113-1"><a href="#cb113-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb115"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb115-1"><a href="#cb115-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -1671,23 +1725,23 @@ contain the following text:</p>
<h5 class="unnumbered" id="lua-cli-example-4">Lua CLI Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb114"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb114-1"><a href="#cb114-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
-<span id="cb114-2"><a href="#cb114-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span>
-<span id="cb114-3"><a href="#cb114-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> optionfalse</span>
-<span id="cb114-4"><a href="#cb114-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> optiontrue</span>
-<span id="cb114-5"><a href="#cb114-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
+<div class="sourceCode" id="cb116"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb116-1"><a href="#cb116-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
+<span id="cb116-2"><a href="#cb116-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span>
+<span id="cb116-3"><a href="#cb116-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> optionfalse</span>
+<span id="cb116-4"><a href="#cb116-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> optiontrue</span>
+<span id="cb116-5"><a href="#cb116-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
<p>Using a text editor, create a text document named
<code>content.md</code> with the following content:</p>
-<div class="sourceCode" id="cb115"><pre
-class="sourceCode md"><code class="sourceCode markdown"><span id="cb115-1"><a href="#cb115-1" aria-hidden="true" tabindex="-1"></a>A paragraph.</span>
-<span id="cb115-2"><a href="#cb115-2" aria-hidden="true" tabindex="-1"></a>A heading?</span>
-<span id="cb115-3"><a href="#cb115-3" aria-hidden="true" tabindex="-1"></a><span class="fu">==========</span></span></code></pre></div>
+<div class="sourceCode" id="cb117"><pre
+class="sourceCode md"><code class="sourceCode markdown"><span id="cb117-1"><a href="#cb117-1" aria-hidden="true" tabindex="-1"></a>A paragraph.</span>
+<span id="cb117-2"><a href="#cb117-2" aria-hidden="true" tabindex="-1"></a>A heading?</span>
+<span id="cb117-3"><a href="#cb117-3" aria-hidden="true" tabindex="-1"></a><span class="fu">==========</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb116"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb116-1"><a href="#cb116-1" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ <span class="at">--</span> content.md optionfalse.tex</span>
-<span id="cb116-2"><a href="#cb116-2" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ blankBeforeHeading=true <span class="at">--</span> content.md optiontrue.tex</span>
-<span id="cb116-3"><a href="#cb116-3" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb118"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb118-1"><a href="#cb118-1" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ <span class="at">--</span> content.md optionfalse.tex</span>
+<span id="cb118-2"><a href="#cb118-2" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ blankBeforeHeading=true <span class="at">--</span> content.md optiontrue.tex</span>
+<span id="cb118-3"><a href="#cb118-3" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
<p>where ⟨<em>CLI pathname</em>⟩ corresponds to the location of the Lua
CLI script file, such as
<code>~/texmf/scripts/markdown/markdown-cli.lua</code> on UN*X systems
@@ -1708,26 +1762,26 @@ contain the following text:</p>
class="tex">T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb117"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb117-1"><a href="#cb117-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
-<span id="cb117-2"><a href="#cb117-2" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb117-3"><a href="#cb117-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
-<span id="cb117-4"><a href="#cb117-4" aria-hidden="true" tabindex="-1"></a>A paragraph.</span>
-<span id="cb117-5"><a href="#cb117-5" aria-hidden="true" tabindex="-1"></a>A heading.</span>
-<span id="cb117-6"><a href="#cb117-6" aria-hidden="true" tabindex="-1"></a>==========</span>
-<span id="cb117-7"><a href="#cb117-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
-<span id="cb117-8"><a href="#cb117-8" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb117-9"><a href="#cb117-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionBlankBeforeHeading</span>{true}</span>
-<span id="cb117-10"><a href="#cb117-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
-<span id="cb117-11"><a href="#cb117-11" aria-hidden="true" tabindex="-1"></a>A paragraph.</span>
-<span id="cb117-12"><a href="#cb117-12" aria-hidden="true" tabindex="-1"></a>Not a heading.</span>
-<span id="cb117-13"><a href="#cb117-13" aria-hidden="true" tabindex="-1"></a>==============</span>
-<span id="cb117-14"><a href="#cb117-14" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
-<span id="cb117-15"><a href="#cb117-15" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb117-16"><a href="#cb117-16" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
+<div class="sourceCode" id="cb119"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb119-1"><a href="#cb119-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
+<span id="cb119-2"><a href="#cb119-2" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb119-3"><a href="#cb119-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
+<span id="cb119-4"><a href="#cb119-4" aria-hidden="true" tabindex="-1"></a>A paragraph.</span>
+<span id="cb119-5"><a href="#cb119-5" aria-hidden="true" tabindex="-1"></a>A heading.</span>
+<span id="cb119-6"><a href="#cb119-6" aria-hidden="true" tabindex="-1"></a>==========</span>
+<span id="cb119-7"><a href="#cb119-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
+<span id="cb119-8"><a href="#cb119-8" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb119-9"><a href="#cb119-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionBlankBeforeHeading</span>{true}</span>
+<span id="cb119-10"><a href="#cb119-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
+<span id="cb119-11"><a href="#cb119-11" aria-hidden="true" tabindex="-1"></a>A paragraph.</span>
+<span id="cb119-12"><a href="#cb119-12" aria-hidden="true" tabindex="-1"></a>Not a heading.</span>
+<span id="cb119-13"><a href="#cb119-13" aria-hidden="true" tabindex="-1"></a>==============</span>
+<span id="cb119-14"><a href="#cb119-14" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
+<span id="cb119-15"><a href="#cb119-15" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb119-16"><a href="#cb119-16" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb118"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb118-1"><a href="#cb118-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb120"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb120-1"><a href="#cb120-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -1735,31 +1789,31 @@ contain the following text:</p>
<h1 id="a-heading.-1">A heading.</h1>
<p>A paragraph. Not a heading. ==============</p>
</blockquote>
-<h5 class="unnumbered" id="latex-example-5"><span
+<h5 class="unnumbered" id="latex-example-6"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb119"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb119-1"><a href="#cb119-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb119-2"><a href="#cb119-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span>
-<span id="cb119-3"><a href="#cb119-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb119-4"><a href="#cb119-4" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb119-5"><a href="#cb119-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb119-6"><a href="#cb119-6" aria-hidden="true" tabindex="-1"></a>A paragraph.</span>
-<span id="cb119-7"><a href="#cb119-7" aria-hidden="true" tabindex="-1"></a>A heading.</span>
-<span id="cb119-8"><a href="#cb119-8" aria-hidden="true" tabindex="-1"></a>==========</span>
-<span id="cb119-9"><a href="#cb119-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb119-10"><a href="#cb119-10" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb119-11"><a href="#cb119-11" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{blankBeforeHeading}</span>
-<span id="cb119-12"><a href="#cb119-12" aria-hidden="true" tabindex="-1"></a>A paragraph.</span>
-<span id="cb119-13"><a href="#cb119-13" aria-hidden="true" tabindex="-1"></a>Not a heading.</span>
-<span id="cb119-14"><a href="#cb119-14" aria-hidden="true" tabindex="-1"></a>==============</span>
-<span id="cb119-15"><a href="#cb119-15" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span>
-<span id="cb119-16"><a href="#cb119-16" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb119-17"><a href="#cb119-17" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<div class="sourceCode" id="cb121"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb121-1"><a href="#cb121-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb121-2"><a href="#cb121-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span>
+<span id="cb121-3"><a href="#cb121-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb121-4"><a href="#cb121-4" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb121-5"><a href="#cb121-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb121-6"><a href="#cb121-6" aria-hidden="true" tabindex="-1"></a>A paragraph.</span>
+<span id="cb121-7"><a href="#cb121-7" aria-hidden="true" tabindex="-1"></a>A heading.</span>
+<span id="cb121-8"><a href="#cb121-8" aria-hidden="true" tabindex="-1"></a>==========</span>
+<span id="cb121-9"><a href="#cb121-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb121-10"><a href="#cb121-10" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb121-11"><a href="#cb121-11" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{blankBeforeHeading}</span>
+<span id="cb121-12"><a href="#cb121-12" aria-hidden="true" tabindex="-1"></a>A paragraph.</span>
+<span id="cb121-13"><a href="#cb121-13" aria-hidden="true" tabindex="-1"></a>Not a heading.</span>
+<span id="cb121-14"><a href="#cb121-14" aria-hidden="true" tabindex="-1"></a>==============</span>
+<span id="cb121-15"><a href="#cb121-15" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span>
+<span id="cb121-16"><a href="#cb121-16" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb121-17"><a href="#cb121-17" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb120"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb120-1"><a href="#cb120-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb122"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb122-1"><a href="#cb122-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -1771,27 +1825,27 @@ contain the following text:</p>
class="tex">T<sub>e</sub>X</span>t Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb121"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb121-1"><a href="#cb121-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
-<span id="cb121-2"><a href="#cb121-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
-<span id="cb121-3"><a href="#cb121-3" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb121-4"><a href="#cb121-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb121-5"><a href="#cb121-5" aria-hidden="true" tabindex="-1"></a>A paragraph.</span>
-<span id="cb121-6"><a href="#cb121-6" aria-hidden="true" tabindex="-1"></a>A heading.</span>
-<span id="cb121-7"><a href="#cb121-7" aria-hidden="true" tabindex="-1"></a>==========</span>
-<span id="cb121-8"><a href="#cb121-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb121-9"><a href="#cb121-9" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb121-10"><a href="#cb121-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[blankBeforeHeading = yes]</span>
-<span id="cb121-11"><a href="#cb121-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb121-12"><a href="#cb121-12" aria-hidden="true" tabindex="-1"></a>A paragraph.</span>
-<span id="cb121-13"><a href="#cb121-13" aria-hidden="true" tabindex="-1"></a>Not a heading.</span>
-<span id="cb121-14"><a href="#cb121-14" aria-hidden="true" tabindex="-1"></a>==============</span>
-<span id="cb121-15"><a href="#cb121-15" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb121-16"><a href="#cb121-16" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb121-17"><a href="#cb121-17" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
+<div class="sourceCode" id="cb123"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb123-1"><a href="#cb123-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
+<span id="cb123-2"><a href="#cb123-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
+<span id="cb123-3"><a href="#cb123-3" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb123-4"><a href="#cb123-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb123-5"><a href="#cb123-5" aria-hidden="true" tabindex="-1"></a>A paragraph.</span>
+<span id="cb123-6"><a href="#cb123-6" aria-hidden="true" tabindex="-1"></a>A heading.</span>
+<span id="cb123-7"><a href="#cb123-7" aria-hidden="true" tabindex="-1"></a>==========</span>
+<span id="cb123-8"><a href="#cb123-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb123-9"><a href="#cb123-9" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb123-10"><a href="#cb123-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[blankBeforeHeading = yes]</span>
+<span id="cb123-11"><a href="#cb123-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb123-12"><a href="#cb123-12" aria-hidden="true" tabindex="-1"></a>A paragraph.</span>
+<span id="cb123-13"><a href="#cb123-13" aria-hidden="true" tabindex="-1"></a>Not a heading.</span>
+<span id="cb123-14"><a href="#cb123-14" aria-hidden="true" tabindex="-1"></a>==============</span>
+<span id="cb123-15"><a href="#cb123-15" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb123-16"><a href="#cb123-16" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb123-17"><a href="#cb123-17" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb122"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb122-1"><a href="#cb122-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb124"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb124-1"><a href="#cb124-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -1799,8 +1853,79 @@ contain the following text:</p>
<h1 id="a-heading.-3">A heading.</h1>
<p>A paragraph. Not a heading. ==============</p>
</blockquote>
-<h4 data-number="2.2.1.8" id="option-breakableblockquotes"><span
-class="header-section-number">2.2.1.8</span> Option
+<h4 data-number="2.2.1.9" id="option-bracketedspans"><span
+class="header-section-number">2.2.1.9</span> Option
+<code>bracketedSpans</code></h4>
+<dl>
+<dt><code>bracketedSpans</code> (default value: <code>false</code>)</dt>
+<dd>
+<dl>
+<dt>true</dt>
+<dd>
+<p>Enable the Pandoc bracketed spans extension:</p>
+<div class="sourceCode" id="cb125"><pre
+class="sourceCode md"><code class="sourceCode markdown"><span id="cb125-1"><a href="#cb125-1" aria-hidden="true" tabindex="-1"></a><span class="co">[</span><span class="ot">This is *some text*</span><span class="co">]</span>{.class key=&quot;val&quot;}</span></code></pre></div>
+</dd>
+</dl>
+</dd>
+<dd>
+<dl>
+<dt>false</dt>
+<dd>
+<p>Disable the Pandoc bracketed spans extension:</p>
+</dd>
+</dl>
+</dd>
+</dl>
+<h5 class="unnumbered" id="latex-example-7"><span
+class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
+<p>Using a text editor, create a text document named
+<code>document.tex</code> with the following content:</p>
+<div class="sourceCode" id="cb126"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb126-1"><a href="#cb126-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb126-2"><a href="#cb126-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[bracketedSpans]{<span class="ex">markdown</span>}</span>
+<span id="cb126-3"><a href="#cb126-3" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">expl3</span>}</span>
+<span id="cb126-4"><a href="#cb126-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\ExplSyntaxOn</span></span>
+<span id="cb126-5"><a href="#cb126-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
+<span id="cb126-6"><a href="#cb126-6" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
+<span id="cb126-7"><a href="#cb126-7" aria-hidden="true" tabindex="-1"></a> bracketedSpanAttributeContextBegin = {</span>
+<span id="cb126-8"><a href="#cb126-8" aria-hidden="true" tabindex="-1"></a> <span class="fu">\group</span>_begin:</span>
+<span id="cb126-9"><a href="#cb126-9" aria-hidden="true" tabindex="-1"></a> <span class="fu">\color</span>_group_begin:</span>
+<span id="cb126-10"><a href="#cb126-10" aria-hidden="true" tabindex="-1"></a> <span class="fu">\markdownSetup</span>{</span>
+<span id="cb126-11"><a href="#cb126-11" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
+<span id="cb126-12"><a href="#cb126-12" aria-hidden="true" tabindex="-1"></a> attributeKeyValue = {</span>
+<span id="cb126-13"><a href="#cb126-13" aria-hidden="true" tabindex="-1"></a> <span class="fu">\str</span>_if_eq:nnT</span>
+<span id="cb126-14"><a href="#cb126-14" aria-hidden="true" tabindex="-1"></a> { #1 }</span>
+<span id="cb126-15"><a href="#cb126-15" aria-hidden="true" tabindex="-1"></a> { color }</span>
+<span id="cb126-16"><a href="#cb126-16" aria-hidden="true" tabindex="-1"></a> {</span>
+<span id="cb126-17"><a href="#cb126-17" aria-hidden="true" tabindex="-1"></a> <span class="fu">\color</span>_select:n { #2 }</span>
+<span id="cb126-18"><a href="#cb126-18" aria-hidden="true" tabindex="-1"></a> }</span>
+<span id="cb126-19"><a href="#cb126-19" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb126-20"><a href="#cb126-20" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb126-21"><a href="#cb126-21" aria-hidden="true" tabindex="-1"></a> }</span>
+<span id="cb126-22"><a href="#cb126-22" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb126-23"><a href="#cb126-23" aria-hidden="true" tabindex="-1"></a> bracketedSpanAttributeContextEnd = {</span>
+<span id="cb126-24"><a href="#cb126-24" aria-hidden="true" tabindex="-1"></a> <span class="fu">\color</span>_group_end:</span>
+<span id="cb126-25"><a href="#cb126-25" aria-hidden="true" tabindex="-1"></a> <span class="fu">\group</span>_end:</span>
+<span id="cb126-26"><a href="#cb126-26" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb126-27"><a href="#cb126-27" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb126-28"><a href="#cb126-28" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb126-29"><a href="#cb126-29" aria-hidden="true" tabindex="-1"></a><span class="fu">\ExplSyntaxOff</span></span>
+<span id="cb126-30"><a href="#cb126-30" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb126-31"><a href="#cb126-31" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb126-32"><a href="#cb126-32" aria-hidden="true" tabindex="-1"></a>Here is some [colored text]{color=red}.</span>
+<span id="cb126-33"><a href="#cb126-33" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb126-34"><a href="#cb126-34" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<p>Next, invoke LuaTeX from the terminal:</p>
+<div class="sourceCode" id="cb127"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb127-1"><a href="#cb127-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> <span class="at">--shell-escape</span> document.tex</span></code></pre></div>
+<p>A PDF document named <code>document.pdf</code> should be produced and
+contain the following text:</p>
+<blockquote>
+<p>Here is some <span color="red">colored text</span>.</p>
+</blockquote>
+<h4 data-number="2.2.1.10" id="option-breakableblockquotes"><span
+class="header-section-number">2.2.1.10</span> Option
<code>breakableBlockquotes</code></h4>
<dl>
<dt><code>breakableBlockquotes</code> (default value:
@@ -1821,28 +1946,28 @@ class="header-section-number">2.2.1.8</span> Option
<h5 class="unnumbered" id="lua-module-example-5">Lua Module Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb123"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb123-1"><a href="#cb123-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
-<span id="cb123-2"><a href="#cb123-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span>
-<span id="cb123-3"><a href="#cb123-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHeadingOne</span>#1{{<span class="fu">\bf</span> #1}<span class="fu">\par</span>}</span>
-<span id="cb123-4"><a href="#cb123-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\directlua</span>{</span>
-<span id="cb123-5"><a href="#cb123-5" aria-hidden="true" tabindex="-1"></a> local markdown = require(&quot;markdown&quot;)</span>
-<span id="cb123-6"><a href="#cb123-6" aria-hidden="true" tabindex="-1"></a> local newline = [[^^J^^J]]</span>
-<span id="cb123-7"><a href="#cb123-7" aria-hidden="true" tabindex="-1"></a> local convert, input</span>
-<span id="cb123-8"><a href="#cb123-8" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb123-9"><a href="#cb123-9" aria-hidden="true" tabindex="-1"></a> convert = markdown.new()</span>
-<span id="cb123-10"><a href="#cb123-10" aria-hidden="true" tabindex="-1"></a> input = &quot;&gt; A single&quot; .. newline .. newline ..</span>
-<span id="cb123-11"><a href="#cb123-11" aria-hidden="true" tabindex="-1"></a> &quot;&gt; block quote.&quot; .. newline</span>
-<span id="cb123-12"><a href="#cb123-12" aria-hidden="true" tabindex="-1"></a> tex.sprint(convert(input))</span>
-<span id="cb123-13"><a href="#cb123-13" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb123-14"><a href="#cb123-14" aria-hidden="true" tabindex="-1"></a> convert = markdown.new({breakableBlockquotes = true})</span>
-<span id="cb123-15"><a href="#cb123-15" aria-hidden="true" tabindex="-1"></a> input = &quot;&gt; A block quote.&quot; .. newline .. newline ..</span>
-<span id="cb123-16"><a href="#cb123-16" aria-hidden="true" tabindex="-1"></a> &quot;&gt; Another block quote.&quot; .. newline</span>
-<span id="cb123-17"><a href="#cb123-17" aria-hidden="true" tabindex="-1"></a> tex.sprint(convert(input)) }</span>
-<span id="cb123-18"><a href="#cb123-18" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
+<div class="sourceCode" id="cb128"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb128-1"><a href="#cb128-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
+<span id="cb128-2"><a href="#cb128-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span>
+<span id="cb128-3"><a href="#cb128-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHeadingOne</span>#1{{<span class="fu">\bf</span> #1}<span class="fu">\par</span>}</span>
+<span id="cb128-4"><a href="#cb128-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\directlua</span>{</span>
+<span id="cb128-5"><a href="#cb128-5" aria-hidden="true" tabindex="-1"></a> local markdown = require(&quot;markdown&quot;)</span>
+<span id="cb128-6"><a href="#cb128-6" aria-hidden="true" tabindex="-1"></a> local newline = [[^^J^^J]]</span>
+<span id="cb128-7"><a href="#cb128-7" aria-hidden="true" tabindex="-1"></a> local convert, input</span>
+<span id="cb128-8"><a href="#cb128-8" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb128-9"><a href="#cb128-9" aria-hidden="true" tabindex="-1"></a> convert = markdown.new()</span>
+<span id="cb128-10"><a href="#cb128-10" aria-hidden="true" tabindex="-1"></a> input = &quot;&gt; A single&quot; .. newline .. newline ..</span>
+<span id="cb128-11"><a href="#cb128-11" aria-hidden="true" tabindex="-1"></a> &quot;&gt; block quote.&quot; .. newline</span>
+<span id="cb128-12"><a href="#cb128-12" aria-hidden="true" tabindex="-1"></a> tex.sprint(convert(input))</span>
+<span id="cb128-13"><a href="#cb128-13" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb128-14"><a href="#cb128-14" aria-hidden="true" tabindex="-1"></a> convert = markdown.new({breakableBlockquotes = true})</span>
+<span id="cb128-15"><a href="#cb128-15" aria-hidden="true" tabindex="-1"></a> input = &quot;&gt; A block quote.&quot; .. newline .. newline ..</span>
+<span id="cb128-16"><a href="#cb128-16" aria-hidden="true" tabindex="-1"></a> &quot;&gt; Another block quote.&quot; .. newline</span>
+<span id="cb128-17"><a href="#cb128-17" aria-hidden="true" tabindex="-1"></a> tex.sprint(convert(input)) }</span>
+<span id="cb128-18"><a href="#cb128-18" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
<p>Then, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb124"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb124-1"><a href="#cb124-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb129"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb129-1"><a href="#cb129-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -1859,23 +1984,23 @@ contain the following text:</p>
<h5 class="unnumbered" id="lua-cli-example-5">Lua CLI Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb125"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb125-1"><a href="#cb125-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
-<span id="cb125-2"><a href="#cb125-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span>
-<span id="cb125-3"><a href="#cb125-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> optionfalse</span>
-<span id="cb125-4"><a href="#cb125-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> optiontrue</span>
-<span id="cb125-5"><a href="#cb125-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
+<div class="sourceCode" id="cb130"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb130-1"><a href="#cb130-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
+<span id="cb130-2"><a href="#cb130-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span>
+<span id="cb130-3"><a href="#cb130-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> optionfalse</span>
+<span id="cb130-4"><a href="#cb130-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> optiontrue</span>
+<span id="cb130-5"><a href="#cb130-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
<p>Using a text editor, create a text document named
<code>content.md</code> with the following content:</p>
-<div class="sourceCode" id="cb126"><pre
-class="sourceCode md"><code class="sourceCode markdown"><span id="cb126-1"><a href="#cb126-1" aria-hidden="true" tabindex="-1"></a><span class="at">&gt; A single block quote</span></span>
-<span id="cb126-2"><a href="#cb126-2" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb126-3"><a href="#cb126-3" aria-hidden="true" tabindex="-1"></a><span class="at">&gt; or two block quotes?</span></span></code></pre></div>
+<div class="sourceCode" id="cb131"><pre
+class="sourceCode md"><code class="sourceCode markdown"><span id="cb131-1"><a href="#cb131-1" aria-hidden="true" tabindex="-1"></a><span class="at">&gt; A single block quote</span></span>
+<span id="cb131-2"><a href="#cb131-2" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb131-3"><a href="#cb131-3" aria-hidden="true" tabindex="-1"></a><span class="at">&gt; or two block quotes?</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb127"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb127-1"><a href="#cb127-1" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ <span class="at">--</span> content.md optionfalse.tex</span>
-<span id="cb127-2"><a href="#cb127-2" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ breakableBlockquotes=true <span class="at">--</span> content.md optiontrue.tex</span>
-<span id="cb127-3"><a href="#cb127-3" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb132"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb132-1"><a href="#cb132-1" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ <span class="at">--</span> content.md optionfalse.tex</span>
+<span id="cb132-2"><a href="#cb132-2" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ breakableBlockquotes=true <span class="at">--</span> content.md optiontrue.tex</span>
+<span id="cb132-3"><a href="#cb132-3" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
<p>where ⟨<em>CLI pathname</em>⟩ corresponds to the location of the Lua
CLI script file, such as
<code>~/texmf/scripts/markdown/markdown-cli.lua</code> on UN*X systems
@@ -1902,26 +2027,26 @@ contain the following text:</p>
class="tex">T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb128"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb128-1"><a href="#cb128-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
-<span id="cb128-2"><a href="#cb128-2" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb128-3"><a href="#cb128-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
-<span id="cb128-4"><a href="#cb128-4" aria-hidden="true" tabindex="-1"></a>&gt; A single</span>
-<span id="cb128-5"><a href="#cb128-5" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb128-6"><a href="#cb128-6" aria-hidden="true" tabindex="-1"></a>&gt; block quote.</span>
-<span id="cb128-7"><a href="#cb128-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
-<span id="cb128-8"><a href="#cb128-8" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb128-9"><a href="#cb128-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionBreakableBlockquotes</span>{true}</span>
-<span id="cb128-10"><a href="#cb128-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
-<span id="cb128-11"><a href="#cb128-11" aria-hidden="true" tabindex="-1"></a>&gt; A block quote.</span>
-<span id="cb128-12"><a href="#cb128-12" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb128-13"><a href="#cb128-13" aria-hidden="true" tabindex="-1"></a>&gt; Another block quote.</span>
-<span id="cb128-14"><a href="#cb128-14" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
-<span id="cb128-15"><a href="#cb128-15" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb128-16"><a href="#cb128-16" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
+<div class="sourceCode" id="cb133"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb133-1"><a href="#cb133-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
+<span id="cb133-2"><a href="#cb133-2" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb133-3"><a href="#cb133-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
+<span id="cb133-4"><a href="#cb133-4" aria-hidden="true" tabindex="-1"></a>&gt; A single</span>
+<span id="cb133-5"><a href="#cb133-5" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb133-6"><a href="#cb133-6" aria-hidden="true" tabindex="-1"></a>&gt; block quote.</span>
+<span id="cb133-7"><a href="#cb133-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
+<span id="cb133-8"><a href="#cb133-8" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb133-9"><a href="#cb133-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionBreakableBlockquotes</span>{true}</span>
+<span id="cb133-10"><a href="#cb133-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
+<span id="cb133-11"><a href="#cb133-11" aria-hidden="true" tabindex="-1"></a>&gt; A block quote.</span>
+<span id="cb133-12"><a href="#cb133-12" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb133-13"><a href="#cb133-13" aria-hidden="true" tabindex="-1"></a>&gt; Another block quote.</span>
+<span id="cb133-14"><a href="#cb133-14" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
+<span id="cb133-15"><a href="#cb133-15" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb133-16"><a href="#cb133-16" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb129"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb129-1"><a href="#cb129-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb134"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb134-1"><a href="#cb134-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -1935,31 +2060,31 @@ contain the following text:</p>
<p>Another block quote.</p>
</blockquote>
</blockquote>
-<h5 class="unnumbered" id="latex-example-6"><span
+<h5 class="unnumbered" id="latex-example-8"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb130"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb130-1"><a href="#cb130-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb130-2"><a href="#cb130-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span>
-<span id="cb130-3"><a href="#cb130-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb130-4"><a href="#cb130-4" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb130-5"><a href="#cb130-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb130-6"><a href="#cb130-6" aria-hidden="true" tabindex="-1"></a>&gt; A single</span>
-<span id="cb130-7"><a href="#cb130-7" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb130-8"><a href="#cb130-8" aria-hidden="true" tabindex="-1"></a>&gt; block quote.</span>
-<span id="cb130-9"><a href="#cb130-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb130-10"><a href="#cb130-10" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb130-11"><a href="#cb130-11" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{breakableBlockquotes}</span>
-<span id="cb130-12"><a href="#cb130-12" aria-hidden="true" tabindex="-1"></a>&gt; A block quote.</span>
-<span id="cb130-13"><a href="#cb130-13" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb130-14"><a href="#cb130-14" aria-hidden="true" tabindex="-1"></a>&gt; Another block quote.</span>
-<span id="cb130-15"><a href="#cb130-15" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span>
-<span id="cb130-16"><a href="#cb130-16" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb130-17"><a href="#cb130-17" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<div class="sourceCode" id="cb135"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb135-1"><a href="#cb135-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb135-2"><a href="#cb135-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span>
+<span id="cb135-3"><a href="#cb135-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb135-4"><a href="#cb135-4" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb135-5"><a href="#cb135-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb135-6"><a href="#cb135-6" aria-hidden="true" tabindex="-1"></a>&gt; A single</span>
+<span id="cb135-7"><a href="#cb135-7" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb135-8"><a href="#cb135-8" aria-hidden="true" tabindex="-1"></a>&gt; block quote.</span>
+<span id="cb135-9"><a href="#cb135-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb135-10"><a href="#cb135-10" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb135-11"><a href="#cb135-11" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{breakableBlockquotes}</span>
+<span id="cb135-12"><a href="#cb135-12" aria-hidden="true" tabindex="-1"></a>&gt; A block quote.</span>
+<span id="cb135-13"><a href="#cb135-13" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb135-14"><a href="#cb135-14" aria-hidden="true" tabindex="-1"></a>&gt; Another block quote.</span>
+<span id="cb135-15"><a href="#cb135-15" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span>
+<span id="cb135-16"><a href="#cb135-16" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb135-17"><a href="#cb135-17" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb131"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb131-1"><a href="#cb131-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb136"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb136-1"><a href="#cb136-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -1977,27 +2102,27 @@ contain the following text:</p>
class="tex">T<sub>e</sub>X</span>t Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb132"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb132-1"><a href="#cb132-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
-<span id="cb132-2"><a href="#cb132-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
-<span id="cb132-3"><a href="#cb132-3" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb132-4"><a href="#cb132-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb132-5"><a href="#cb132-5" aria-hidden="true" tabindex="-1"></a>&gt; A single</span>
-<span id="cb132-6"><a href="#cb132-6" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb132-7"><a href="#cb132-7" aria-hidden="true" tabindex="-1"></a>&gt; block quote.</span>
-<span id="cb132-8"><a href="#cb132-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb132-9"><a href="#cb132-9" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb132-10"><a href="#cb132-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[breakableBlockquotes = yes]</span>
-<span id="cb132-11"><a href="#cb132-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb132-12"><a href="#cb132-12" aria-hidden="true" tabindex="-1"></a>&gt; A block quote.</span>
-<span id="cb132-13"><a href="#cb132-13" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb132-14"><a href="#cb132-14" aria-hidden="true" tabindex="-1"></a>&gt; Another block quote.</span>
-<span id="cb132-15"><a href="#cb132-15" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb132-16"><a href="#cb132-16" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb132-17"><a href="#cb132-17" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
+<div class="sourceCode" id="cb137"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb137-1"><a href="#cb137-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
+<span id="cb137-2"><a href="#cb137-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
+<span id="cb137-3"><a href="#cb137-3" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb137-4"><a href="#cb137-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb137-5"><a href="#cb137-5" aria-hidden="true" tabindex="-1"></a>&gt; A single</span>
+<span id="cb137-6"><a href="#cb137-6" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb137-7"><a href="#cb137-7" aria-hidden="true" tabindex="-1"></a>&gt; block quote.</span>
+<span id="cb137-8"><a href="#cb137-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb137-9"><a href="#cb137-9" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb137-10"><a href="#cb137-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[breakableBlockquotes = yes]</span>
+<span id="cb137-11"><a href="#cb137-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb137-12"><a href="#cb137-12" aria-hidden="true" tabindex="-1"></a>&gt; A block quote.</span>
+<span id="cb137-13"><a href="#cb137-13" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb137-14"><a href="#cb137-14" aria-hidden="true" tabindex="-1"></a>&gt; Another block quote.</span>
+<span id="cb137-15"><a href="#cb137-15" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb137-16"><a href="#cb137-16" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb137-17"><a href="#cb137-17" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb133"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb133-1"><a href="#cb133-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb138"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb138-1"><a href="#cb138-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -2011,8 +2136,8 @@ contain the following text:</p>
<p>Another block quote.</p>
</blockquote>
</blockquote>
-<h4 data-number="2.2.1.9" id="option-citationnbsps"><span
-class="header-section-number">2.2.1.9</span> Option
+<h4 data-number="2.2.1.11" id="option-citationnbsps"><span
+class="header-section-number">2.2.1.11</span> Option
<code>citationNbsps</code></h4>
<dl>
<dt><code>citationNbsps</code> (default value: <code>true</code>)</dt>
@@ -2033,41 +2158,41 @@ syntax extension.</p>
</dl>
</dd>
</dl>
-<h5 class="unnumbered" id="latex-example-7"><span
+<h5 class="unnumbered" id="latex-example-9"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.bib</code> with the following content:</p>
-<div class="sourceCode" id="cb134"><pre
-class="sourceCode bib"><code class="sourceCode bibtex"><span id="cb134-1"><a href="#cb134-1" aria-hidden="true" tabindex="-1"></a><span class="va">@book</span>{<span class="ot">knuth:tex</span>,</span>
-<span id="cb134-2"><a href="#cb134-2" aria-hidden="true" tabindex="-1"></a> <span class="dt">author</span> = &quot;<span class="st">Knuth, Donald Ervin</span>&quot;,</span>
-<span id="cb134-3"><a href="#cb134-3" aria-hidden="true" tabindex="-1"></a> <span class="dt">title</span> = &quot;<span class="st">The </span><span class="ch">\TeX</span><span class="st"> book, volume A of Computers and typesetting</span>&quot;,</span>
-<span id="cb134-4"><a href="#cb134-4" aria-hidden="true" tabindex="-1"></a> <span class="dt">publisher</span> = &quot;<span class="st">Addison-Wesley</span>&quot;,</span>
-<span id="cb134-5"><a href="#cb134-5" aria-hidden="true" tabindex="-1"></a> <span class="dt">year</span> = &quot;<span class="st">1984</span>&quot;</span>
-<span id="cb134-6"><a href="#cb134-6" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div>
+<div class="sourceCode" id="cb139"><pre
+class="sourceCode bib"><code class="sourceCode bibtex"><span id="cb139-1"><a href="#cb139-1" aria-hidden="true" tabindex="-1"></a><span class="va">@book</span>{<span class="ot">knuth:tex</span>,</span>
+<span id="cb139-2"><a href="#cb139-2" aria-hidden="true" tabindex="-1"></a> <span class="dt">author</span> = &quot;<span class="st">Knuth, Donald Ervin</span>&quot;,</span>
+<span id="cb139-3"><a href="#cb139-3" aria-hidden="true" tabindex="-1"></a> <span class="dt">title</span> = &quot;<span class="st">The </span><span class="ch">\TeX</span><span class="st"> book, volume A of Computers and typesetting</span>&quot;,</span>
+<span id="cb139-4"><a href="#cb139-4" aria-hidden="true" tabindex="-1"></a> <span class="dt">publisher</span> = &quot;<span class="st">Addison-Wesley</span>&quot;,</span>
+<span id="cb139-5"><a href="#cb139-5" aria-hidden="true" tabindex="-1"></a> <span class="dt">year</span> = &quot;<span class="st">1984</span>&quot;</span>
+<span id="cb139-6"><a href="#cb139-6" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb135"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb135-1"><a href="#cb135-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb135-2"><a href="#cb135-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[citations]{<span class="ex">markdown</span>}</span>
-<span id="cb135-3"><a href="#cb135-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb135-4"><a href="#cb135-4" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb135-5"><a href="#cb135-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb135-6"><a href="#cb135-6" aria-hidden="true" tabindex="-1"></a>The TeXbook [@knuth:tex, p. 123 and 130] is good.</span>
-<span id="cb135-7"><a href="#cb135-7" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb135-8"><a href="#cb135-8" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb135-9"><a href="#cb135-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{citationNbsps = false}</span>
-<span id="cb135-10"><a href="#cb135-10" aria-hidden="true" tabindex="-1"></a>The TeXbook [@knuth:tex, p. 123 and 130] is good.</span>
-<span id="cb135-11"><a href="#cb135-11" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span>
-<span id="cb135-12"><a href="#cb135-12" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb135-13"><a href="#cb135-13" aria-hidden="true" tabindex="-1"></a><span class="bu">\bibliographystyle</span>{<span class="ex">plain</span>}</span>
-<span id="cb135-14"><a href="#cb135-14" aria-hidden="true" tabindex="-1"></a><span class="bu">\bibliography</span>{<span class="ex">document.bib</span>}</span>
-<span id="cb135-15"><a href="#cb135-15" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<div class="sourceCode" id="cb140"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb140-1"><a href="#cb140-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb140-2"><a href="#cb140-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[citations]{<span class="ex">markdown</span>}</span>
+<span id="cb140-3"><a href="#cb140-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb140-4"><a href="#cb140-4" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb140-5"><a href="#cb140-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb140-6"><a href="#cb140-6" aria-hidden="true" tabindex="-1"></a>The TeXbook [@knuth:tex, p. 123 and 130] is good.</span>
+<span id="cb140-7"><a href="#cb140-7" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb140-8"><a href="#cb140-8" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb140-9"><a href="#cb140-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{citationNbsps = false}</span>
+<span id="cb140-10"><a href="#cb140-10" aria-hidden="true" tabindex="-1"></a>The TeXbook [@knuth:tex, p. 123 and 130] is good.</span>
+<span id="cb140-11"><a href="#cb140-11" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span>
+<span id="cb140-12"><a href="#cb140-12" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb140-13"><a href="#cb140-13" aria-hidden="true" tabindex="-1"></a><span class="bu">\bibliographystyle</span>{<span class="ex">plain</span>}</span>
+<span id="cb140-14"><a href="#cb140-14" aria-hidden="true" tabindex="-1"></a><span class="bu">\bibliography</span>{<span class="ex">document.bib</span>}</span>
+<span id="cb140-15"><a href="#cb140-15" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Next, invoke LuaTeX and BibTeX from the terminal:</p>
-<div class="sourceCode" id="cb136"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb136-1"><a href="#cb136-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span>
-<span id="cb136-2"><a href="#cb136-2" aria-hidden="true" tabindex="-1"></a><span class="ex">bibtex</span> document.aux</span>
-<span id="cb136-3"><a href="#cb136-3" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span>
-<span id="cb136-4"><a href="#cb136-4" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb141"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb141-1"><a href="#cb141-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span>
+<span id="cb141-2"><a href="#cb141-2" aria-hidden="true" tabindex="-1"></a><span class="ex">bibtex</span> document.aux</span>
+<span id="cb141-3"><a href="#cb141-3" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span>
+<span id="cb141-4"><a href="#cb141-4" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text, where the middot (<code>·</code>) denotes a
non-breaking space:</p>
@@ -2080,8 +2205,8 @@ href="https://datatracker.ietf.org/doc/html/rfc3986#section-4.2">1</a>
Donald·Ervin Knuth. <em>The TeXbook, volume A of Computers and
typesetting.</em> Addison-Wesley, 1984.</p>
</blockquote>
-<h4 data-number="2.2.1.10" id="option-citations"><span
-class="header-section-number">2.2.1.10</span> Option
+<h4 data-number="2.2.1.12" id="option-citations"><span
+class="header-section-number">2.2.1.12</span> Option
<code>citations</code></h4>
<dl>
<dt><code>citations</code> (default value: <code>false</code>)</dt>
@@ -2090,20 +2215,20 @@ class="header-section-number">2.2.1.10</span> Option
<dt>true</dt>
<dd>
<p>Enable the Pandoc citation syntax extension:</p>
-<div class="sourceCode" id="cb137"><pre
-class="sourceCode md"><code class="sourceCode markdown"><span id="cb137-1"><a href="#cb137-1" aria-hidden="true" tabindex="-1"></a>Here is a simple parenthetical citation <span class="co">[</span><span class="ot">@doe99</span><span class="co">]</span> and here</span>
-<span id="cb137-2"><a href="#cb137-2" aria-hidden="true" tabindex="-1"></a>is a string of several [see @doe99, pp. 33-35; also</span>
-<span id="cb137-3"><a href="#cb137-3" aria-hidden="true" tabindex="-1"></a>@smith04, chap. 1].</span>
-<span id="cb137-4"><a href="#cb137-4" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb137-5"><a href="#cb137-5" aria-hidden="true" tabindex="-1"></a>A parenthetical citation can have a <span class="co">[</span><span class="ot">prenote @doe99</span><span class="co">]</span> and</span>
-<span id="cb137-6"><a href="#cb137-6" aria-hidden="true" tabindex="-1"></a>a <span class="co">[</span><span class="ot">@smith04 postnote</span><span class="co">]</span>. The name of the author can be</span>
-<span id="cb137-7"><a href="#cb137-7" aria-hidden="true" tabindex="-1"></a>suppressed by inserting a dash before the name of an</span>
-<span id="cb137-8"><a href="#cb137-8" aria-hidden="true" tabindex="-1"></a>author as follows <span class="co">[</span><span class="ot">-@smith04</span><span class="co">]</span>.</span>
-<span id="cb137-9"><a href="#cb137-9" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb137-10"><a href="#cb137-10" aria-hidden="true" tabindex="-1"></a>Here is a simple text citation @doe99 and here is</span>
-<span id="cb137-11"><a href="#cb137-11" aria-hidden="true" tabindex="-1"></a>a string of several @doe99 [pp. 33-35; also @smith04,</span>
-<span id="cb137-12"><a href="#cb137-12" aria-hidden="true" tabindex="-1"></a>chap. 1]. Here is one with the name of the author</span>
-<span id="cb137-13"><a href="#cb137-13" aria-hidden="true" tabindex="-1"></a>suppressed -@doe99.</span></code></pre></div>
+<div class="sourceCode" id="cb142"><pre
+class="sourceCode md"><code class="sourceCode markdown"><span id="cb142-1"><a href="#cb142-1" aria-hidden="true" tabindex="-1"></a>Here is a simple parenthetical citation <span class="co">[</span><span class="ot">@doe99</span><span class="co">]</span> and here</span>
+<span id="cb142-2"><a href="#cb142-2" aria-hidden="true" tabindex="-1"></a>is a string of several [see @doe99, pp. 33-35; also</span>
+<span id="cb142-3"><a href="#cb142-3" aria-hidden="true" tabindex="-1"></a>@smith04, chap. 1].</span>
+<span id="cb142-4"><a href="#cb142-4" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb142-5"><a href="#cb142-5" aria-hidden="true" tabindex="-1"></a>A parenthetical citation can have a <span class="co">[</span><span class="ot">prenote @doe99</span><span class="co">]</span> and</span>
+<span id="cb142-6"><a href="#cb142-6" aria-hidden="true" tabindex="-1"></a>a <span class="co">[</span><span class="ot">@smith04 postnote</span><span class="co">]</span>. The name of the author can be</span>
+<span id="cb142-7"><a href="#cb142-7" aria-hidden="true" tabindex="-1"></a>suppressed by inserting a dash before the name of an</span>
+<span id="cb142-8"><a href="#cb142-8" aria-hidden="true" tabindex="-1"></a>author as follows <span class="co">[</span><span class="ot">-@smith04</span><span class="co">]</span>.</span>
+<span id="cb142-9"><a href="#cb142-9" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb142-10"><a href="#cb142-10" aria-hidden="true" tabindex="-1"></a>Here is a simple text citation @doe99 and here is</span>
+<span id="cb142-11"><a href="#cb142-11" aria-hidden="true" tabindex="-1"></a>a string of several @doe99 [pp. 33-35; also @smith04,</span>
+<span id="cb142-12"><a href="#cb142-12" aria-hidden="true" tabindex="-1"></a>chap. 1]. Here is one with the name of the author</span>
+<span id="cb142-13"><a href="#cb142-13" aria-hidden="true" tabindex="-1"></a>suppressed -@doe99.</span></code></pre></div>
</dd>
</dl>
</dd>
@@ -2116,38 +2241,38 @@ class="sourceCode md"><code class="sourceCode markdown"><span id="cb137-1"><a hr
</dl>
</dd>
</dl>
-<h5 class="unnumbered" id="latex-example-8"><span
+<h5 class="unnumbered" id="latex-example-10"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.bib</code> with the following content:</p>
-<div class="sourceCode" id="cb138"><pre
-class="sourceCode bib"><code class="sourceCode bibtex"><span id="cb138-1"><a href="#cb138-1" aria-hidden="true" tabindex="-1"></a><span class="va">@book</span>{<span class="ot">knuth:tex</span>,</span>
-<span id="cb138-2"><a href="#cb138-2" aria-hidden="true" tabindex="-1"></a> <span class="dt">author</span> = &quot;<span class="st">Knuth, Donald Ervin</span>&quot;,</span>
-<span id="cb138-3"><a href="#cb138-3" aria-hidden="true" tabindex="-1"></a> <span class="dt">title</span> = &quot;<span class="st">The </span><span class="ch">\TeX</span><span class="st"> book, volume A of Computers and typesetting</span>&quot;,</span>
-<span id="cb138-4"><a href="#cb138-4" aria-hidden="true" tabindex="-1"></a> <span class="dt">publisher</span> = &quot;<span class="st">Addison-Wesley</span>&quot;,</span>
-<span id="cb138-5"><a href="#cb138-5" aria-hidden="true" tabindex="-1"></a> <span class="dt">year</span> = &quot;<span class="st">1984</span>&quot;</span>
-<span id="cb138-6"><a href="#cb138-6" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div>
+<div class="sourceCode" id="cb143"><pre
+class="sourceCode bib"><code class="sourceCode bibtex"><span id="cb143-1"><a href="#cb143-1" aria-hidden="true" tabindex="-1"></a><span class="va">@book</span>{<span class="ot">knuth:tex</span>,</span>
+<span id="cb143-2"><a href="#cb143-2" aria-hidden="true" tabindex="-1"></a> <span class="dt">author</span> = &quot;<span class="st">Knuth, Donald Ervin</span>&quot;,</span>
+<span id="cb143-3"><a href="#cb143-3" aria-hidden="true" tabindex="-1"></a> <span class="dt">title</span> = &quot;<span class="st">The </span><span class="ch">\TeX</span><span class="st"> book, volume A of Computers and typesetting</span>&quot;,</span>
+<span id="cb143-4"><a href="#cb143-4" aria-hidden="true" tabindex="-1"></a> <span class="dt">publisher</span> = &quot;<span class="st">Addison-Wesley</span>&quot;,</span>
+<span id="cb143-5"><a href="#cb143-5" aria-hidden="true" tabindex="-1"></a> <span class="dt">year</span> = &quot;<span class="st">1984</span>&quot;</span>
+<span id="cb143-6"><a href="#cb143-6" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb139"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb139-1"><a href="#cb139-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb139-2"><a href="#cb139-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[backend=biber]{<span class="ex">biblatex</span>}</span>
-<span id="cb139-3"><a href="#cb139-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\addbibresource</span>{document.bib}</span>
-<span id="cb139-4"><a href="#cb139-4" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[citations]{<span class="ex">markdown</span>}</span>
-<span id="cb139-5"><a href="#cb139-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb139-6"><a href="#cb139-6" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb139-7"><a href="#cb139-7" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb139-8"><a href="#cb139-8" aria-hidden="true" tabindex="-1"></a>The TeXbook [@knuth:tex, p. 123 and 130] was written by @knuth:tex.</span>
-<span id="cb139-9"><a href="#cb139-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb139-10"><a href="#cb139-10" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb139-11"><a href="#cb139-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\printbibliography</span></span>
-<span id="cb139-12"><a href="#cb139-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<div class="sourceCode" id="cb144"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb144-1"><a href="#cb144-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb144-2"><a href="#cb144-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[backend=biber]{<span class="ex">biblatex</span>}</span>
+<span id="cb144-3"><a href="#cb144-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\addbibresource</span>{document.bib}</span>
+<span id="cb144-4"><a href="#cb144-4" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[citations]{<span class="ex">markdown</span>}</span>
+<span id="cb144-5"><a href="#cb144-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb144-6"><a href="#cb144-6" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb144-7"><a href="#cb144-7" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb144-8"><a href="#cb144-8" aria-hidden="true" tabindex="-1"></a>The TeXbook [@knuth:tex, p. 123 and 130] was written by @knuth:tex.</span>
+<span id="cb144-9"><a href="#cb144-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb144-10"><a href="#cb144-10" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb144-11"><a href="#cb144-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\printbibliography</span></span>
+<span id="cb144-12"><a href="#cb144-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Next, invoke LuaTeX and Biber from the terminal:</p>
-<div class="sourceCode" id="cb140"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb140-1"><a href="#cb140-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span>
-<span id="cb140-2"><a href="#cb140-2" aria-hidden="true" tabindex="-1"></a><span class="ex">biber</span> document.bcf</span>
-<span id="cb140-3"><a href="#cb140-3" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span>
-<span id="cb140-4"><a href="#cb140-4" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb145"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb145-1"><a href="#cb145-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span>
+<span id="cb145-2"><a href="#cb145-2" aria-hidden="true" tabindex="-1"></a><span class="ex">biber</span> document.bcf</span>
+<span id="cb145-3"><a href="#cb145-3" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span>
+<span id="cb145-4"><a href="#cb145-4" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -2159,8 +2284,8 @@ href="https://datatracker.ietf.org/doc/html/rfc3986#section-4.2">1</a>
Donald Ervin Knuth. <em>The <span class="tex">T<sub>e</sub>X</span>book,
volume A of Computers and typesetting.</em> Addison-Wesley, 1984.</p>
</blockquote>
-<h4 data-number="2.2.1.11" id="option-codespans"><span
-class="header-section-number">2.2.1.11</span> Option
+<h4 data-number="2.2.1.13" id="option-codespans"><span
+class="header-section-number">2.2.1.13</span> Option
<code>codeSpans</code></h4>
<dl>
<dt><code>codeSpans</code> (default value: <code>true</code>)</dt>
@@ -2169,9 +2294,9 @@ class="header-section-number">2.2.1.11</span> Option
<dt>true</dt>
<dd>
<p>Enable the code span syntax:</p>
-<div class="sourceCode" id="cb141"><pre
-class="sourceCode md"><code class="sourceCode markdown"><span id="cb141-1"><a href="#cb141-1" aria-hidden="true" tabindex="-1"></a>Use the <span class="in">`printf()`</span> function.</span>
-<span id="cb141-2"><a href="#cb141-2" aria-hidden="true" tabindex="-1"></a>`<span class="in">`There is a literal backtick (`</span>) here.``</span></code></pre></div>
+<div class="sourceCode" id="cb146"><pre
+class="sourceCode md"><code class="sourceCode markdown"><span id="cb146-1"><a href="#cb146-1" aria-hidden="true" tabindex="-1"></a>Use the <span class="in">`printf()`</span> function.</span>
+<span id="cb146-2"><a href="#cb146-2" aria-hidden="true" tabindex="-1"></a>`<span class="in">`There is a literal backtick (`</span>) here.``</span></code></pre></div>
</dd>
</dl>
</dd>
@@ -2189,28 +2314,28 @@ quotation mark ligatures in texts that do not contain code spans:</p>
<h5 class="unnumbered" id="lua-module-example-6">Lua Module Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb143"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb143-1"><a href="#cb143-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
-<span id="cb143-2"><a href="#cb143-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span>
-<span id="cb143-3"><a href="#cb143-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\directlua</span>{</span>
-<span id="cb143-4"><a href="#cb143-4" aria-hidden="true" tabindex="-1"></a> local markdown = require(&quot;markdown&quot;)</span>
-<span id="cb143-5"><a href="#cb143-5" aria-hidden="true" tabindex="-1"></a> local convert = markdown.new()</span>
-<span id="cb143-6"><a href="#cb143-6" aria-hidden="true" tabindex="-1"></a> local input =</span>
-<span id="cb143-7"><a href="#cb143-7" aria-hidden="true" tabindex="-1"></a> &quot;``This is a code span.&#39;&#39; &quot; ..</span>
-<span id="cb143-8"><a href="#cb143-8" aria-hidden="true" tabindex="-1"></a> &quot;``This is no longer a code span.&#39;&#39;&quot;</span>
-<span id="cb143-9"><a href="#cb143-9" aria-hidden="true" tabindex="-1"></a> tex.sprint(convert(input)) }</span>
-<span id="cb143-10"><a href="#cb143-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\par</span></span>
-<span id="cb143-11"><a href="#cb143-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\directlua</span>{</span>
-<span id="cb143-12"><a href="#cb143-12" aria-hidden="true" tabindex="-1"></a> local markdown = require(&quot;markdown&quot;)</span>
-<span id="cb143-13"><a href="#cb143-13" aria-hidden="true" tabindex="-1"></a> local convert = markdown.new({codeSpans = false})</span>
-<span id="cb143-14"><a href="#cb143-14" aria-hidden="true" tabindex="-1"></a> local input =</span>
-<span id="cb143-15"><a href="#cb143-15" aria-hidden="true" tabindex="-1"></a> &quot;``This is a quote.&#39;&#39; &quot; ..</span>
-<span id="cb143-16"><a href="#cb143-16" aria-hidden="true" tabindex="-1"></a> &quot;``This is another quote.&#39;&#39;&quot;</span>
-<span id="cb143-17"><a href="#cb143-17" aria-hidden="true" tabindex="-1"></a> tex.sprint(convert(input)) }</span>
-<span id="cb143-18"><a href="#cb143-18" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
+<div class="sourceCode" id="cb148"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb148-1"><a href="#cb148-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
+<span id="cb148-2"><a href="#cb148-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span>
+<span id="cb148-3"><a href="#cb148-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\directlua</span>{</span>
+<span id="cb148-4"><a href="#cb148-4" aria-hidden="true" tabindex="-1"></a> local markdown = require(&quot;markdown&quot;)</span>
+<span id="cb148-5"><a href="#cb148-5" aria-hidden="true" tabindex="-1"></a> local convert = markdown.new()</span>
+<span id="cb148-6"><a href="#cb148-6" aria-hidden="true" tabindex="-1"></a> local input =</span>
+<span id="cb148-7"><a href="#cb148-7" aria-hidden="true" tabindex="-1"></a> &quot;``This is a code span.&#39;&#39; &quot; ..</span>
+<span id="cb148-8"><a href="#cb148-8" aria-hidden="true" tabindex="-1"></a> &quot;``This is no longer a code span.&#39;&#39;&quot;</span>
+<span id="cb148-9"><a href="#cb148-9" aria-hidden="true" tabindex="-1"></a> tex.sprint(convert(input)) }</span>
+<span id="cb148-10"><a href="#cb148-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\par</span></span>
+<span id="cb148-11"><a href="#cb148-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\directlua</span>{</span>
+<span id="cb148-12"><a href="#cb148-12" aria-hidden="true" tabindex="-1"></a> local markdown = require(&quot;markdown&quot;)</span>
+<span id="cb148-13"><a href="#cb148-13" aria-hidden="true" tabindex="-1"></a> local convert = markdown.new({codeSpans = false})</span>
+<span id="cb148-14"><a href="#cb148-14" aria-hidden="true" tabindex="-1"></a> local input =</span>
+<span id="cb148-15"><a href="#cb148-15" aria-hidden="true" tabindex="-1"></a> &quot;``This is a quote.&#39;&#39; &quot; ..</span>
+<span id="cb148-16"><a href="#cb148-16" aria-hidden="true" tabindex="-1"></a> &quot;``This is another quote.&#39;&#39;&quot;</span>
+<span id="cb148-17"><a href="#cb148-17" aria-hidden="true" tabindex="-1"></a> tex.sprint(convert(input)) }</span>
+<span id="cb148-18"><a href="#cb148-18" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
<p>Then, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb144"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb144-1"><a href="#cb144-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb149"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb149-1"><a href="#cb149-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -2221,22 +2346,22 @@ span.’’</p>
<h5 class="unnumbered" id="lua-cli-example-6">Lua CLI Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb145"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb145-1"><a href="#cb145-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
-<span id="cb145-2"><a href="#cb145-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span>
-<span id="cb145-3"><a href="#cb145-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> optionfalse</span>
-<span id="cb145-4"><a href="#cb145-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\par</span></span>
-<span id="cb145-5"><a href="#cb145-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> optiontrue</span>
-<span id="cb145-6"><a href="#cb145-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
+<div class="sourceCode" id="cb150"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb150-1"><a href="#cb150-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
+<span id="cb150-2"><a href="#cb150-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span>
+<span id="cb150-3"><a href="#cb150-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> optionfalse</span>
+<span id="cb150-4"><a href="#cb150-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\par</span></span>
+<span id="cb150-5"><a href="#cb150-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> optiontrue</span>
+<span id="cb150-6"><a href="#cb150-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
<p>Using a text editor, create a text document named
<code>content.md</code> with the following content:</p>
-<div class="sourceCode" id="cb146"><pre
-class="sourceCode md"><code class="sourceCode markdown"><span id="cb146-1"><a href="#cb146-1" aria-hidden="true" tabindex="-1"></a>``Is this a code span?&#39;&#39; ``Or a quote?&#39;&#39;</span></code></pre></div>
+<div class="sourceCode" id="cb151"><pre
+class="sourceCode md"><code class="sourceCode markdown"><span id="cb151-1"><a href="#cb151-1" aria-hidden="true" tabindex="-1"></a>``Is this a code span?&#39;&#39; ``Or a quote?&#39;&#39;</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb147"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb147-1"><a href="#cb147-1" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ codeSpans=false <span class="at">--</span> content.md optionfalse.tex</span>
-<span id="cb147-2"><a href="#cb147-2" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ <span class="at">--</span> content.md optiontrue.tex</span>
-<span id="cb147-3"><a href="#cb147-3" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb152"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb152-1"><a href="#cb152-1" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ codeSpans=false <span class="at">--</span> content.md optionfalse.tex</span>
+<span id="cb152-2"><a href="#cb152-2" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ <span class="at">--</span> content.md optiontrue.tex</span>
+<span id="cb152-3"><a href="#cb152-3" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
<p>where ⟨<em>CLI pathname</em>⟩ corresponds to the location of the Lua
CLI script file, such as
<code>~/texmf/scripts/markdown/markdown-cli.lua</code> on UN*X systems
@@ -2256,24 +2381,24 @@ contain the following text:</p>
class="tex">T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb148"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb148-1"><a href="#cb148-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
-<span id="cb148-2"><a href="#cb148-2" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb148-3"><a href="#cb148-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
-<span id="cb148-4"><a href="#cb148-4" aria-hidden="true" tabindex="-1"></a>``This is a code span.&#39;&#39;</span>
-<span id="cb148-5"><a href="#cb148-5" aria-hidden="true" tabindex="-1"></a>``This is no longer a code span.&#39;&#39;</span>
-<span id="cb148-6"><a href="#cb148-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
-<span id="cb148-7"><a href="#cb148-7" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb148-8"><a href="#cb148-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionCodeSpans</span>{false}</span>
-<span id="cb148-9"><a href="#cb148-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
-<span id="cb148-10"><a href="#cb148-10" aria-hidden="true" tabindex="-1"></a>``This is a quote.&#39;&#39;</span>
-<span id="cb148-11"><a href="#cb148-11" aria-hidden="true" tabindex="-1"></a>``This is another quote.&#39;&#39;</span>
-<span id="cb148-12"><a href="#cb148-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
-<span id="cb148-13"><a href="#cb148-13" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb148-14"><a href="#cb148-14" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
+<div class="sourceCode" id="cb153"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb153-1"><a href="#cb153-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
+<span id="cb153-2"><a href="#cb153-2" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb153-3"><a href="#cb153-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
+<span id="cb153-4"><a href="#cb153-4" aria-hidden="true" tabindex="-1"></a>``This is a code span.&#39;&#39;</span>
+<span id="cb153-5"><a href="#cb153-5" aria-hidden="true" tabindex="-1"></a>``This is no longer a code span.&#39;&#39;</span>
+<span id="cb153-6"><a href="#cb153-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
+<span id="cb153-7"><a href="#cb153-7" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb153-8"><a href="#cb153-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionCodeSpans</span>{false}</span>
+<span id="cb153-9"><a href="#cb153-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
+<span id="cb153-10"><a href="#cb153-10" aria-hidden="true" tabindex="-1"></a>``This is a quote.&#39;&#39;</span>
+<span id="cb153-11"><a href="#cb153-11" aria-hidden="true" tabindex="-1"></a>``This is another quote.&#39;&#39;</span>
+<span id="cb153-12"><a href="#cb153-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
+<span id="cb153-13"><a href="#cb153-13" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb153-14"><a href="#cb153-14" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb149"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb149-1"><a href="#cb149-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb154"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb154-1"><a href="#cb154-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -2281,29 +2406,29 @@ contain the following text:</p>
span.’’</p>
<p>“This is a quote.” “This is another quote.”</p>
</blockquote>
-<h5 class="unnumbered" id="latex-example-9"><span
+<h5 class="unnumbered" id="latex-example-11"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb150"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb150-1"><a href="#cb150-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb150-2"><a href="#cb150-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span>
-<span id="cb150-3"><a href="#cb150-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb150-4"><a href="#cb150-4" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb150-5"><a href="#cb150-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb150-6"><a href="#cb150-6" aria-hidden="true" tabindex="-1"></a>``This is a code span.&#39;&#39;</span>
-<span id="cb150-7"><a href="#cb150-7" aria-hidden="true" tabindex="-1"></a>``This is no longer a code span.&#39;&#39;</span>
-<span id="cb150-8"><a href="#cb150-8" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb150-9"><a href="#cb150-9" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb150-10"><a href="#cb150-10" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{codeSpans=false}</span>
-<span id="cb150-11"><a href="#cb150-11" aria-hidden="true" tabindex="-1"></a>``This is a quote.&#39;&#39;</span>
-<span id="cb150-12"><a href="#cb150-12" aria-hidden="true" tabindex="-1"></a>``This is another quote.&#39;&#39;</span>
-<span id="cb150-13"><a href="#cb150-13" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span>
-<span id="cb150-14"><a href="#cb150-14" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb150-15"><a href="#cb150-15" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<div class="sourceCode" id="cb155"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb155-1"><a href="#cb155-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb155-2"><a href="#cb155-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span>
+<span id="cb155-3"><a href="#cb155-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb155-4"><a href="#cb155-4" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb155-5"><a href="#cb155-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb155-6"><a href="#cb155-6" aria-hidden="true" tabindex="-1"></a>``This is a code span.&#39;&#39;</span>
+<span id="cb155-7"><a href="#cb155-7" aria-hidden="true" tabindex="-1"></a>``This is no longer a code span.&#39;&#39;</span>
+<span id="cb155-8"><a href="#cb155-8" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb155-9"><a href="#cb155-9" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb155-10"><a href="#cb155-10" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{codeSpans=false}</span>
+<span id="cb155-11"><a href="#cb155-11" aria-hidden="true" tabindex="-1"></a>``This is a quote.&#39;&#39;</span>
+<span id="cb155-12"><a href="#cb155-12" aria-hidden="true" tabindex="-1"></a>``This is another quote.&#39;&#39;</span>
+<span id="cb155-13"><a href="#cb155-13" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span>
+<span id="cb155-14"><a href="#cb155-14" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb155-15"><a href="#cb155-15" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb151"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb151-1"><a href="#cb151-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb156"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb156-1"><a href="#cb156-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -2315,25 +2440,25 @@ span.’’</p>
class="tex">T<sub>e</sub>X</span>t Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb152"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb152-1"><a href="#cb152-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
-<span id="cb152-2"><a href="#cb152-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
-<span id="cb152-3"><a href="#cb152-3" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb152-4"><a href="#cb152-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb152-5"><a href="#cb152-5" aria-hidden="true" tabindex="-1"></a>``This is a code span.&#39;&#39;</span>
-<span id="cb152-6"><a href="#cb152-6" aria-hidden="true" tabindex="-1"></a>``This is no longer a code span.&#39;&#39;</span>
-<span id="cb152-7"><a href="#cb152-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb152-8"><a href="#cb152-8" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb152-9"><a href="#cb152-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[codeSpans = no]</span>
-<span id="cb152-10"><a href="#cb152-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb152-11"><a href="#cb152-11" aria-hidden="true" tabindex="-1"></a>``This is a quote.&#39;&#39;</span>
-<span id="cb152-12"><a href="#cb152-12" aria-hidden="true" tabindex="-1"></a>``This is another quote.&#39;&#39;</span>
-<span id="cb152-13"><a href="#cb152-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb152-14"><a href="#cb152-14" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb152-15"><a href="#cb152-15" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
+<div class="sourceCode" id="cb157"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb157-1"><a href="#cb157-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
+<span id="cb157-2"><a href="#cb157-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
+<span id="cb157-3"><a href="#cb157-3" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb157-4"><a href="#cb157-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb157-5"><a href="#cb157-5" aria-hidden="true" tabindex="-1"></a>``This is a code span.&#39;&#39;</span>
+<span id="cb157-6"><a href="#cb157-6" aria-hidden="true" tabindex="-1"></a>``This is no longer a code span.&#39;&#39;</span>
+<span id="cb157-7"><a href="#cb157-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb157-8"><a href="#cb157-8" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb157-9"><a href="#cb157-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[codeSpans = no]</span>
+<span id="cb157-10"><a href="#cb157-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb157-11"><a href="#cb157-11" aria-hidden="true" tabindex="-1"></a>``This is a quote.&#39;&#39;</span>
+<span id="cb157-12"><a href="#cb157-12" aria-hidden="true" tabindex="-1"></a>``This is another quote.&#39;&#39;</span>
+<span id="cb157-13"><a href="#cb157-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb157-14"><a href="#cb157-14" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb157-15"><a href="#cb157-15" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb153"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb153-1"><a href="#cb153-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb158"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb158-1"><a href="#cb158-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -2341,8 +2466,8 @@ contain the following text:</p>
span.’’</p>
<p>“This is a quote.” “This is another quote.”</p>
</blockquote>
-<h4 data-number="2.2.1.12" id="option-contentblocks"><span
-class="header-section-number">2.2.1.12</span> Option
+<h4 data-number="2.2.1.14" id="option-contentblocks"><span
+class="header-section-number">2.2.1.14</span> Option
<code>contentBlocks</code></h4>
<dl>
<dt><code>contentBlocks</code> (default value: <code>false</code>)</dt>
@@ -2351,13 +2476,13 @@ class="header-section-number">2.2.1.12</span> Option
<dt>true</dt>
<dd>
<p>Enable the iA Writer content blocks syntax extension:</p>
-<div class="sourceCode" id="cb154"><pre
-class="sourceCode md"><code class="sourceCode markdown"><span id="cb154-1"><a href="#cb154-1" aria-hidden="true" tabindex="-1"></a>http://example.com/minard.jpg (Napoleon&#39;s</span>
-<span id="cb154-2"><a href="#cb154-2" aria-hidden="true" tabindex="-1"></a> disastrous Russian campaign of 1812)</span>
-<span id="cb154-3"><a href="#cb154-3" aria-hidden="true" tabindex="-1"></a>/Flowchart.png &quot;Engineering Flowchart&quot;</span>
-<span id="cb154-4"><a href="#cb154-4" aria-hidden="true" tabindex="-1"></a>/Savings Account.csv &#39;Recent Transactions&#39;</span>
-<span id="cb154-5"><a href="#cb154-5" aria-hidden="true" tabindex="-1"></a>/Example.swift</span>
-<span id="cb154-6"><a href="#cb154-6" aria-hidden="true" tabindex="-1"></a>/Lorem Ipsum.txt</span></code></pre></div>
+<div class="sourceCode" id="cb159"><pre
+class="sourceCode md"><code class="sourceCode markdown"><span id="cb159-1"><a href="#cb159-1" aria-hidden="true" tabindex="-1"></a>http://example.com/minard.jpg (Napoleon&#39;s</span>
+<span id="cb159-2"><a href="#cb159-2" aria-hidden="true" tabindex="-1"></a> disastrous Russian campaign of 1812)</span>
+<span id="cb159-3"><a href="#cb159-3" aria-hidden="true" tabindex="-1"></a>/Flowchart.png &quot;Engineering Flowchart&quot;</span>
+<span id="cb159-4"><a href="#cb159-4" aria-hidden="true" tabindex="-1"></a>/Savings Account.csv &#39;Recent Transactions&#39;</span>
+<span id="cb159-5"><a href="#cb159-5" aria-hidden="true" tabindex="-1"></a>/Example.swift</span>
+<span id="cb159-6"><a href="#cb159-6" aria-hidden="true" tabindex="-1"></a>/Lorem Ipsum.txt</span></code></pre></div>
</dd>
</dl>
</dd>
@@ -2370,7 +2495,7 @@ class="sourceCode md"><code class="sourceCode markdown"><span id="cb154-1"><a hr
</dl>
</dd>
</dl>
-<h5 class="unnumbered" id="latex-example-10"><span
+<h5 class="unnumbered" id="latex-example-12"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>table.csv</code> with the following content:</p>
@@ -2380,34 +2505,34 @@ Marie,Curie,1867
Thomas,Edison,1847</code></pre>
<p>Create also a text document named
<code>markdown-languages.json</code> with the following content:</p>
-<div class="sourceCode" id="cb156"><pre
-class="sourceCode js"><code class="sourceCode javascript"><span id="cb156-1"><a href="#cb156-1" aria-hidden="true" tabindex="-1"></a>{</span>
-<span id="cb156-2"><a href="#cb156-2" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;tex&quot;</span><span class="op">:</span> <span class="st">&quot;LaTeX&quot;</span></span>
-<span id="cb156-3"><a href="#cb156-3" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div>
+<div class="sourceCode" id="cb161"><pre
+class="sourceCode js"><code class="sourceCode javascript"><span id="cb161-1"><a href="#cb161-1" aria-hidden="true" tabindex="-1"></a>{</span>
+<span id="cb161-2"><a href="#cb161-2" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;tex&quot;</span><span class="op">:</span> <span class="st">&quot;LaTeX&quot;</span></span>
+<span id="cb161-3"><a href="#cb161-3" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div>
<p>Create also a text document named <code>code.tex</code> with the
following content:</p>
-<div class="sourceCode" id="cb157"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb157-1"><a href="#cb157-1" aria-hidden="true" tabindex="-1"></a>This is an example code listing in <span class="fu">\LaTeX</span>.</span></code></pre></div>
+<div class="sourceCode" id="cb162"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb162-1"><a href="#cb162-1" aria-hidden="true" tabindex="-1"></a>This is an example code listing in <span class="fu">\LaTeX</span>.</span></code></pre></div>
<p>Create also a text document named <code>part.md</code> with the
following content:</p>
-<div class="sourceCode" id="cb158"><pre
-class="sourceCode md"><code class="sourceCode markdown"><span id="cb158-1"><a href="#cb158-1" aria-hidden="true" tabindex="-1"></a>This is a *transcluded markdown document*.</span></code></pre></div>
+<div class="sourceCode" id="cb163"><pre
+class="sourceCode md"><code class="sourceCode markdown"><span id="cb163-1"><a href="#cb163-1" aria-hidden="true" tabindex="-1"></a>This is a *transcluded markdown document*.</span></code></pre></div>
<p>Create also a text document named <code>document.tex</code> with the
following content:</p>
-<div class="sourceCode" id="cb159"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb159-1"><a href="#cb159-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb159-2"><a href="#cb159-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">minted</span>}</span>
-<span id="cb159-3"><a href="#cb159-3" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[contentBlocks]{<span class="ex">markdown</span>}</span>
-<span id="cb159-4"><a href="#cb159-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb159-5"><a href="#cb159-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb159-6"><a href="#cb159-6" aria-hidden="true" tabindex="-1"></a>/table.csv (An example table)</span>
-<span id="cb159-7"><a href="#cb159-7" aria-hidden="true" tabindex="-1"></a>/code.tex (An example code listing)</span>
-<span id="cb159-8"><a href="#cb159-8" aria-hidden="true" tabindex="-1"></a>/part.md (A file transclusion example)</span>
-<span id="cb159-9"><a href="#cb159-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb159-10"><a href="#cb159-10" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<div class="sourceCode" id="cb164"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb164-1"><a href="#cb164-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb164-2"><a href="#cb164-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">minted</span>}</span>
+<span id="cb164-3"><a href="#cb164-3" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[contentBlocks]{<span class="ex">markdown</span>}</span>
+<span id="cb164-4"><a href="#cb164-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb164-5"><a href="#cb164-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb164-6"><a href="#cb164-6" aria-hidden="true" tabindex="-1"></a>/table.csv (An example table)</span>
+<span id="cb164-7"><a href="#cb164-7" aria-hidden="true" tabindex="-1"></a>/code.tex (An example code listing)</span>
+<span id="cb164-8"><a href="#cb164-8" aria-hidden="true" tabindex="-1"></a>/part.md (A file transclusion example)</span>
+<span id="cb164-9"><a href="#cb164-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb164-10"><a href="#cb164-10" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb160"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb160-1"><a href="#cb160-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> <span class="at">--shell-escape</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb165"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb165-1"><a href="#cb165-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> <span class="at">--shell-escape</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -2438,8 +2563,8 @@ contain the following text:</p>
</tbody>
</table>
<p>Table 1: An example table</p>
-<div class="sourceCode" id="cb161"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb161-1"><a href="#cb161-1" aria-hidden="true" tabindex="-1"></a>This is an example code listing in <span class="fu">\LaTeX</span>.</span></code></pre></div>
+<div class="sourceCode" id="cb166"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb166-1"><a href="#cb166-1" aria-hidden="true" tabindex="-1"></a>This is an example code listing in <span class="fu">\LaTeX</span>.</span></code></pre></div>
<p>This is a <em>transcluded markdown document</em>.</p>
</blockquote>
<h5 class="unnumbered" id="context-example-8">Con<span
@@ -2452,35 +2577,35 @@ Marie,Curie,1867
Thomas,Edison,1847</code></pre>
<p>Create also a text document named
<code>markdown-languages.json</code> with the following content:</p>
-<div class="sourceCode" id="cb163"><pre
-class="sourceCode js"><code class="sourceCode javascript"><span id="cb163-1"><a href="#cb163-1" aria-hidden="true" tabindex="-1"></a>{</span>
-<span id="cb163-2"><a href="#cb163-2" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;tex&quot;</span><span class="op">:</span> <span class="st">&quot;ConTeXt&quot;</span></span>
-<span id="cb163-3"><a href="#cb163-3" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div>
+<div class="sourceCode" id="cb168"><pre
+class="sourceCode js"><code class="sourceCode javascript"><span id="cb168-1"><a href="#cb168-1" aria-hidden="true" tabindex="-1"></a>{</span>
+<span id="cb168-2"><a href="#cb168-2" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;tex&quot;</span><span class="op">:</span> <span class="st">&quot;ConTeXt&quot;</span></span>
+<span id="cb168-3"><a href="#cb168-3" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div>
<p>Create also a text document named <code>code.tex</code> with the
following content:</p>
-<div class="sourceCode" id="cb164"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb164-1"><a href="#cb164-1" aria-hidden="true" tabindex="-1"></a>This is an example code listing in <span class="fu">\ConTeXt</span>.</span></code></pre></div>
+<div class="sourceCode" id="cb169"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb169-1"><a href="#cb169-1" aria-hidden="true" tabindex="-1"></a>This is an example code listing in <span class="fu">\ConTeXt</span>.</span></code></pre></div>
<p>Create also a text document named <code>part.md</code> with the
following content:</p>
-<div class="sourceCode" id="cb165"><pre
-class="sourceCode md"><code class="sourceCode markdown"><span id="cb165-1"><a href="#cb165-1" aria-hidden="true" tabindex="-1"></a>This is a *transcluded markdown document*.</span></code></pre></div>
+<div class="sourceCode" id="cb170"><pre
+class="sourceCode md"><code class="sourceCode markdown"><span id="cb170-1"><a href="#cb170-1" aria-hidden="true" tabindex="-1"></a>This is a *transcluded markdown document*.</span></code></pre></div>
<p>Create also a text document named <code>document.tex</code> with the
following content:</p>
-<div class="sourceCode" id="cb166"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb166-1"><a href="#cb166-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
-<span id="cb166-2"><a href="#cb166-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[contentBlocks = yes]</span>
-<span id="cb166-3"><a href="#cb166-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\definetyping</span> [ConTeXt]</span>
-<span id="cb166-4"><a href="#cb166-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\setuptyping</span> [ConTeXt] [option=TEX]</span>
-<span id="cb166-5"><a href="#cb166-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
-<span id="cb166-6"><a href="#cb166-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb166-7"><a href="#cb166-7" aria-hidden="true" tabindex="-1"></a>/table.csv (An example table)</span>
-<span id="cb166-8"><a href="#cb166-8" aria-hidden="true" tabindex="-1"></a>/code.tex (An example code listing)</span>
-<span id="cb166-9"><a href="#cb166-9" aria-hidden="true" tabindex="-1"></a>/part.md (A file transclusion example)</span>
-<span id="cb166-10"><a href="#cb166-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb166-11"><a href="#cb166-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
+<div class="sourceCode" id="cb171"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb171-1"><a href="#cb171-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
+<span id="cb171-2"><a href="#cb171-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[contentBlocks = yes]</span>
+<span id="cb171-3"><a href="#cb171-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\definetyping</span> [ConTeXt]</span>
+<span id="cb171-4"><a href="#cb171-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\setuptyping</span> [ConTeXt] [option=TEX]</span>
+<span id="cb171-5"><a href="#cb171-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
+<span id="cb171-6"><a href="#cb171-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb171-7"><a href="#cb171-7" aria-hidden="true" tabindex="-1"></a>/table.csv (An example table)</span>
+<span id="cb171-8"><a href="#cb171-8" aria-hidden="true" tabindex="-1"></a>/code.tex (An example code listing)</span>
+<span id="cb171-9"><a href="#cb171-9" aria-hidden="true" tabindex="-1"></a>/part.md (A file transclusion example)</span>
+<span id="cb171-10"><a href="#cb171-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb171-11"><a href="#cb171-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb167"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb167-1"><a href="#cb167-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb172"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb172-1"><a href="#cb172-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -2511,12 +2636,12 @@ contain the following text:</p>
</tbody>
</table>
<p>Table 1: An example table</p>
-<div class="sourceCode" id="cb168"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb168-1"><a href="#cb168-1" aria-hidden="true" tabindex="-1"></a>This is an example code listing in <span class="fu">\ConTeXt</span>.</span></code></pre></div>
+<div class="sourceCode" id="cb173"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb173-1"><a href="#cb173-1" aria-hidden="true" tabindex="-1"></a>This is an example code listing in <span class="fu">\ConTeXt</span>.</span></code></pre></div>
<p>This is a <em>transcluded markdown document</em>.</p>
</blockquote>
-<h4 data-number="2.2.1.13" id="option-debugextensions"><span
-class="header-section-number">2.2.1.13</span> Option
+<h4 data-number="2.2.1.15" id="option-debugextensions"><span
+class="header-section-number">2.2.1.15</span> Option
<code>debugExtensions</code></h4>
<dl>
<dt><code>debugExtensions</code> (default value:
@@ -2547,49 +2672,49 @@ grammar of markdown.</p>
</dl>
</dd>
</dl>
-<h5 class="unnumbered" id="latex-example-11"><span
+<h5 class="unnumbered" id="latex-example-13"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>strike-through.lua</code> with the following content:</p>
-<div class="sourceCode" id="cb169"><pre
-class="sourceCode lua"><code class="sourceCode lua"><span id="cb169-1"><a href="#cb169-1" aria-hidden="true" tabindex="-1"></a><span class="kw">local</span> strike_through <span class="op">=</span> <span class="op">{</span></span>
-<span id="cb169-2"><a href="#cb169-2" aria-hidden="true" tabindex="-1"></a> api_version <span class="op">=</span> <span class="dv">2</span><span class="op">,</span></span>
-<span id="cb169-3"><a href="#cb169-3" aria-hidden="true" tabindex="-1"></a> grammar_version <span class="op">=</span> <span class="dv">2</span><span class="op">,</span></span>
-<span id="cb169-4"><a href="#cb169-4" aria-hidden="true" tabindex="-1"></a> finalize_grammar <span class="op">=</span> <span class="kw">function</span><span class="op">(</span>reader<span class="op">)</span></span>
-<span id="cb169-5"><a href="#cb169-5" aria-hidden="true" tabindex="-1"></a> <span class="kw">local</span> nonspacechar <span class="op">=</span> lpeg<span class="op">.</span>P<span class="op">(</span><span class="dv">1</span><span class="op">)</span> <span class="op">-</span> lpeg<span class="op">.</span>S<span class="op">(</span><span class="st">&quot;</span><span class="sc">\t</span><span class="st"> &quot;</span><span class="op">)</span></span>
-<span id="cb169-6"><a href="#cb169-6" aria-hidden="true" tabindex="-1"></a> <span class="kw">local</span> doubleslashes <span class="op">=</span> lpeg<span class="op">.</span>P<span class="op">(</span><span class="st">&quot;//&quot;</span><span class="op">)</span></span>
-<span id="cb169-7"><a href="#cb169-7" aria-hidden="true" tabindex="-1"></a> <span class="kw">local</span> <span class="kw">function</span> between<span class="op">(</span>p<span class="op">,</span> starter<span class="op">,</span> ender<span class="op">)</span></span>
-<span id="cb169-8"><a href="#cb169-8" aria-hidden="true" tabindex="-1"></a> ender <span class="op">=</span> lpeg<span class="op">.</span>B<span class="op">(</span>nonspacechar<span class="op">)</span> <span class="op">*</span> ender</span>
-<span id="cb169-9"><a href="#cb169-9" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> <span class="op">(</span>starter <span class="op">*</span> <span class="op">#</span>nonspacechar</span>
-<span id="cb169-10"><a href="#cb169-10" aria-hidden="true" tabindex="-1"></a> <span class="op">*</span> lpeg<span class="op">.</span>Ct<span class="op">(</span>p <span class="op">*</span> <span class="op">(</span>p <span class="op">-</span> ender<span class="op">)^</span><span class="dv">0</span><span class="op">)</span> <span class="op">*</span> ender<span class="op">)</span></span>
-<span id="cb169-11"><a href="#cb169-11" aria-hidden="true" tabindex="-1"></a> <span class="kw">end</span></span>
-<span id="cb169-12"><a href="#cb169-12" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb169-13"><a href="#cb169-13" aria-hidden="true" tabindex="-1"></a> <span class="kw">local</span> read_strike_through <span class="op">=</span> between<span class="op">(</span></span>
-<span id="cb169-14"><a href="#cb169-14" aria-hidden="true" tabindex="-1"></a> lpeg<span class="op">.</span>V<span class="op">(</span><span class="st">&quot;Inline&quot;</span><span class="op">),</span> doubleslashes<span class="op">,</span> doubleslashes</span>
-<span id="cb169-15"><a href="#cb169-15" aria-hidden="true" tabindex="-1"></a> <span class="op">)</span> <span class="op">/</span> <span class="kw">function</span><span class="op">(</span>s<span class="op">)</span> <span class="cf">return</span> <span class="op">{</span><span class="st">&quot;</span><span class="sc">\\</span><span class="st">st{&quot;</span><span class="op">,</span> s<span class="op">,</span> <span class="st">&quot;}&quot;</span><span class="op">}</span> <span class="kw">end</span></span>
-<span id="cb169-16"><a href="#cb169-16" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb169-17"><a href="#cb169-17" aria-hidden="true" tabindex="-1"></a> reader<span class="op">.</span>insert_pattern<span class="op">(</span><span class="st">&quot;Inline after Emph&quot;</span><span class="op">,</span> read_strike_through<span class="op">,</span></span>
-<span id="cb169-18"><a href="#cb169-18" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;StrikeThrough&quot;</span><span class="op">)</span></span>
-<span id="cb169-19"><a href="#cb169-19" aria-hidden="true" tabindex="-1"></a> reader<span class="op">.</span>add_special_character<span class="op">(</span><span class="st">&quot;/&quot;</span><span class="op">)</span></span>
-<span id="cb169-20"><a href="#cb169-20" aria-hidden="true" tabindex="-1"></a> <span class="kw">end</span></span>
-<span id="cb169-21"><a href="#cb169-21" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span>
-<span id="cb169-22"><a href="#cb169-22" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb169-23"><a href="#cb169-23" aria-hidden="true" tabindex="-1"></a><span class="cf">return</span> strike_through</span></code></pre></div>
+<div class="sourceCode" id="cb174"><pre
+class="sourceCode lua"><code class="sourceCode lua"><span id="cb174-1"><a href="#cb174-1" aria-hidden="true" tabindex="-1"></a><span class="kw">local</span> strike_through <span class="op">=</span> <span class="op">{</span></span>
+<span id="cb174-2"><a href="#cb174-2" aria-hidden="true" tabindex="-1"></a> api_version <span class="op">=</span> <span class="dv">2</span><span class="op">,</span></span>
+<span id="cb174-3"><a href="#cb174-3" aria-hidden="true" tabindex="-1"></a> grammar_version <span class="op">=</span> <span class="dv">2</span><span class="op">,</span></span>
+<span id="cb174-4"><a href="#cb174-4" aria-hidden="true" tabindex="-1"></a> finalize_grammar <span class="op">=</span> <span class="kw">function</span><span class="op">(</span>reader<span class="op">)</span></span>
+<span id="cb174-5"><a href="#cb174-5" aria-hidden="true" tabindex="-1"></a> <span class="kw">local</span> nonspacechar <span class="op">=</span> lpeg<span class="op">.</span>P<span class="op">(</span><span class="dv">1</span><span class="op">)</span> <span class="op">-</span> lpeg<span class="op">.</span>S<span class="op">(</span><span class="st">&quot;</span><span class="sc">\t</span><span class="st"> &quot;</span><span class="op">)</span></span>
+<span id="cb174-6"><a href="#cb174-6" aria-hidden="true" tabindex="-1"></a> <span class="kw">local</span> doubleslashes <span class="op">=</span> lpeg<span class="op">.</span>P<span class="op">(</span><span class="st">&quot;//&quot;</span><span class="op">)</span></span>
+<span id="cb174-7"><a href="#cb174-7" aria-hidden="true" tabindex="-1"></a> <span class="kw">local</span> <span class="kw">function</span> between<span class="op">(</span>p<span class="op">,</span> starter<span class="op">,</span> ender<span class="op">)</span></span>
+<span id="cb174-8"><a href="#cb174-8" aria-hidden="true" tabindex="-1"></a> ender <span class="op">=</span> lpeg<span class="op">.</span>B<span class="op">(</span>nonspacechar<span class="op">)</span> <span class="op">*</span> ender</span>
+<span id="cb174-9"><a href="#cb174-9" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> <span class="op">(</span>starter <span class="op">*</span> <span class="op">#</span>nonspacechar</span>
+<span id="cb174-10"><a href="#cb174-10" aria-hidden="true" tabindex="-1"></a> <span class="op">*</span> lpeg<span class="op">.</span>Ct<span class="op">(</span>p <span class="op">*</span> <span class="op">(</span>p <span class="op">-</span> ender<span class="op">)^</span><span class="dv">0</span><span class="op">)</span> <span class="op">*</span> ender<span class="op">)</span></span>
+<span id="cb174-11"><a href="#cb174-11" aria-hidden="true" tabindex="-1"></a> <span class="kw">end</span></span>
+<span id="cb174-12"><a href="#cb174-12" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb174-13"><a href="#cb174-13" aria-hidden="true" tabindex="-1"></a> <span class="kw">local</span> read_strike_through <span class="op">=</span> between<span class="op">(</span></span>
+<span id="cb174-14"><a href="#cb174-14" aria-hidden="true" tabindex="-1"></a> lpeg<span class="op">.</span>V<span class="op">(</span><span class="st">&quot;Inline&quot;</span><span class="op">),</span> doubleslashes<span class="op">,</span> doubleslashes</span>
+<span id="cb174-15"><a href="#cb174-15" aria-hidden="true" tabindex="-1"></a> <span class="op">)</span> <span class="op">/</span> <span class="kw">function</span><span class="op">(</span>s<span class="op">)</span> <span class="cf">return</span> <span class="op">{</span><span class="st">&quot;</span><span class="sc">\\</span><span class="st">st{&quot;</span><span class="op">,</span> s<span class="op">,</span> <span class="st">&quot;}&quot;</span><span class="op">}</span> <span class="kw">end</span></span>
+<span id="cb174-16"><a href="#cb174-16" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb174-17"><a href="#cb174-17" aria-hidden="true" tabindex="-1"></a> reader<span class="op">.</span>insert_pattern<span class="op">(</span><span class="st">&quot;Inline after Emph&quot;</span><span class="op">,</span> read_strike_through<span class="op">,</span></span>
+<span id="cb174-18"><a href="#cb174-18" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;StrikeThrough&quot;</span><span class="op">)</span></span>
+<span id="cb174-19"><a href="#cb174-19" aria-hidden="true" tabindex="-1"></a> reader<span class="op">.</span>add_special_character<span class="op">(</span><span class="st">&quot;/&quot;</span><span class="op">)</span></span>
+<span id="cb174-20"><a href="#cb174-20" aria-hidden="true" tabindex="-1"></a> <span class="kw">end</span></span>
+<span id="cb174-21"><a href="#cb174-21" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span>
+<span id="cb174-22"><a href="#cb174-22" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb174-23"><a href="#cb174-23" aria-hidden="true" tabindex="-1"></a><span class="cf">return</span> strike_through</span></code></pre></div>
<p>Using a text editor, create also a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb170"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb170-1"><a href="#cb170-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb170-2"><a href="#cb170-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">soul</span>}</span>
-<span id="cb170-3"><a href="#cb170-3" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[extension = strike-through.lua,</span>
-<span id="cb170-4"><a href="#cb170-4" aria-hidden="true" tabindex="-1"></a> debugExtensions]{<span class="ex">markdown</span>}</span>
-<span id="cb170-5"><a href="#cb170-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb170-6"><a href="#cb170-6" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb170-7"><a href="#cb170-7" aria-hidden="true" tabindex="-1"></a>This is //a lunar roving vehicle// strike-through text.</span>
-<span id="cb170-8"><a href="#cb170-8" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb170-9"><a href="#cb170-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<div class="sourceCode" id="cb175"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb175-1"><a href="#cb175-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb175-2"><a href="#cb175-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">soul</span>}</span>
+<span id="cb175-3"><a href="#cb175-3" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[extension = strike-through.lua,</span>
+<span id="cb175-4"><a href="#cb175-4" aria-hidden="true" tabindex="-1"></a> debugExtensions]{<span class="ex">markdown</span>}</span>
+<span id="cb175-5"><a href="#cb175-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb175-6"><a href="#cb175-6" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb175-7"><a href="#cb175-7" aria-hidden="true" tabindex="-1"></a>This is //a lunar roving vehicle// strike-through text.</span>
+<span id="cb175-8"><a href="#cb175-8" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb175-9"><a href="#cb175-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb171"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb171-1"><a href="#cb171-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb176"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb176-1"><a href="#cb176-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -2598,44 +2723,44 @@ contain the following text:</p>
<p>Furthermore, a JSON document named
<code>document.debug-extensions.json</code> should also be produced and
contain the following text:</p>
-<div class="sourceCode" id="cb172"><pre
-class="sourceCode json"><code class="sourceCode json"><span id="cb172-1"><a href="#cb172-1" aria-hidden="true" tabindex="-1"></a><span class="fu">{</span></span>
-<span id="cb172-2"><a href="#cb172-2" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;Block&quot;</span><span class="fu">:</span> <span class="ot">[</span></span>
-<span id="cb172-3"><a href="#cb172-3" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;Blockquote&quot;</span><span class="ot">,</span></span>
-<span id="cb172-4"><a href="#cb172-4" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;Verbatim&quot;</span><span class="ot">,</span></span>
-<span id="cb172-5"><a href="#cb172-5" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;ThematicBreak&quot;</span><span class="ot">,</span></span>
-<span id="cb172-6"><a href="#cb172-6" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;BulletList&quot;</span><span class="ot">,</span></span>
-<span id="cb172-7"><a href="#cb172-7" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;OrderedList&quot;</span><span class="ot">,</span></span>
-<span id="cb172-8"><a href="#cb172-8" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;Heading&quot;</span><span class="ot">,</span></span>
-<span id="cb172-9"><a href="#cb172-9" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;DisplayHtml&quot;</span><span class="ot">,</span></span>
-<span id="cb172-10"><a href="#cb172-10" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;Paragraph&quot;</span><span class="ot">,</span></span>
-<span id="cb172-11"><a href="#cb172-11" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;Plain&quot;</span></span>
-<span id="cb172-12"><a href="#cb172-12" aria-hidden="true" tabindex="-1"></a> <span class="ot">]</span><span class="fu">,</span></span>
-<span id="cb172-13"><a href="#cb172-13" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;Inline&quot;</span><span class="fu">:</span> <span class="ot">[</span></span>
-<span id="cb172-14"><a href="#cb172-14" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;Str&quot;</span><span class="ot">,</span></span>
-<span id="cb172-15"><a href="#cb172-15" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;Space&quot;</span><span class="ot">,</span></span>
-<span id="cb172-16"><a href="#cb172-16" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;Endline&quot;</span><span class="ot">,</span></span>
-<span id="cb172-17"><a href="#cb172-17" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;UlOrStarLine&quot;</span><span class="ot">,</span></span>
-<span id="cb172-18"><a href="#cb172-18" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;Strong&quot;</span><span class="ot">,</span></span>
-<span id="cb172-19"><a href="#cb172-19" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;Emph&quot;</span><span class="ot">,</span></span>
-<span id="cb172-20"><a href="#cb172-20" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;StrikeThrough (user-defined </span><span class="ch">\&quot;</span><span class="st">./strike-through.lua</span><span class="ch">\&quot;</span><span class="st"> syntax extension)&quot;</span><span class="ot">,</span></span>
-<span id="cb172-21"><a href="#cb172-21" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;Link&quot;</span><span class="ot">,</span></span>
-<span id="cb172-22"><a href="#cb172-22" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;Image&quot;</span><span class="ot">,</span></span>
-<span id="cb172-23"><a href="#cb172-23" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;Code&quot;</span><span class="ot">,</span></span>
-<span id="cb172-24"><a href="#cb172-24" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;AutoLinkUrl&quot;</span><span class="ot">,</span></span>
-<span id="cb172-25"><a href="#cb172-25" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;AutoLinkEmail&quot;</span><span class="ot">,</span></span>
-<span id="cb172-26"><a href="#cb172-26" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;AutoLinkRelativeReference&quot;</span><span class="ot">,</span></span>
-<span id="cb172-27"><a href="#cb172-27" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;InlineHtml&quot;</span><span class="ot">,</span></span>
-<span id="cb172-28"><a href="#cb172-28" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;HtmlEntity&quot;</span><span class="ot">,</span></span>
-<span id="cb172-29"><a href="#cb172-29" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;EscapedChar&quot;</span><span class="ot">,</span></span>
-<span id="cb172-30"><a href="#cb172-30" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;Smart&quot;</span><span class="ot">,</span></span>
-<span id="cb172-31"><a href="#cb172-31" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;Symbol&quot;</span></span>
-<span id="cb172-32"><a href="#cb172-32" aria-hidden="true" tabindex="-1"></a> <span class="ot">]</span></span>
-<span id="cb172-33"><a href="#cb172-33" aria-hidden="true" tabindex="-1"></a><span class="fu">}</span></span></code></pre></div>
+<div class="sourceCode" id="cb177"><pre
+class="sourceCode json"><code class="sourceCode json"><span id="cb177-1"><a href="#cb177-1" aria-hidden="true" tabindex="-1"></a><span class="fu">{</span></span>
+<span id="cb177-2"><a href="#cb177-2" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;Block&quot;</span><span class="fu">:</span> <span class="ot">[</span></span>
+<span id="cb177-3"><a href="#cb177-3" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;Blockquote&quot;</span><span class="ot">,</span></span>
+<span id="cb177-4"><a href="#cb177-4" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;Verbatim&quot;</span><span class="ot">,</span></span>
+<span id="cb177-5"><a href="#cb177-5" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;ThematicBreak&quot;</span><span class="ot">,</span></span>
+<span id="cb177-6"><a href="#cb177-6" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;BulletList&quot;</span><span class="ot">,</span></span>
+<span id="cb177-7"><a href="#cb177-7" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;OrderedList&quot;</span><span class="ot">,</span></span>
+<span id="cb177-8"><a href="#cb177-8" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;Heading&quot;</span><span class="ot">,</span></span>
+<span id="cb177-9"><a href="#cb177-9" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;DisplayHtml&quot;</span><span class="ot">,</span></span>
+<span id="cb177-10"><a href="#cb177-10" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;Paragraph&quot;</span><span class="ot">,</span></span>
+<span id="cb177-11"><a href="#cb177-11" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;Plain&quot;</span></span>
+<span id="cb177-12"><a href="#cb177-12" aria-hidden="true" tabindex="-1"></a> <span class="ot">]</span><span class="fu">,</span></span>
+<span id="cb177-13"><a href="#cb177-13" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;Inline&quot;</span><span class="fu">:</span> <span class="ot">[</span></span>
+<span id="cb177-14"><a href="#cb177-14" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;Str&quot;</span><span class="ot">,</span></span>
+<span id="cb177-15"><a href="#cb177-15" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;Space&quot;</span><span class="ot">,</span></span>
+<span id="cb177-16"><a href="#cb177-16" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;Endline&quot;</span><span class="ot">,</span></span>
+<span id="cb177-17"><a href="#cb177-17" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;UlOrStarLine&quot;</span><span class="ot">,</span></span>
+<span id="cb177-18"><a href="#cb177-18" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;Strong&quot;</span><span class="ot">,</span></span>
+<span id="cb177-19"><a href="#cb177-19" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;Emph&quot;</span><span class="ot">,</span></span>
+<span id="cb177-20"><a href="#cb177-20" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;StrikeThrough (user-defined </span><span class="ch">\&quot;</span><span class="st">./strike-through.lua</span><span class="ch">\&quot;</span><span class="st"> syntax extension)&quot;</span><span class="ot">,</span></span>
+<span id="cb177-21"><a href="#cb177-21" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;Link&quot;</span><span class="ot">,</span></span>
+<span id="cb177-22"><a href="#cb177-22" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;Image&quot;</span><span class="ot">,</span></span>
+<span id="cb177-23"><a href="#cb177-23" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;Code&quot;</span><span class="ot">,</span></span>
+<span id="cb177-24"><a href="#cb177-24" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;AutoLinkUrl&quot;</span><span class="ot">,</span></span>
+<span id="cb177-25"><a href="#cb177-25" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;AutoLinkEmail&quot;</span><span class="ot">,</span></span>
+<span id="cb177-26"><a href="#cb177-26" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;AutoLinkRelativeReference&quot;</span><span class="ot">,</span></span>
+<span id="cb177-27"><a href="#cb177-27" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;InlineHtml&quot;</span><span class="ot">,</span></span>
+<span id="cb177-28"><a href="#cb177-28" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;HtmlEntity&quot;</span><span class="ot">,</span></span>
+<span id="cb177-29"><a href="#cb177-29" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;EscapedChar&quot;</span><span class="ot">,</span></span>
+<span id="cb177-30"><a href="#cb177-30" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;Smart&quot;</span><span class="ot">,</span></span>
+<span id="cb177-31"><a href="#cb177-31" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;Symbol&quot;</span></span>
+<span id="cb177-32"><a href="#cb177-32" aria-hidden="true" tabindex="-1"></a> <span class="ot">]</span></span>
+<span id="cb177-33"><a href="#cb177-33" aria-hidden="true" tabindex="-1"></a><span class="fu">}</span></span></code></pre></div>
<p>This output shows us that our user-defined syntax extension has been
correctly inserted to the grammar of markdown.</p>
-<h4 data-number="2.2.1.14" id="option-definitionlists"><span
-class="header-section-number">2.2.1.14</span> Option
+<h4 data-number="2.2.1.16" id="option-definitionlists"><span
+class="header-section-number">2.2.1.16</span> Option
<code>definitionLists</code></h4>
<dl>
<dt><code>definitionLists</code> (default value:
@@ -2645,18 +2770,18 @@ class="header-section-number">2.2.1.14</span> Option
<dt>true</dt>
<dd>
<p>Enable the pandoc definition list syntax extension:</p>
-<div class="sourceCode" id="cb173"><pre
-class="sourceCode md"><code class="sourceCode markdown"><span id="cb173-1"><a href="#cb173-1" aria-hidden="true" tabindex="-1"></a>Term 1</span>
-<span id="cb173-2"><a href="#cb173-2" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb173-3"><a href="#cb173-3" aria-hidden="true" tabindex="-1"></a>: Definition 1</span>
-<span id="cb173-4"><a href="#cb173-4" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb173-5"><a href="#cb173-5" aria-hidden="true" tabindex="-1"></a>Term 2 with *inline markup*</span>
-<span id="cb173-6"><a href="#cb173-6" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb173-7"><a href="#cb173-7" aria-hidden="true" tabindex="-1"></a>: Definition 2</span>
-<span id="cb173-8"><a href="#cb173-8" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb173-9"><a href="#cb173-9" aria-hidden="true" tabindex="-1"></a><span class="in"> { some code, part of Definition 2 }</span></span>
-<span id="cb173-10"><a href="#cb173-10" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb173-11"><a href="#cb173-11" aria-hidden="true" tabindex="-1"></a><span class="in"> Third paragraph of definition 2.</span></span></code></pre></div>
+<div class="sourceCode" id="cb178"><pre
+class="sourceCode md"><code class="sourceCode markdown"><span id="cb178-1"><a href="#cb178-1" aria-hidden="true" tabindex="-1"></a>Term 1</span>
+<span id="cb178-2"><a href="#cb178-2" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb178-3"><a href="#cb178-3" aria-hidden="true" tabindex="-1"></a>: Definition 1</span>
+<span id="cb178-4"><a href="#cb178-4" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb178-5"><a href="#cb178-5" aria-hidden="true" tabindex="-1"></a>Term 2 with *inline markup*</span>
+<span id="cb178-6"><a href="#cb178-6" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb178-7"><a href="#cb178-7" aria-hidden="true" tabindex="-1"></a>: Definition 2</span>
+<span id="cb178-8"><a href="#cb178-8" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb178-9"><a href="#cb178-9" aria-hidden="true" tabindex="-1"></a><span class="in"> { some code, part of Definition 2 }</span></span>
+<span id="cb178-10"><a href="#cb178-10" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb178-11"><a href="#cb178-11" aria-hidden="true" tabindex="-1"></a><span class="in"> Third paragraph of definition 2.</span></span></code></pre></div>
</dd>
</dl>
</dd>
@@ -2669,31 +2794,31 @@ class="sourceCode md"><code class="sourceCode markdown"><span id="cb173-1"><a hr
</dl>
</dd>
</dl>
-<h5 class="unnumbered" id="latex-example-12"><span
+<h5 class="unnumbered" id="latex-example-14"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb174"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb174-1"><a href="#cb174-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb174-2"><a href="#cb174-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[definitionLists]{<span class="ex">markdown</span>}</span>
-<span id="cb174-3"><a href="#cb174-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb174-4"><a href="#cb174-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb174-5"><a href="#cb174-5" aria-hidden="true" tabindex="-1"></a>Term 1</span>
-<span id="cb174-6"><a href="#cb174-6" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb174-7"><a href="#cb174-7" aria-hidden="true" tabindex="-1"></a>: Definition 1</span>
-<span id="cb174-8"><a href="#cb174-8" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb174-9"><a href="#cb174-9" aria-hidden="true" tabindex="-1"></a>Term 2 with *inline markup*</span>
-<span id="cb174-10"><a href="#cb174-10" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb174-11"><a href="#cb174-11" aria-hidden="true" tabindex="-1"></a>: Definition 2</span>
-<span id="cb174-12"><a href="#cb174-12" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb174-13"><a href="#cb174-13" aria-hidden="true" tabindex="-1"></a> { some code, part of Definition 2 }</span>
-<span id="cb174-14"><a href="#cb174-14" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb174-15"><a href="#cb174-15" aria-hidden="true" tabindex="-1"></a> Third paragraph of definition 2.</span>
-<span id="cb174-16"><a href="#cb174-16" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb174-17"><a href="#cb174-17" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<div class="sourceCode" id="cb179"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb179-1"><a href="#cb179-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb179-2"><a href="#cb179-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[definitionLists]{<span class="ex">markdown</span>}</span>
+<span id="cb179-3"><a href="#cb179-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb179-4"><a href="#cb179-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb179-5"><a href="#cb179-5" aria-hidden="true" tabindex="-1"></a>Term 1</span>
+<span id="cb179-6"><a href="#cb179-6" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb179-7"><a href="#cb179-7" aria-hidden="true" tabindex="-1"></a>: Definition 1</span>
+<span id="cb179-8"><a href="#cb179-8" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb179-9"><a href="#cb179-9" aria-hidden="true" tabindex="-1"></a>Term 2 with *inline markup*</span>
+<span id="cb179-10"><a href="#cb179-10" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb179-11"><a href="#cb179-11" aria-hidden="true" tabindex="-1"></a>: Definition 2</span>
+<span id="cb179-12"><a href="#cb179-12" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb179-13"><a href="#cb179-13" aria-hidden="true" tabindex="-1"></a> { some code, part of Definition 2 }</span>
+<span id="cb179-14"><a href="#cb179-14" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb179-15"><a href="#cb179-15" aria-hidden="true" tabindex="-1"></a> Third paragraph of definition 2.</span>
+<span id="cb179-16"><a href="#cb179-16" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb179-17"><a href="#cb179-17" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb175"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb175-1"><a href="#cb175-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb180"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb180-1"><a href="#cb180-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -2714,27 +2839,27 @@ contain the following text:</p>
class="tex">T<sub>e</sub>X</span>t Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb177"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb177-1"><a href="#cb177-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
-<span id="cb177-2"><a href="#cb177-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[definitionLists = yes]</span>
-<span id="cb177-3"><a href="#cb177-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
-<span id="cb177-4"><a href="#cb177-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb177-5"><a href="#cb177-5" aria-hidden="true" tabindex="-1"></a>Term 1</span>
-<span id="cb177-6"><a href="#cb177-6" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb177-7"><a href="#cb177-7" aria-hidden="true" tabindex="-1"></a>: Definition 1</span>
-<span id="cb177-8"><a href="#cb177-8" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb177-9"><a href="#cb177-9" aria-hidden="true" tabindex="-1"></a>Term 2 with *inline markup*</span>
-<span id="cb177-10"><a href="#cb177-10" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb177-11"><a href="#cb177-11" aria-hidden="true" tabindex="-1"></a>: Definition 2</span>
-<span id="cb177-12"><a href="#cb177-12" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb177-13"><a href="#cb177-13" aria-hidden="true" tabindex="-1"></a> { some code, part of Definition 2 }</span>
-<span id="cb177-14"><a href="#cb177-14" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb177-15"><a href="#cb177-15" aria-hidden="true" tabindex="-1"></a> Third paragraph of definition 2.</span>
-<span id="cb177-16"><a href="#cb177-16" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb177-17"><a href="#cb177-17" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
+<div class="sourceCode" id="cb182"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb182-1"><a href="#cb182-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
+<span id="cb182-2"><a href="#cb182-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[definitionLists = yes]</span>
+<span id="cb182-3"><a href="#cb182-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
+<span id="cb182-4"><a href="#cb182-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb182-5"><a href="#cb182-5" aria-hidden="true" tabindex="-1"></a>Term 1</span>
+<span id="cb182-6"><a href="#cb182-6" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb182-7"><a href="#cb182-7" aria-hidden="true" tabindex="-1"></a>: Definition 1</span>
+<span id="cb182-8"><a href="#cb182-8" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb182-9"><a href="#cb182-9" aria-hidden="true" tabindex="-1"></a>Term 2 with *inline markup*</span>
+<span id="cb182-10"><a href="#cb182-10" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb182-11"><a href="#cb182-11" aria-hidden="true" tabindex="-1"></a>: Definition 2</span>
+<span id="cb182-12"><a href="#cb182-12" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb182-13"><a href="#cb182-13" aria-hidden="true" tabindex="-1"></a> { some code, part of Definition 2 }</span>
+<span id="cb182-14"><a href="#cb182-14" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb182-15"><a href="#cb182-15" aria-hidden="true" tabindex="-1"></a> Third paragraph of definition 2.</span>
+<span id="cb182-16"><a href="#cb182-16" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb182-17"><a href="#cb182-17" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb178"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb178-1"><a href="#cb178-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb183"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb183-1"><a href="#cb183-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -2751,8 +2876,8 @@ contain the following text:</p>
</dd>
</dl>
</blockquote>
-<h4 data-number="2.2.1.15" id="option-eagercache"><span
-class="header-section-number">2.2.1.15</span> Option
+<h4 data-number="2.2.1.17" id="option-eagercache"><span
+class="header-section-number">2.2.1.17</span> Option
<code>eagerCache</code></h4>
<dl>
<dt><code>eagerCache</code> (default value: <code>true</code>)</dt>
@@ -2789,12 +2914,12 @@ when <strong><code>eagerCache</code></strong> is disabled.</p>
<h5 class="unnumbered" id="lua-module-example-7">Lua Module Example</h5>
<p>Using a text editor, create a text document named
<code>hello.md</code> with the following content:</p>
-<div class="sourceCode" id="cb180"><pre
-class="sourceCode md"><code class="sourceCode markdown"><span id="cb180-1"><a href="#cb180-1" aria-hidden="true" tabindex="-1"></a>Hello *world*!</span></code></pre></div>
+<div class="sourceCode" id="cb185"><pre
+class="sourceCode md"><code class="sourceCode markdown"><span id="cb185-1"><a href="#cb185-1" aria-hidden="true" tabindex="-1"></a>Hello *world*!</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal with the
<strong><code>eagerCache</code></strong> option disabled:</p>
-<div class="sourceCode" id="cb181"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb181-1"><a href="#cb181-1" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ eagerCache=false <span class="at">--</span> hello.md hello.tex</span></code></pre></div>
+<div class="sourceCode" id="cb186"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb186-1"><a href="#cb186-1" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ eagerCache=false <span class="at">--</span> hello.md hello.tex</span></code></pre></div>
<p>where ⟨<em>CLI pathname</em>⟩ corresponds to the location of the Lua
CLI script file, such as
<code>~/texmf/scripts/markdown/markdown-cli.lua</code> on UN*X systems
@@ -2807,85 +2932,25 @@ title="Kpathsea - TeX Users Group">Kpathsea</a>.</p>
<p>A <span class="tex">T<sub>e</sub>X</span> document named
<code>hello.tex</code> should be produced and contain the following
code:</p>
-<div class="sourceCode" id="cb182"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb182-1"><a href="#cb182-1" aria-hidden="true" tabindex="-1"></a>Hello <span class="fu">\markdownRendererEmphasis</span>{world}!<span class="fu">\relax</span></span></code></pre></div>
+<div class="sourceCode" id="cb187"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb187-1"><a href="#cb187-1" aria-hidden="true" tabindex="-1"></a>Hello <span class="fu">\markdownRendererEmphasis</span>{world}!<span class="fu">\relax</span></span></code></pre></div>
<hr />
<p>Invoke LuaTeX from the terminal again, this time with the
<strong><code>eagerCache</code></strong> option enabled:</p>
-<div class="sourceCode" id="cb183"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb183-1"><a href="#cb183-1" aria-hidden="true" tabindex="-1"></a>texlua ⟨CLI pathname⟩ eagerCache=true -- hello.md hello.tex</span></code></pre></div>
+<div class="sourceCode" id="cb188"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb188-1"><a href="#cb188-1" aria-hidden="true" tabindex="-1"></a>texlua ⟨CLI pathname⟩ eagerCache=true -- hello.md hello.tex</span></code></pre></div>
<p>A <span class="tex">T<sub>e</sub>X</span> document named
<code>hello.tex</code> should be produced and contain the following
code:</p>
-<div class="sourceCode" id="cb184"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb184-1"><a href="#cb184-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> ./⟨hash⟩.md.tex<span class="fu">\relax</span></span></code></pre></div>
+<div class="sourceCode" id="cb189"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb189-1"><a href="#cb189-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> ./⟨hash⟩.md.tex<span class="fu">\relax</span></span></code></pre></div>
<p>Additionally, a <span class="tex">T<sub>e</sub>X</span> document
named <code>⟨hash⟩.md.tex</code> should be produced and contain the
following code:</p>
-<div class="sourceCode" id="cb185"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb185-1"><a href="#cb185-1" aria-hidden="true" tabindex="-1"></a>Hello <span class="fu">\markdownRendererEmphasis</span>{world}!<span class="fu">\relax</span></span></code></pre></div>
-<h4 data-number="2.2.1.16" id="option-extensions"><span
-class="header-section-number">2.2.1.16</span> Option
-<code>extensions</code></h4>
-<dl>
-<dt><code>extensions</code> (default value: <code>{}</code>)</dt>
-<dd>
-<p>The filenames of user-defined syntax extensions that will be applied
-to the markdown reader. If the <strong><code>kpathsea</code></strong>
-library is available, files will be searched for not only in the current
-working directory but also in the <span
-class="tex">T<sub>e</sub>X</span> directory structure.</p>
-</dd>
-</dl>
-<h5 class="unnumbered" id="latex-example-13"><span
-class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
-<p>Using a text editor, create a text document named
-<code>strike-through.lua</code> with the following content:</p>
-<div class="sourceCode" id="cb186"><pre
-class="sourceCode lua"><code class="sourceCode lua"><span id="cb186-1"><a href="#cb186-1" aria-hidden="true" tabindex="-1"></a><span class="kw">local</span> strike_through <span class="op">=</span> <span class="op">{</span></span>
-<span id="cb186-2"><a href="#cb186-2" aria-hidden="true" tabindex="-1"></a> api_version <span class="op">=</span> <span class="dv">2</span><span class="op">,</span></span>
-<span id="cb186-3"><a href="#cb186-3" aria-hidden="true" tabindex="-1"></a> grammar_version <span class="op">=</span> <span class="dv">2</span><span class="op">,</span></span>
-<span id="cb186-4"><a href="#cb186-4" aria-hidden="true" tabindex="-1"></a> finalize_grammar <span class="op">=</span> <span class="kw">function</span><span class="op">(</span>reader<span class="op">)</span></span>
-<span id="cb186-5"><a href="#cb186-5" aria-hidden="true" tabindex="-1"></a> <span class="kw">local</span> nonspacechar <span class="op">=</span> lpeg<span class="op">.</span>P<span class="op">(</span><span class="dv">1</span><span class="op">)</span> <span class="op">-</span> lpeg<span class="op">.</span>S<span class="op">(</span><span class="st">&quot;</span><span class="sc">\t</span><span class="st"> &quot;</span><span class="op">)</span></span>
-<span id="cb186-6"><a href="#cb186-6" aria-hidden="true" tabindex="-1"></a> <span class="kw">local</span> doubleslashes <span class="op">=</span> lpeg<span class="op">.</span>P<span class="op">(</span><span class="st">&quot;//&quot;</span><span class="op">)</span></span>
-<span id="cb186-7"><a href="#cb186-7" aria-hidden="true" tabindex="-1"></a> <span class="kw">local</span> <span class="kw">function</span> between<span class="op">(</span>p<span class="op">,</span> starter<span class="op">,</span> ender<span class="op">)</span></span>
-<span id="cb186-8"><a href="#cb186-8" aria-hidden="true" tabindex="-1"></a> ender <span class="op">=</span> lpeg<span class="op">.</span>B<span class="op">(</span>nonspacechar<span class="op">)</span> <span class="op">*</span> ender</span>
-<span id="cb186-9"><a href="#cb186-9" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> <span class="op">(</span>starter <span class="op">*</span> <span class="op">#</span>nonspacechar</span>
-<span id="cb186-10"><a href="#cb186-10" aria-hidden="true" tabindex="-1"></a> <span class="op">*</span> lpeg<span class="op">.</span>Ct<span class="op">(</span>p <span class="op">*</span> <span class="op">(</span>p <span class="op">-</span> ender<span class="op">)^</span><span class="dv">0</span><span class="op">)</span> <span class="op">*</span> ender<span class="op">)</span></span>
-<span id="cb186-11"><a href="#cb186-11" aria-hidden="true" tabindex="-1"></a> <span class="kw">end</span></span>
-<span id="cb186-12"><a href="#cb186-12" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb186-13"><a href="#cb186-13" aria-hidden="true" tabindex="-1"></a> <span class="kw">local</span> read_strike_through <span class="op">=</span> between<span class="op">(</span></span>
-<span id="cb186-14"><a href="#cb186-14" aria-hidden="true" tabindex="-1"></a> lpeg<span class="op">.</span>V<span class="op">(</span><span class="st">&quot;Inline&quot;</span><span class="op">),</span> doubleslashes<span class="op">,</span> doubleslashes</span>
-<span id="cb186-15"><a href="#cb186-15" aria-hidden="true" tabindex="-1"></a> <span class="op">)</span> <span class="op">/</span> <span class="kw">function</span><span class="op">(</span>s<span class="op">)</span> <span class="cf">return</span> <span class="op">{</span><span class="st">&quot;</span><span class="sc">\\</span><span class="st">st{&quot;</span><span class="op">,</span> s<span class="op">,</span> <span class="st">&quot;}&quot;</span><span class="op">}</span> <span class="kw">end</span></span>
-<span id="cb186-16"><a href="#cb186-16" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb186-17"><a href="#cb186-17" aria-hidden="true" tabindex="-1"></a> reader<span class="op">.</span>insert_pattern<span class="op">(</span><span class="st">&quot;Inline after Emph&quot;</span><span class="op">,</span> read_strike_through<span class="op">,</span></span>
-<span id="cb186-18"><a href="#cb186-18" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;StrikeThrough&quot;</span><span class="op">)</span></span>
-<span id="cb186-19"><a href="#cb186-19" aria-hidden="true" tabindex="-1"></a> reader<span class="op">.</span>add_special_character<span class="op">(</span><span class="st">&quot;/&quot;</span><span class="op">)</span></span>
-<span id="cb186-20"><a href="#cb186-20" aria-hidden="true" tabindex="-1"></a> <span class="kw">end</span></span>
-<span id="cb186-21"><a href="#cb186-21" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span>
-<span id="cb186-22"><a href="#cb186-22" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb186-23"><a href="#cb186-23" aria-hidden="true" tabindex="-1"></a><span class="cf">return</span> strike_through</span></code></pre></div>
-<p>Using a text editor, create also a text document named
-<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb187"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb187-1"><a href="#cb187-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb187-2"><a href="#cb187-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">soul</span>}</span>
-<span id="cb187-3"><a href="#cb187-3" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[extension = strike-through.lua]{<span class="ex">markdown</span>}</span>
-<span id="cb187-4"><a href="#cb187-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb187-5"><a href="#cb187-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb187-6"><a href="#cb187-6" aria-hidden="true" tabindex="-1"></a>This is //a lunar roving vehicle// strike-through text.</span>
-<span id="cb187-7"><a href="#cb187-7" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb187-8"><a href="#cb187-8" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
-<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb188"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb188-1"><a href="#cb188-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
-<p>A PDF document named <code>document.pdf</code> should be produced and
-contain the following text:</p>
-<blockquote>
-<p>This is <del>a lunar roving vehicle</del> strike-through text.</p>
-</blockquote>
-<h4 data-number="2.2.1.17" id="option-expectjekylldata"><span
-class="header-section-number">2.2.1.17</span> Option
+<div class="sourceCode" id="cb190"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb190-1"><a href="#cb190-1" aria-hidden="true" tabindex="-1"></a>Hello <span class="fu">\markdownRendererEmphasis</span>{world}!<span class="fu">\relax</span></span></code></pre></div>
+<h4 data-number="2.2.1.18" id="option-expectjekylldata"><span
+class="header-section-number">2.2.1.18</span> Option
<code>expectJekyllData</code></h4>
<dl>
<dt><code>expectJekyllData</code> (default value:
@@ -2899,26 +2964,26 @@ then a markdown document may begin with <abbr>yaml</abbr> metadata if
and only if the metadata begin with the end-of-directives marker
(<code>---</code>) and they end with either the end-of-directives or the
end-of-document marker (<code>...</code>):</p>
-<div class="sourceCode" id="cb189"><pre
-class="sourceCode latex"><code class="sourceCode latex"><span id="cb189-1"><a href="#cb189-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb189-2"><a href="#cb189-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[jekyllData]{<span class="ex">markdown</span>}</span>
-<span id="cb189-3"><a href="#cb189-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb189-4"><a href="#cb189-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb189-5"><a href="#cb189-5" aria-hidden="true" tabindex="-1"></a>---</span>
-<span id="cb189-6"><a href="#cb189-6" aria-hidden="true" tabindex="-1"></a>- this</span>
-<span id="cb189-7"><a href="#cb189-7" aria-hidden="true" tabindex="-1"></a>- is</span>
-<span id="cb189-8"><a href="#cb189-8" aria-hidden="true" tabindex="-1"></a>- YAML</span>
-<span id="cb189-9"><a href="#cb189-9" aria-hidden="true" tabindex="-1"></a>...</span>
-<span id="cb189-10"><a href="#cb189-10" aria-hidden="true" tabindex="-1"></a>- followed</span>
-<span id="cb189-11"><a href="#cb189-11" aria-hidden="true" tabindex="-1"></a>- by</span>
-<span id="cb189-12"><a href="#cb189-12" aria-hidden="true" tabindex="-1"></a>- Markdown</span>
-<span id="cb189-13"><a href="#cb189-13" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb189-14"><a href="#cb189-14" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb189-15"><a href="#cb189-15" aria-hidden="true" tabindex="-1"></a>- this</span>
-<span id="cb189-16"><a href="#cb189-16" aria-hidden="true" tabindex="-1"></a>- is</span>
-<span id="cb189-17"><a href="#cb189-17" aria-hidden="true" tabindex="-1"></a>- Markdown</span>
-<span id="cb189-18"><a href="#cb189-18" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb189-19"><a href="#cb189-19" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<div class="sourceCode" id="cb191"><pre
+class="sourceCode latex"><code class="sourceCode latex"><span id="cb191-1"><a href="#cb191-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb191-2"><a href="#cb191-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[jekyllData]{<span class="ex">markdown</span>}</span>
+<span id="cb191-3"><a href="#cb191-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb191-4"><a href="#cb191-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb191-5"><a href="#cb191-5" aria-hidden="true" tabindex="-1"></a>---</span>
+<span id="cb191-6"><a href="#cb191-6" aria-hidden="true" tabindex="-1"></a>- this</span>
+<span id="cb191-7"><a href="#cb191-7" aria-hidden="true" tabindex="-1"></a>- is</span>
+<span id="cb191-8"><a href="#cb191-8" aria-hidden="true" tabindex="-1"></a>- YAML</span>
+<span id="cb191-9"><a href="#cb191-9" aria-hidden="true" tabindex="-1"></a>...</span>
+<span id="cb191-10"><a href="#cb191-10" aria-hidden="true" tabindex="-1"></a>- followed</span>
+<span id="cb191-11"><a href="#cb191-11" aria-hidden="true" tabindex="-1"></a>- by</span>
+<span id="cb191-12"><a href="#cb191-12" aria-hidden="true" tabindex="-1"></a>- Markdown</span>
+<span id="cb191-13"><a href="#cb191-13" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb191-14"><a href="#cb191-14" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb191-15"><a href="#cb191-15" aria-hidden="true" tabindex="-1"></a>- this</span>
+<span id="cb191-16"><a href="#cb191-16" aria-hidden="true" tabindex="-1"></a>- is</span>
+<span id="cb191-17"><a href="#cb191-17" aria-hidden="true" tabindex="-1"></a>- Markdown</span>
+<span id="cb191-18"><a href="#cb191-18" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb191-19"><a href="#cb191-19" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
</dd>
</dl>
</dd>
@@ -2929,63 +2994,123 @@ class="sourceCode latex"><code class="sourceCode latex"><span id="cb189-1"><a hr
<p>When the <strong><code>jekyllData</code></strong> option is enabled,
then a markdown document may begin directly with <abbr>yaml</abbr>
metadata and may contain nothing but <abbr>yaml</abbr> metadata.</p>
-<div class="sourceCode" id="cb190"><pre
-class="sourceCode latex"><code class="sourceCode latex"><span id="cb190-1"><a href="#cb190-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb190-2"><a href="#cb190-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[jekyllData, expectJekyllData]{<span class="ex">markdown</span>}</span>
-<span id="cb190-3"><a href="#cb190-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb190-4"><a href="#cb190-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb190-5"><a href="#cb190-5" aria-hidden="true" tabindex="-1"></a>- this</span>
-<span id="cb190-6"><a href="#cb190-6" aria-hidden="true" tabindex="-1"></a>- is</span>
-<span id="cb190-7"><a href="#cb190-7" aria-hidden="true" tabindex="-1"></a>- YAML</span>
-<span id="cb190-8"><a href="#cb190-8" aria-hidden="true" tabindex="-1"></a>...</span>
-<span id="cb190-9"><a href="#cb190-9" aria-hidden="true" tabindex="-1"></a>- followed</span>
-<span id="cb190-10"><a href="#cb190-10" aria-hidden="true" tabindex="-1"></a>- by</span>
-<span id="cb190-11"><a href="#cb190-11" aria-hidden="true" tabindex="-1"></a>- Markdown</span>
-<span id="cb190-12"><a href="#cb190-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb190-13"><a href="#cb190-13" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb190-14"><a href="#cb190-14" aria-hidden="true" tabindex="-1"></a>- this</span>
-<span id="cb190-15"><a href="#cb190-15" aria-hidden="true" tabindex="-1"></a>- is</span>
-<span id="cb190-16"><a href="#cb190-16" aria-hidden="true" tabindex="-1"></a>- YAML</span>
-<span id="cb190-17"><a href="#cb190-17" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb190-18"><a href="#cb190-18" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<div class="sourceCode" id="cb192"><pre
+class="sourceCode latex"><code class="sourceCode latex"><span id="cb192-1"><a href="#cb192-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb192-2"><a href="#cb192-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[jekyllData, expectJekyllData]{<span class="ex">markdown</span>}</span>
+<span id="cb192-3"><a href="#cb192-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb192-4"><a href="#cb192-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb192-5"><a href="#cb192-5" aria-hidden="true" tabindex="-1"></a>- this</span>
+<span id="cb192-6"><a href="#cb192-6" aria-hidden="true" tabindex="-1"></a>- is</span>
+<span id="cb192-7"><a href="#cb192-7" aria-hidden="true" tabindex="-1"></a>- YAML</span>
+<span id="cb192-8"><a href="#cb192-8" aria-hidden="true" tabindex="-1"></a>...</span>
+<span id="cb192-9"><a href="#cb192-9" aria-hidden="true" tabindex="-1"></a>- followed</span>
+<span id="cb192-10"><a href="#cb192-10" aria-hidden="true" tabindex="-1"></a>- by</span>
+<span id="cb192-11"><a href="#cb192-11" aria-hidden="true" tabindex="-1"></a>- Markdown</span>
+<span id="cb192-12"><a href="#cb192-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb192-13"><a href="#cb192-13" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb192-14"><a href="#cb192-14" aria-hidden="true" tabindex="-1"></a>- this</span>
+<span id="cb192-15"><a href="#cb192-15" aria-hidden="true" tabindex="-1"></a>- is</span>
+<span id="cb192-16"><a href="#cb192-16" aria-hidden="true" tabindex="-1"></a>- YAML</span>
+<span id="cb192-17"><a href="#cb192-17" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb192-18"><a href="#cb192-18" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
</dd>
</dl>
</dd>
</dl>
-<h5 class="unnumbered" id="latex-example-14"><span
+<h5 class="unnumbered" id="latex-example-15"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>jane-doe.yml</code> with the following content:</p>
-<div class="sourceCode" id="cb191"><pre
-class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb191-1"><a href="#cb191-1" aria-hidden="true" tabindex="-1"></a><span class="fu">name</span><span class="kw">:</span><span class="at"> Jane Doe</span></span>
-<span id="cb191-2"><a href="#cb191-2" aria-hidden="true" tabindex="-1"></a><span class="fu">age</span><span class="kw">:</span><span class="at"> </span><span class="dv">99</span></span></code></pre></div>
+<div class="sourceCode" id="cb193"><pre
+class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb193-1"><a href="#cb193-1" aria-hidden="true" tabindex="-1"></a><span class="fu">name</span><span class="kw">:</span><span class="at"> Jane Doe</span></span>
+<span id="cb193-2"><a href="#cb193-2" aria-hidden="true" tabindex="-1"></a><span class="fu">age</span><span class="kw">:</span><span class="at"> </span><span class="dv">99</span></span></code></pre></div>
<p>Using a text editor, create also a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb192"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb192-1"><a href="#cb192-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb192-2"><a href="#cb192-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[jekyllData]{<span class="ex">markdown</span>}</span>
-<span id="cb192-3"><a href="#cb192-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
-<span id="cb192-4"><a href="#cb192-4" aria-hidden="true" tabindex="-1"></a> jekyllDataRenderers = {</span>
-<span id="cb192-5"><a href="#cb192-5" aria-hidden="true" tabindex="-1"></a> name = {<span class="fu">\gdef\name</span>{#1}},</span>
-<span id="cb192-6"><a href="#cb192-6" aria-hidden="true" tabindex="-1"></a> code = {<span class="fu">\gdef\age</span>{#1}},</span>
-<span id="cb192-7"><a href="#cb192-7" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb192-8"><a href="#cb192-8" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
-<span id="cb192-9"><a href="#cb192-9" aria-hidden="true" tabindex="-1"></a> jekyllDataEnd = {<span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.},</span>
-<span id="cb192-10"><a href="#cb192-10" aria-hidden="true" tabindex="-1"></a> }</span>
-<span id="cb192-11"><a href="#cb192-11" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb192-12"><a href="#cb192-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb192-13"><a href="#cb192-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownInput</span>[expectJekyllData]{jane-doe.yml}</span>
-<span id="cb192-14"><a href="#cb192-14" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<div class="sourceCode" id="cb194"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb194-1"><a href="#cb194-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb194-2"><a href="#cb194-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[jekyllData]{<span class="ex">markdown</span>}</span>
+<span id="cb194-3"><a href="#cb194-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
+<span id="cb194-4"><a href="#cb194-4" aria-hidden="true" tabindex="-1"></a> jekyllDataRenderers = {</span>
+<span id="cb194-5"><a href="#cb194-5" aria-hidden="true" tabindex="-1"></a> name = {<span class="fu">\gdef\name</span>{#1}},</span>
+<span id="cb194-6"><a href="#cb194-6" aria-hidden="true" tabindex="-1"></a> code = {<span class="fu">\gdef\age</span>{#1}},</span>
+<span id="cb194-7"><a href="#cb194-7" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb194-8"><a href="#cb194-8" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
+<span id="cb194-9"><a href="#cb194-9" aria-hidden="true" tabindex="-1"></a> jekyllDataEnd = {<span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.},</span>
+<span id="cb194-10"><a href="#cb194-10" aria-hidden="true" tabindex="-1"></a> }</span>
+<span id="cb194-11"><a href="#cb194-11" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb194-12"><a href="#cb194-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb194-13"><a href="#cb194-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownInput</span>[expectJekyllData]{jane-doe.yml}</span>
+<span id="cb194-14"><a href="#cb194-14" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb193"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb193-1"><a href="#cb193-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb195"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb195-1"><a href="#cb195-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
<p>Jane Doe is 99 years old.</p>
</blockquote>
-<h4 data-number="2.2.1.18" id="option-fancylists"><span
-class="header-section-number">2.2.1.18</span> Option
+<h4 data-number="2.2.1.19" id="option-extensions"><span
+class="header-section-number">2.2.1.19</span> Option
+<code>extensions</code></h4>
+<dl>
+<dt><code>extensions</code> (default value: <code>{}</code>)</dt>
+<dd>
+<p>The filenames of user-defined syntax extensions that will be applied
+to the markdown reader. If the <strong><code>kpathsea</code></strong>
+library is available, files will be searched for not only in the current
+working directory but also in the <span
+class="tex">T<sub>e</sub>X</span> directory structure.</p>
+</dd>
+</dl>
+<h5 class="unnumbered" id="latex-example-16"><span
+class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
+<p>Using a text editor, create a text document named
+<code>strike-through.lua</code> with the following content:</p>
+<div class="sourceCode" id="cb196"><pre
+class="sourceCode lua"><code class="sourceCode lua"><span id="cb196-1"><a href="#cb196-1" aria-hidden="true" tabindex="-1"></a><span class="kw">local</span> strike_through <span class="op">=</span> <span class="op">{</span></span>
+<span id="cb196-2"><a href="#cb196-2" aria-hidden="true" tabindex="-1"></a> api_version <span class="op">=</span> <span class="dv">2</span><span class="op">,</span></span>
+<span id="cb196-3"><a href="#cb196-3" aria-hidden="true" tabindex="-1"></a> grammar_version <span class="op">=</span> <span class="dv">2</span><span class="op">,</span></span>
+<span id="cb196-4"><a href="#cb196-4" aria-hidden="true" tabindex="-1"></a> finalize_grammar <span class="op">=</span> <span class="kw">function</span><span class="op">(</span>reader<span class="op">)</span></span>
+<span id="cb196-5"><a href="#cb196-5" aria-hidden="true" tabindex="-1"></a> <span class="kw">local</span> nonspacechar <span class="op">=</span> lpeg<span class="op">.</span>P<span class="op">(</span><span class="dv">1</span><span class="op">)</span> <span class="op">-</span> lpeg<span class="op">.</span>S<span class="op">(</span><span class="st">&quot;</span><span class="sc">\t</span><span class="st"> &quot;</span><span class="op">)</span></span>
+<span id="cb196-6"><a href="#cb196-6" aria-hidden="true" tabindex="-1"></a> <span class="kw">local</span> doubleslashes <span class="op">=</span> lpeg<span class="op">.</span>P<span class="op">(</span><span class="st">&quot;//&quot;</span><span class="op">)</span></span>
+<span id="cb196-7"><a href="#cb196-7" aria-hidden="true" tabindex="-1"></a> <span class="kw">local</span> <span class="kw">function</span> between<span class="op">(</span>p<span class="op">,</span> starter<span class="op">,</span> ender<span class="op">)</span></span>
+<span id="cb196-8"><a href="#cb196-8" aria-hidden="true" tabindex="-1"></a> ender <span class="op">=</span> lpeg<span class="op">.</span>B<span class="op">(</span>nonspacechar<span class="op">)</span> <span class="op">*</span> ender</span>
+<span id="cb196-9"><a href="#cb196-9" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> <span class="op">(</span>starter <span class="op">*</span> <span class="op">#</span>nonspacechar</span>
+<span id="cb196-10"><a href="#cb196-10" aria-hidden="true" tabindex="-1"></a> <span class="op">*</span> lpeg<span class="op">.</span>Ct<span class="op">(</span>p <span class="op">*</span> <span class="op">(</span>p <span class="op">-</span> ender<span class="op">)^</span><span class="dv">0</span><span class="op">)</span> <span class="op">*</span> ender<span class="op">)</span></span>
+<span id="cb196-11"><a href="#cb196-11" aria-hidden="true" tabindex="-1"></a> <span class="kw">end</span></span>
+<span id="cb196-12"><a href="#cb196-12" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb196-13"><a href="#cb196-13" aria-hidden="true" tabindex="-1"></a> <span class="kw">local</span> read_strike_through <span class="op">=</span> between<span class="op">(</span></span>
+<span id="cb196-14"><a href="#cb196-14" aria-hidden="true" tabindex="-1"></a> lpeg<span class="op">.</span>V<span class="op">(</span><span class="st">&quot;Inline&quot;</span><span class="op">),</span> doubleslashes<span class="op">,</span> doubleslashes</span>
+<span id="cb196-15"><a href="#cb196-15" aria-hidden="true" tabindex="-1"></a> <span class="op">)</span> <span class="op">/</span> <span class="kw">function</span><span class="op">(</span>s<span class="op">)</span> <span class="cf">return</span> <span class="op">{</span><span class="st">&quot;</span><span class="sc">\\</span><span class="st">st{&quot;</span><span class="op">,</span> s<span class="op">,</span> <span class="st">&quot;}&quot;</span><span class="op">}</span> <span class="kw">end</span></span>
+<span id="cb196-16"><a href="#cb196-16" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb196-17"><a href="#cb196-17" aria-hidden="true" tabindex="-1"></a> reader<span class="op">.</span>insert_pattern<span class="op">(</span><span class="st">&quot;Inline after Emph&quot;</span><span class="op">,</span> read_strike_through<span class="op">,</span></span>
+<span id="cb196-18"><a href="#cb196-18" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;StrikeThrough&quot;</span><span class="op">)</span></span>
+<span id="cb196-19"><a href="#cb196-19" aria-hidden="true" tabindex="-1"></a> reader<span class="op">.</span>add_special_character<span class="op">(</span><span class="st">&quot;/&quot;</span><span class="op">)</span></span>
+<span id="cb196-20"><a href="#cb196-20" aria-hidden="true" tabindex="-1"></a> <span class="kw">end</span></span>
+<span id="cb196-21"><a href="#cb196-21" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span>
+<span id="cb196-22"><a href="#cb196-22" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb196-23"><a href="#cb196-23" aria-hidden="true" tabindex="-1"></a><span class="cf">return</span> strike_through</span></code></pre></div>
+<p>Using a text editor, create also a text document named
+<code>document.tex</code> with the following content:</p>
+<div class="sourceCode" id="cb197"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb197-1"><a href="#cb197-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb197-2"><a href="#cb197-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">soul</span>}</span>
+<span id="cb197-3"><a href="#cb197-3" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[extension = strike-through.lua]{<span class="ex">markdown</span>}</span>
+<span id="cb197-4"><a href="#cb197-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb197-5"><a href="#cb197-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb197-6"><a href="#cb197-6" aria-hidden="true" tabindex="-1"></a>This is //a lunar roving vehicle// strike-through text.</span>
+<span id="cb197-7"><a href="#cb197-7" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb197-8"><a href="#cb197-8" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<p>Next, invoke LuaTeX from the terminal:</p>
+<div class="sourceCode" id="cb198"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb198-1"><a href="#cb198-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+<p>A PDF document named <code>document.pdf</code> should be produced and
+contain the following text:</p>
+<blockquote>
+<p>This is <del>a lunar roving vehicle</del> strike-through text.</p>
+</blockquote>
+<h4 data-number="2.2.1.20" id="option-fancylists"><span
+class="header-section-number">2.2.1.20</span> Option
<code>fancyLists</code></h4>
<dl>
<dt><code>fancyLists</code> (default value: <code>false</code>)</dt>
@@ -2994,10 +3119,10 @@ class="header-section-number">2.2.1.18</span> Option
<dt>true</dt>
<dd>
<p>Enable the Pandoc fancy list extension:</p>
-<div class="sourceCode" id="cb194"><pre
-class="sourceCode md"><code class="sourceCode markdown"><span id="cb194-1"><a href="#cb194-1" aria-hidden="true" tabindex="-1"></a>a) first item</span>
-<span id="cb194-2"><a href="#cb194-2" aria-hidden="true" tabindex="-1"></a>b) second item</span>
-<span id="cb194-3"><a href="#cb194-3" aria-hidden="true" tabindex="-1"></a>c) third item</span></code></pre></div>
+<div class="sourceCode" id="cb199"><pre
+class="sourceCode md"><code class="sourceCode markdown"><span id="cb199-1"><a href="#cb199-1" aria-hidden="true" tabindex="-1"></a>a) first item</span>
+<span id="cb199-2"><a href="#cb199-2" aria-hidden="true" tabindex="-1"></a>b) second item</span>
+<span id="cb199-3"><a href="#cb199-3" aria-hidden="true" tabindex="-1"></a>c) third item</span></code></pre></div>
</dd>
</dl>
</dd>
@@ -3010,24 +3135,24 @@ class="sourceCode md"><code class="sourceCode markdown"><span id="cb194-1"><a hr
</dl>
</dd>
</dl>
-<h5 class="unnumbered" id="latex-example-15"><span
+<h5 class="unnumbered" id="latex-example-17"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb195"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb195-1"><a href="#cb195-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb195-2"><a href="#cb195-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">minted</span>}</span>
-<span id="cb195-3"><a href="#cb195-3" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[fancyLists]{<span class="ex">markdown</span>}</span>
-<span id="cb195-4"><a href="#cb195-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb195-5"><a href="#cb195-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb195-6"><a href="#cb195-6" aria-hidden="true" tabindex="-1"></a>a) first item</span>
-<span id="cb195-7"><a href="#cb195-7" aria-hidden="true" tabindex="-1"></a>b) second item</span>
-<span id="cb195-8"><a href="#cb195-8" aria-hidden="true" tabindex="-1"></a>c) third item</span>
-<span id="cb195-9"><a href="#cb195-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb195-10"><a href="#cb195-10" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<div class="sourceCode" id="cb200"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb200-1"><a href="#cb200-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb200-2"><a href="#cb200-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">minted</span>}</span>
+<span id="cb200-3"><a href="#cb200-3" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[fancyLists]{<span class="ex">markdown</span>}</span>
+<span id="cb200-4"><a href="#cb200-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb200-5"><a href="#cb200-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb200-6"><a href="#cb200-6" aria-hidden="true" tabindex="-1"></a>a) first item</span>
+<span id="cb200-7"><a href="#cb200-7" aria-hidden="true" tabindex="-1"></a>b) second item</span>
+<span id="cb200-8"><a href="#cb200-8" aria-hidden="true" tabindex="-1"></a>c) third item</span>
+<span id="cb200-9"><a href="#cb200-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb200-10"><a href="#cb200-10" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb196"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb196-1"><a href="#cb196-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> <span class="at">--shell-escape</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb201"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb201-1"><a href="#cb201-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> <span class="at">--shell-escape</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -3041,19 +3166,19 @@ contain the following text:</p>
class="tex">T<sub>e</sub>X</span>t Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb197"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb197-1"><a href="#cb197-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
-<span id="cb197-2"><a href="#cb197-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[fancyLists = yes]</span>
-<span id="cb197-3"><a href="#cb197-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
-<span id="cb197-4"><a href="#cb197-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb197-5"><a href="#cb197-5" aria-hidden="true" tabindex="-1"></a>a) first item</span>
-<span id="cb197-6"><a href="#cb197-6" aria-hidden="true" tabindex="-1"></a>b) second item</span>
-<span id="cb197-7"><a href="#cb197-7" aria-hidden="true" tabindex="-1"></a>c) third item</span>
-<span id="cb197-8"><a href="#cb197-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb197-9"><a href="#cb197-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
+<div class="sourceCode" id="cb202"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb202-1"><a href="#cb202-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
+<span id="cb202-2"><a href="#cb202-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[fancyLists = yes]</span>
+<span id="cb202-3"><a href="#cb202-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
+<span id="cb202-4"><a href="#cb202-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb202-5"><a href="#cb202-5" aria-hidden="true" tabindex="-1"></a>a) first item</span>
+<span id="cb202-6"><a href="#cb202-6" aria-hidden="true" tabindex="-1"></a>b) second item</span>
+<span id="cb202-7"><a href="#cb202-7" aria-hidden="true" tabindex="-1"></a>c) third item</span>
+<span id="cb202-8"><a href="#cb202-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb202-9"><a href="#cb202-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb198"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb198-1"><a href="#cb198-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb203"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb203-1"><a href="#cb203-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -3063,8 +3188,8 @@ contain the following text:</p>
<li>third item</li>
</ol>
</blockquote>
-<h4 data-number="2.2.1.19" id="option-fencedcode"><span
-class="header-section-number">2.2.1.19</span> Option
+<h4 data-number="2.2.1.21" id="option-fencedcode"><span
+class="header-section-number">2.2.1.21</span> Option
<code>fencedCode</code></h4>
<dl>
<dt><code>fencedCode</code> (default value: <code>false</code>)</dt>
@@ -3073,23 +3198,23 @@ class="header-section-number">2.2.1.19</span> Option
<dt>true</dt>
<dd>
<p>Enable the commonmark fenced code block extension:</p>
-<div class="sourceCode" id="cb199"><pre
-class="sourceCode md"><code class="sourceCode markdown"><span id="cb199-1"><a href="#cb199-1" aria-hidden="true" tabindex="-1"></a><span class="in">~~~ js</span></span>
-<span id="cb199-2"><a href="#cb199-2" aria-hidden="true" tabindex="-1"></a><span class="cf">if</span> (a <span class="op">&gt;</span> <span class="dv">3</span>) {</span>
-<span id="cb199-3"><a href="#cb199-3" aria-hidden="true" tabindex="-1"></a> <span class="fu">moveShip</span>(<span class="dv">5</span> <span class="op">*</span> gravity<span class="op">,</span> DOWN)<span class="op">;</span></span>
-<span id="cb199-4"><a href="#cb199-4" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb199-5"><a href="#cb199-5" aria-hidden="true" tabindex="-1"></a><span class="op">~~~~~~</span></span>
-<span id="cb199-6"><a href="#cb199-6" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb199-7"><a href="#cb199-7" aria-hidden="true" tabindex="-1"></a> <span class="vs">``` html</span></span>
-<span id="cb199-8"><a href="#cb199-8" aria-hidden="true" tabindex="-1"></a><span class="vs"> &lt;pre&gt;</span></span>
-<span id="cb199-9"><a href="#cb199-9" aria-hidden="true" tabindex="-1"></a><span class="vs"> &lt;code&gt;</span></span>
-<span id="cb199-10"><a href="#cb199-10" aria-hidden="true" tabindex="-1"></a><span class="vs"> // Some comments</span></span>
-<span id="cb199-11"><a href="#cb199-11" aria-hidden="true" tabindex="-1"></a><span class="vs"> line 1 of code</span></span>
-<span id="cb199-12"><a href="#cb199-12" aria-hidden="true" tabindex="-1"></a><span class="vs"> line 2 of code</span></span>
-<span id="cb199-13"><a href="#cb199-13" aria-hidden="true" tabindex="-1"></a><span class="vs"> line 3 of code</span></span>
-<span id="cb199-14"><a href="#cb199-14" aria-hidden="true" tabindex="-1"></a><span class="vs"> &lt;/code&gt;</span></span>
-<span id="cb199-15"><a href="#cb199-15" aria-hidden="true" tabindex="-1"></a><span class="vs"> &lt;/pre&gt;</span></span>
-<span id="cb199-16"><a href="#cb199-16" aria-hidden="true" tabindex="-1"></a><span class="vs"> ```</span></span></code></pre></div>
+<div class="sourceCode" id="cb204"><pre
+class="sourceCode md"><code class="sourceCode markdown"><span id="cb204-1"><a href="#cb204-1" aria-hidden="true" tabindex="-1"></a><span class="in">~~~ js</span></span>
+<span id="cb204-2"><a href="#cb204-2" aria-hidden="true" tabindex="-1"></a><span class="cf">if</span> (a <span class="op">&gt;</span> <span class="dv">3</span>) {</span>
+<span id="cb204-3"><a href="#cb204-3" aria-hidden="true" tabindex="-1"></a> <span class="fu">moveShip</span>(<span class="dv">5</span> <span class="op">*</span> gravity<span class="op">,</span> DOWN)<span class="op">;</span></span>
+<span id="cb204-4"><a href="#cb204-4" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb204-5"><a href="#cb204-5" aria-hidden="true" tabindex="-1"></a><span class="op">~~~~~~</span></span>
+<span id="cb204-6"><a href="#cb204-6" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb204-7"><a href="#cb204-7" aria-hidden="true" tabindex="-1"></a> <span class="vs">``` html</span></span>
+<span id="cb204-8"><a href="#cb204-8" aria-hidden="true" tabindex="-1"></a><span class="vs"> &lt;pre&gt;</span></span>
+<span id="cb204-9"><a href="#cb204-9" aria-hidden="true" tabindex="-1"></a><span class="vs"> &lt;code&gt;</span></span>
+<span id="cb204-10"><a href="#cb204-10" aria-hidden="true" tabindex="-1"></a><span class="vs"> // Some comments</span></span>
+<span id="cb204-11"><a href="#cb204-11" aria-hidden="true" tabindex="-1"></a><span class="vs"> line 1 of code</span></span>
+<span id="cb204-12"><a href="#cb204-12" aria-hidden="true" tabindex="-1"></a><span class="vs"> line 2 of code</span></span>
+<span id="cb204-13"><a href="#cb204-13" aria-hidden="true" tabindex="-1"></a><span class="vs"> line 3 of code</span></span>
+<span id="cb204-14"><a href="#cb204-14" aria-hidden="true" tabindex="-1"></a><span class="vs"> &lt;/code&gt;</span></span>
+<span id="cb204-15"><a href="#cb204-15" aria-hidden="true" tabindex="-1"></a><span class="vs"> &lt;/pre&gt;</span></span>
+<span id="cb204-16"><a href="#cb204-16" aria-hidden="true" tabindex="-1"></a><span class="vs"> ```</span></span></code></pre></div>
</dd>
</dl>
</dd>
@@ -3102,106 +3227,160 @@ class="sourceCode md"><code class="sourceCode markdown"><span id="cb199-1"><a hr
</dl>
</dd>
</dl>
-<h5 class="unnumbered" id="latex-example-16"><span
+<h5 class="unnumbered" id="latex-example-18"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb200"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb200-1"><a href="#cb200-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb200-2"><a href="#cb200-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">minted</span>}</span>
-<span id="cb200-3"><a href="#cb200-3" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[fencedCode]{<span class="ex">markdown</span>}</span>
-<span id="cb200-4"><a href="#cb200-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb200-5"><a href="#cb200-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb200-6"><a href="#cb200-6" aria-hidden="true" tabindex="-1"></a>~~~ js</span>
-<span id="cb200-7"><a href="#cb200-7" aria-hidden="true" tabindex="-1"></a>if (a &gt; 3) {</span>
-<span id="cb200-8"><a href="#cb200-8" aria-hidden="true" tabindex="-1"></a> moveShip(5 * gravity, DOWN);</span>
-<span id="cb200-9"><a href="#cb200-9" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb200-10"><a href="#cb200-10" aria-hidden="true" tabindex="-1"></a>~~~~~~</span>
-<span id="cb200-11"><a href="#cb200-11" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb200-12"><a href="#cb200-12" aria-hidden="true" tabindex="-1"></a> ``` html</span>
-<span id="cb200-13"><a href="#cb200-13" aria-hidden="true" tabindex="-1"></a> &lt;pre&gt;</span>
-<span id="cb200-14"><a href="#cb200-14" aria-hidden="true" tabindex="-1"></a> &lt;code&gt;</span>
-<span id="cb200-15"><a href="#cb200-15" aria-hidden="true" tabindex="-1"></a> // Some comments</span>
-<span id="cb200-16"><a href="#cb200-16" aria-hidden="true" tabindex="-1"></a> line 1 of code</span>
-<span id="cb200-17"><a href="#cb200-17" aria-hidden="true" tabindex="-1"></a> line 2 of code</span>
-<span id="cb200-18"><a href="#cb200-18" aria-hidden="true" tabindex="-1"></a> line 3 of code</span>
-<span id="cb200-19"><a href="#cb200-19" aria-hidden="true" tabindex="-1"></a> &lt;/code&gt;</span>
-<span id="cb200-20"><a href="#cb200-20" aria-hidden="true" tabindex="-1"></a> &lt;/pre&gt;</span>
-<span id="cb200-21"><a href="#cb200-21" aria-hidden="true" tabindex="-1"></a> ```</span>
-<span id="cb200-22"><a href="#cb200-22" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb200-23"><a href="#cb200-23" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<div class="sourceCode" id="cb205"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb205-1"><a href="#cb205-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb205-2"><a href="#cb205-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">minted</span>}</span>
+<span id="cb205-3"><a href="#cb205-3" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[fencedCode]{<span class="ex">markdown</span>}</span>
+<span id="cb205-4"><a href="#cb205-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb205-5"><a href="#cb205-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb205-6"><a href="#cb205-6" aria-hidden="true" tabindex="-1"></a>~~~ js</span>
+<span id="cb205-7"><a href="#cb205-7" aria-hidden="true" tabindex="-1"></a>if (a &gt; 3) {</span>
+<span id="cb205-8"><a href="#cb205-8" aria-hidden="true" tabindex="-1"></a> moveShip(5 * gravity, DOWN);</span>
+<span id="cb205-9"><a href="#cb205-9" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb205-10"><a href="#cb205-10" aria-hidden="true" tabindex="-1"></a>~~~~~~</span>
+<span id="cb205-11"><a href="#cb205-11" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb205-12"><a href="#cb205-12" aria-hidden="true" tabindex="-1"></a> ``` html</span>
+<span id="cb205-13"><a href="#cb205-13" aria-hidden="true" tabindex="-1"></a> &lt;pre&gt;</span>
+<span id="cb205-14"><a href="#cb205-14" aria-hidden="true" tabindex="-1"></a> &lt;code&gt;</span>
+<span id="cb205-15"><a href="#cb205-15" aria-hidden="true" tabindex="-1"></a> // Some comments</span>
+<span id="cb205-16"><a href="#cb205-16" aria-hidden="true" tabindex="-1"></a> line 1 of code</span>
+<span id="cb205-17"><a href="#cb205-17" aria-hidden="true" tabindex="-1"></a> line 2 of code</span>
+<span id="cb205-18"><a href="#cb205-18" aria-hidden="true" tabindex="-1"></a> line 3 of code</span>
+<span id="cb205-19"><a href="#cb205-19" aria-hidden="true" tabindex="-1"></a> &lt;/code&gt;</span>
+<span id="cb205-20"><a href="#cb205-20" aria-hidden="true" tabindex="-1"></a> &lt;/pre&gt;</span>
+<span id="cb205-21"><a href="#cb205-21" aria-hidden="true" tabindex="-1"></a> ```</span>
+<span id="cb205-22"><a href="#cb205-22" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb205-23"><a href="#cb205-23" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb201"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb201-1"><a href="#cb201-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> <span class="at">--shell-escape</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb206"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb206-1"><a href="#cb206-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> <span class="at">--shell-escape</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
-<div class="sourceCode" id="cb202"><pre
-class="sourceCode js"><code class="sourceCode javascript"><span id="cb202-1"><a href="#cb202-1" aria-hidden="true" tabindex="-1"></a><span class="cf">if</span> (a <span class="op">&gt;</span> <span class="dv">3</span>) {</span>
-<span id="cb202-2"><a href="#cb202-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">moveShip</span>(<span class="dv">5</span> <span class="op">*</span> gravity<span class="op">,</span> DOWN)<span class="op">;</span></span>
-<span id="cb202-3"><a href="#cb202-3" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div>
-<div class="sourceCode" id="cb203"><pre
-class="sourceCode html"><code class="sourceCode html"><span id="cb203-1"><a href="#cb203-1" aria-hidden="true" tabindex="-1"></a><span class="kw">&lt;pre&gt;</span></span>
-<span id="cb203-2"><a href="#cb203-2" aria-hidden="true" tabindex="-1"></a> <span class="kw">&lt;code&gt;</span></span>
-<span id="cb203-3"><a href="#cb203-3" aria-hidden="true" tabindex="-1"></a> // Some comments</span>
-<span id="cb203-4"><a href="#cb203-4" aria-hidden="true" tabindex="-1"></a> line 1 of code</span>
-<span id="cb203-5"><a href="#cb203-5" aria-hidden="true" tabindex="-1"></a> line 2 of code</span>
-<span id="cb203-6"><a href="#cb203-6" aria-hidden="true" tabindex="-1"></a> line 3 of code</span>
-<span id="cb203-7"><a href="#cb203-7" aria-hidden="true" tabindex="-1"></a> <span class="kw">&lt;/code&gt;</span></span>
-<span id="cb203-8"><a href="#cb203-8" aria-hidden="true" tabindex="-1"></a><span class="kw">&lt;/pre&gt;</span></span></code></pre></div>
+<div class="sourceCode" id="cb207"><pre
+class="sourceCode js"><code class="sourceCode javascript"><span id="cb207-1"><a href="#cb207-1" aria-hidden="true" tabindex="-1"></a><span class="cf">if</span> (a <span class="op">&gt;</span> <span class="dv">3</span>) {</span>
+<span id="cb207-2"><a href="#cb207-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">moveShip</span>(<span class="dv">5</span> <span class="op">*</span> gravity<span class="op">,</span> DOWN)<span class="op">;</span></span>
+<span id="cb207-3"><a href="#cb207-3" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div>
+<div class="sourceCode" id="cb208"><pre
+class="sourceCode html"><code class="sourceCode html"><span id="cb208-1"><a href="#cb208-1" aria-hidden="true" tabindex="-1"></a><span class="kw">&lt;pre&gt;</span></span>
+<span id="cb208-2"><a href="#cb208-2" aria-hidden="true" tabindex="-1"></a> <span class="kw">&lt;code&gt;</span></span>
+<span id="cb208-3"><a href="#cb208-3" aria-hidden="true" tabindex="-1"></a> // Some comments</span>
+<span id="cb208-4"><a href="#cb208-4" aria-hidden="true" tabindex="-1"></a> line 1 of code</span>
+<span id="cb208-5"><a href="#cb208-5" aria-hidden="true" tabindex="-1"></a> line 2 of code</span>
+<span id="cb208-6"><a href="#cb208-6" aria-hidden="true" tabindex="-1"></a> line 3 of code</span>
+<span id="cb208-7"><a href="#cb208-7" aria-hidden="true" tabindex="-1"></a> <span class="kw">&lt;/code&gt;</span></span>
+<span id="cb208-8"><a href="#cb208-8" aria-hidden="true" tabindex="-1"></a><span class="kw">&lt;/pre&gt;</span></span></code></pre></div>
</blockquote>
<h5 class="unnumbered" id="context-example-11">Con<span
class="tex">T<sub>e</sub>X</span>t Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb204"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb204-1"><a href="#cb204-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
-<span id="cb204-2"><a href="#cb204-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[fencedCode = yes]</span>
-<span id="cb204-3"><a href="#cb204-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\definetyping</span> [js]</span>
-<span id="cb204-4"><a href="#cb204-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\definetyping</span> [html]</span>
-<span id="cb204-5"><a href="#cb204-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\setuptyping</span> [html] [option=XML]</span>
-<span id="cb204-6"><a href="#cb204-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
-<span id="cb204-7"><a href="#cb204-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb204-8"><a href="#cb204-8" aria-hidden="true" tabindex="-1"></a>~~~ js</span>
-<span id="cb204-9"><a href="#cb204-9" aria-hidden="true" tabindex="-1"></a>if (a &gt; 3) {</span>
-<span id="cb204-10"><a href="#cb204-10" aria-hidden="true" tabindex="-1"></a> moveShip(5 * gravity, DOWN);</span>
-<span id="cb204-11"><a href="#cb204-11" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb204-12"><a href="#cb204-12" aria-hidden="true" tabindex="-1"></a>~~~~~~</span>
-<span id="cb204-13"><a href="#cb204-13" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb204-14"><a href="#cb204-14" aria-hidden="true" tabindex="-1"></a> ``` html</span>
-<span id="cb204-15"><a href="#cb204-15" aria-hidden="true" tabindex="-1"></a> &lt;pre&gt;</span>
-<span id="cb204-16"><a href="#cb204-16" aria-hidden="true" tabindex="-1"></a> &lt;code&gt;</span>
-<span id="cb204-17"><a href="#cb204-17" aria-hidden="true" tabindex="-1"></a> // Some comments</span>
-<span id="cb204-18"><a href="#cb204-18" aria-hidden="true" tabindex="-1"></a> line 1 of code</span>
-<span id="cb204-19"><a href="#cb204-19" aria-hidden="true" tabindex="-1"></a> line 2 of code</span>
-<span id="cb204-20"><a href="#cb204-20" aria-hidden="true" tabindex="-1"></a> line 3 of code</span>
-<span id="cb204-21"><a href="#cb204-21" aria-hidden="true" tabindex="-1"></a> &lt;/code&gt;</span>
-<span id="cb204-22"><a href="#cb204-22" aria-hidden="true" tabindex="-1"></a> &lt;/pre&gt;</span>
-<span id="cb204-23"><a href="#cb204-23" aria-hidden="true" tabindex="-1"></a> ```</span>
-<span id="cb204-24"><a href="#cb204-24" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb204-25"><a href="#cb204-25" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
+<div class="sourceCode" id="cb209"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb209-1"><a href="#cb209-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
+<span id="cb209-2"><a href="#cb209-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[fencedCode = yes]</span>
+<span id="cb209-3"><a href="#cb209-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\definetyping</span> [js]</span>
+<span id="cb209-4"><a href="#cb209-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\definetyping</span> [html]</span>
+<span id="cb209-5"><a href="#cb209-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\setuptyping</span> [html] [option=XML]</span>
+<span id="cb209-6"><a href="#cb209-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
+<span id="cb209-7"><a href="#cb209-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb209-8"><a href="#cb209-8" aria-hidden="true" tabindex="-1"></a>~~~ js</span>
+<span id="cb209-9"><a href="#cb209-9" aria-hidden="true" tabindex="-1"></a>if (a &gt; 3) {</span>
+<span id="cb209-10"><a href="#cb209-10" aria-hidden="true" tabindex="-1"></a> moveShip(5 * gravity, DOWN);</span>
+<span id="cb209-11"><a href="#cb209-11" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb209-12"><a href="#cb209-12" aria-hidden="true" tabindex="-1"></a>~~~~~~</span>
+<span id="cb209-13"><a href="#cb209-13" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb209-14"><a href="#cb209-14" aria-hidden="true" tabindex="-1"></a> ``` html</span>
+<span id="cb209-15"><a href="#cb209-15" aria-hidden="true" tabindex="-1"></a> &lt;pre&gt;</span>
+<span id="cb209-16"><a href="#cb209-16" aria-hidden="true" tabindex="-1"></a> &lt;code&gt;</span>
+<span id="cb209-17"><a href="#cb209-17" aria-hidden="true" tabindex="-1"></a> // Some comments</span>
+<span id="cb209-18"><a href="#cb209-18" aria-hidden="true" tabindex="-1"></a> line 1 of code</span>
+<span id="cb209-19"><a href="#cb209-19" aria-hidden="true" tabindex="-1"></a> line 2 of code</span>
+<span id="cb209-20"><a href="#cb209-20" aria-hidden="true" tabindex="-1"></a> line 3 of code</span>
+<span id="cb209-21"><a href="#cb209-21" aria-hidden="true" tabindex="-1"></a> &lt;/code&gt;</span>
+<span id="cb209-22"><a href="#cb209-22" aria-hidden="true" tabindex="-1"></a> &lt;/pre&gt;</span>
+<span id="cb209-23"><a href="#cb209-23" aria-hidden="true" tabindex="-1"></a> ```</span>
+<span id="cb209-24"><a href="#cb209-24" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb209-25"><a href="#cb209-25" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb205"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb205-1"><a href="#cb205-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb210"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb210-1"><a href="#cb210-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
-<div class="sourceCode" id="cb206"><pre
-class="sourceCode js"><code class="sourceCode javascript"><span id="cb206-1"><a href="#cb206-1" aria-hidden="true" tabindex="-1"></a><span class="cf">if</span> (a <span class="op">&gt;</span> <span class="dv">3</span>) {</span>
-<span id="cb206-2"><a href="#cb206-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">moveShip</span>(<span class="dv">5</span> <span class="op">*</span> gravity<span class="op">,</span> DOWN)<span class="op">;</span></span>
-<span id="cb206-3"><a href="#cb206-3" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div>
-<div class="sourceCode" id="cb207"><pre
-class="sourceCode html"><code class="sourceCode html"><span id="cb207-1"><a href="#cb207-1" aria-hidden="true" tabindex="-1"></a><span class="kw">&lt;pre&gt;</span></span>
-<span id="cb207-2"><a href="#cb207-2" aria-hidden="true" tabindex="-1"></a> <span class="kw">&lt;code&gt;</span></span>
-<span id="cb207-3"><a href="#cb207-3" aria-hidden="true" tabindex="-1"></a> // Some comments</span>
-<span id="cb207-4"><a href="#cb207-4" aria-hidden="true" tabindex="-1"></a> line 1 of code</span>
-<span id="cb207-5"><a href="#cb207-5" aria-hidden="true" tabindex="-1"></a> line 2 of code</span>
-<span id="cb207-6"><a href="#cb207-6" aria-hidden="true" tabindex="-1"></a> line 3 of code</span>
-<span id="cb207-7"><a href="#cb207-7" aria-hidden="true" tabindex="-1"></a> <span class="kw">&lt;/code&gt;</span></span>
-<span id="cb207-8"><a href="#cb207-8" aria-hidden="true" tabindex="-1"></a><span class="kw">&lt;/pre&gt;</span></span></code></pre></div>
-</blockquote>
-<h4 data-number="2.2.1.20" id="option-finalizecache"><span
-class="header-section-number">2.2.1.20</span> Option
+<div class="sourceCode" id="cb211"><pre
+class="sourceCode js"><code class="sourceCode javascript"><span id="cb211-1"><a href="#cb211-1" aria-hidden="true" tabindex="-1"></a><span class="cf">if</span> (a <span class="op">&gt;</span> <span class="dv">3</span>) {</span>
+<span id="cb211-2"><a href="#cb211-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">moveShip</span>(<span class="dv">5</span> <span class="op">*</span> gravity<span class="op">,</span> DOWN)<span class="op">;</span></span>
+<span id="cb211-3"><a href="#cb211-3" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div>
+<div class="sourceCode" id="cb212"><pre
+class="sourceCode html"><code class="sourceCode html"><span id="cb212-1"><a href="#cb212-1" aria-hidden="true" tabindex="-1"></a><span class="kw">&lt;pre&gt;</span></span>
+<span id="cb212-2"><a href="#cb212-2" aria-hidden="true" tabindex="-1"></a> <span class="kw">&lt;code&gt;</span></span>
+<span id="cb212-3"><a href="#cb212-3" aria-hidden="true" tabindex="-1"></a> // Some comments</span>
+<span id="cb212-4"><a href="#cb212-4" aria-hidden="true" tabindex="-1"></a> line 1 of code</span>
+<span id="cb212-5"><a href="#cb212-5" aria-hidden="true" tabindex="-1"></a> line 2 of code</span>
+<span id="cb212-6"><a href="#cb212-6" aria-hidden="true" tabindex="-1"></a> line 3 of code</span>
+<span id="cb212-7"><a href="#cb212-7" aria-hidden="true" tabindex="-1"></a> <span class="kw">&lt;/code&gt;</span></span>
+<span id="cb212-8"><a href="#cb212-8" aria-hidden="true" tabindex="-1"></a><span class="kw">&lt;/pre&gt;</span></span></code></pre></div>
+</blockquote>
+<h4 data-number="2.2.1.22" id="option-fenceddivs"><span
+class="header-section-number">2.2.1.22</span> Option
+<code>fencedDivs</code></h4>
+<dl>
+<dt><code>fencedDivs</code> (default value: <code>false</code>)</dt>
+<dd>
+<dl>
+<dt>true</dt>
+<dd>
+<p>Enable the Pandoc fenced divs extension:</p>
+<div class="sourceCode" id="cb213"><pre
+class="sourceCode md"><code class="sourceCode markdown"><span id="cb213-1"><a href="#cb213-1" aria-hidden="true" tabindex="-1"></a>::::: {#special .sidebar}</span>
+<span id="cb213-2"><a href="#cb213-2" aria-hidden="true" tabindex="-1"></a>Here is a paragraph.</span>
+<span id="cb213-3"><a href="#cb213-3" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb213-4"><a href="#cb213-4" aria-hidden="true" tabindex="-1"></a>And another.</span>
+<span id="cb213-5"><a href="#cb213-5" aria-hidden="true" tabindex="-1"></a>:::::</span></code></pre></div>
+</dd>
+</dl>
+</dd>
+<dd>
+<dl>
+<dt>false</dt>
+<dd>
+<p>Disable the Pandoc fenced divs extension:</p>
+</dd>
+</dl>
+</dd>
+</dl>
+<h5 class="unnumbered" id="latex-example-19"><span
+class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
+<p>Using a text editor, create a text document named
+<code>document.tex</code> with the following content:</p>
+<div class="sourceCode" id="cb214"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb214-1"><a href="#cb214-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb214-2"><a href="#cb214-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[fencedDivs]{<span class="ex">markdown</span>}</span>
+<span id="cb214-3"><a href="#cb214-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb214-4"><a href="#cb214-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}{slice=special}</span>
+<span id="cb214-5"><a href="#cb214-5" aria-hidden="true" tabindex="-1"></a>Here is a regular paragraph.</span>
+<span id="cb214-6"><a href="#cb214-6" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb214-7"><a href="#cb214-7" aria-hidden="true" tabindex="-1"></a>::::: {#special}</span>
+<span id="cb214-8"><a href="#cb214-8" aria-hidden="true" tabindex="-1"></a>Here is a special paragraph.</span>
+<span id="cb214-9"><a href="#cb214-9" aria-hidden="true" tabindex="-1"></a>:::::</span>
+<span id="cb214-10"><a href="#cb214-10" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb214-11"><a href="#cb214-11" aria-hidden="true" tabindex="-1"></a>And here is another regular paragraph.</span>
+<span id="cb214-12"><a href="#cb214-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb214-13"><a href="#cb214-13" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<p>Next, invoke LuaTeX from the terminal:</p>
+<div class="sourceCode" id="cb215"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb215-1"><a href="#cb215-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> <span class="at">--shell-escape</span> document.tex</span></code></pre></div>
+<p>A PDF document named <code>document.pdf</code> should be produced and
+contain the following text:</p>
+<blockquote>
+<p>Here is a special paragraph.</p>
+</blockquote>
+<h4 data-number="2.2.1.23" id="option-finalizecache"><span
+class="header-section-number">2.2.1.23</span> Option
<code>finalizeCache</code></h4>
<dl>
<dt><code>finalizeCache</code> (default value: <code>false</code>)</dt>
@@ -3213,7 +3392,7 @@ their auxiliary cache files will be created.</p>
<p>The frozen cache makes it possible to later typeset a plain <span
class="tex">T<sub>e</sub>X</span> document that contains markdown
documents without invoking Lua using the
-<code>\markdownOptionFrozenCache</code> plain <span
+<strong><code>frozenCache</code></strong> plain <span
class="tex">T<sub>e</sub>X</span> option. As a result, the plain <span
class="tex">T<sub>e</sub>X</span> document becomes more portable, but
further changes in the order and the content of markdown documents will
@@ -3224,31 +3403,31 @@ not be reflected.</p>
class="tex">T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb208"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb208-1"><a href="#cb208-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
-<span id="cb208-2"><a href="#cb208-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionFinalizeCache</span>{true}</span>
-<span id="cb208-3"><a href="#cb208-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
-<span id="cb208-4"><a href="#cb208-4" aria-hidden="true" tabindex="-1"></a>Hello *world*!</span>
-<span id="cb208-5"><a href="#cb208-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
-<span id="cb208-6"><a href="#cb208-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
+<div class="sourceCode" id="cb216"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb216-1"><a href="#cb216-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
+<span id="cb216-2"><a href="#cb216-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionFinalizeCache</span>{true}</span>
+<span id="cb216-3"><a href="#cb216-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
+<span id="cb216-4"><a href="#cb216-4" aria-hidden="true" tabindex="-1"></a>Hello *world*!</span>
+<span id="cb216-5"><a href="#cb216-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
+<span id="cb216-6"><a href="#cb216-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb209"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb209-1"><a href="#cb209-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb217"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb217-1"><a href="#cb217-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the text “Hello <em>world</em>!” A frozen cache will also be
produced as we requested using the <code>finalizeCache</code>
option.</p>
<p>Next, change the content of <code>document.tex</code> as follows:</p>
-<div class="sourceCode" id="cb210"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb210-1"><a href="#cb210-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
-<span id="cb210-2"><a href="#cb210-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionFrozenCache</span>{true}</span>
-<span id="cb210-3"><a href="#cb210-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
-<span id="cb210-4"><a href="#cb210-4" aria-hidden="true" tabindex="-1"></a>Hi *world*!</span>
-<span id="cb210-5"><a href="#cb210-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
-<span id="cb210-6"><a href="#cb210-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
+<div class="sourceCode" id="cb218"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb218-1"><a href="#cb218-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
+<span id="cb218-2"><a href="#cb218-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionFrozenCache</span>{true}</span>
+<span id="cb218-3"><a href="#cb218-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
+<span id="cb218-4"><a href="#cb218-4" aria-hidden="true" tabindex="-1"></a>Hi *world*!</span>
+<span id="cb218-5"><a href="#cb218-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
+<span id="cb218-6"><a href="#cb218-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
<p>Last, invoke pdfTeX without shell access from the terminal:</p>
-<div class="sourceCode" id="cb211"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb211-1"><a href="#cb211-1" aria-hidden="true" tabindex="-1"></a><span class="ex">pdftex</span> <span class="at">-no-shell-escape</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb219"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb219-1"><a href="#cb219-1" aria-hidden="true" tabindex="-1"></a><span class="ex">pdftex</span> <span class="at">-no-shell-escape</span> document.tex</span></code></pre></div>
<p>A new PDF document named <code>document.pdf</code> should be produced
and contain the same text “Hello <em>world</em>!” Since we used the
contents of the frozen cache using the
@@ -3256,37 +3435,37 @@ contents of the frozen cache using the
the document without accessing the shell or invoking Lua, but the change
in the content of the markdown document from “Hello <em>world</em>!” to
“Hi <em>world</em>!” was not reflected.</p>
-<h5 class="unnumbered" id="latex-example-17"><span
+<h5 class="unnumbered" id="latex-example-20"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb212"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb212-1"><a href="#cb212-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>[finalizecache]{<span class="ex">article</span>}</span>
-<span id="cb212-2"><a href="#cb212-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span>
-<span id="cb212-3"><a href="#cb212-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb212-4"><a href="#cb212-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb212-5"><a href="#cb212-5" aria-hidden="true" tabindex="-1"></a>Hello *world*!</span>
-<span id="cb212-6"><a href="#cb212-6" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb212-7"><a href="#cb212-7" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<div class="sourceCode" id="cb220"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb220-1"><a href="#cb220-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>[finalizecache]{<span class="ex">article</span>}</span>
+<span id="cb220-2"><a href="#cb220-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span>
+<span id="cb220-3"><a href="#cb220-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb220-4"><a href="#cb220-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb220-5"><a href="#cb220-5" aria-hidden="true" tabindex="-1"></a>Hello *world*!</span>
+<span id="cb220-6"><a href="#cb220-6" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb220-7"><a href="#cb220-7" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb213"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb213-1"><a href="#cb213-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb221"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb221-1"><a href="#cb221-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the text “Hello <em>world</em>!” A frozen cache will also be
produced as we requested using the <code>finalizecache</code>
option.</p>
<p>Next, change the content of <code>document.tex</code> as follows:</p>
-<div class="sourceCode" id="cb214"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb214-1"><a href="#cb214-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>[frozencache]{<span class="ex">article</span>}</span>
-<span id="cb214-2"><a href="#cb214-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span>
-<span id="cb214-3"><a href="#cb214-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb214-4"><a href="#cb214-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb214-5"><a href="#cb214-5" aria-hidden="true" tabindex="-1"></a>Hi *world*!</span>
-<span id="cb214-6"><a href="#cb214-6" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb214-7"><a href="#cb214-7" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<div class="sourceCode" id="cb222"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb222-1"><a href="#cb222-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>[frozencache]{<span class="ex">article</span>}</span>
+<span id="cb222-2"><a href="#cb222-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span>
+<span id="cb222-3"><a href="#cb222-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb222-4"><a href="#cb222-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb222-5"><a href="#cb222-5" aria-hidden="true" tabindex="-1"></a>Hi *world*!</span>
+<span id="cb222-6"><a href="#cb222-6" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb222-7"><a href="#cb222-7" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Last, invoke pdfTeX without shell access from the terminal:</p>
-<div class="sourceCode" id="cb215"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb215-1"><a href="#cb215-1" aria-hidden="true" tabindex="-1"></a><span class="ex">pdflatex</span> <span class="at">-no-shell-escape</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb223"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb223-1"><a href="#cb223-1" aria-hidden="true" tabindex="-1"></a><span class="ex">pdflatex</span> <span class="at">-no-shell-escape</span> document.tex</span></code></pre></div>
<p>A new PDF document named <code>document.pdf</code> should be produced
and contain the same text “Hello <em>world</em>!” Since we used the
contents of the frozen cache using the
@@ -3298,33 +3477,33 @@ in the content of the markdown document from “Hello <em>world</em>!” to
class="tex">T<sub>e</sub>X</span>t Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb216"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb216-1"><a href="#cb216-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
-<span id="cb216-2"><a href="#cb216-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[finalizeCache = yes]</span>
-<span id="cb216-3"><a href="#cb216-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
-<span id="cb216-4"><a href="#cb216-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb216-5"><a href="#cb216-5" aria-hidden="true" tabindex="-1"></a>Hello *world*!</span>
-<span id="cb216-6"><a href="#cb216-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb216-7"><a href="#cb216-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
+<div class="sourceCode" id="cb224"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb224-1"><a href="#cb224-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
+<span id="cb224-2"><a href="#cb224-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[finalizeCache = yes]</span>
+<span id="cb224-3"><a href="#cb224-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
+<span id="cb224-4"><a href="#cb224-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb224-5"><a href="#cb224-5" aria-hidden="true" tabindex="-1"></a>Hello *world*!</span>
+<span id="cb224-6"><a href="#cb224-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb224-7"><a href="#cb224-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb217"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb217-1"><a href="#cb217-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb225"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb225-1"><a href="#cb225-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the text “Hello <em>world</em>!” A frozen cache will also be
produced in the <code>cache.tex</code> output file as we requested using
the <code>finalizeCache</code> option.</p>
<p>Next, change the content of <code>document.tex</code> as follows:</p>
-<div class="sourceCode" id="cb218"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb218-1"><a href="#cb218-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
-<span id="cb218-2"><a href="#cb218-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[frozenCache = yes]</span>
-<span id="cb218-3"><a href="#cb218-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
-<span id="cb218-4"><a href="#cb218-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb218-5"><a href="#cb218-5" aria-hidden="true" tabindex="-1"></a>Hi *world*!</span>
-<span id="cb218-6"><a href="#cb218-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb218-7"><a href="#cb218-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
+<div class="sourceCode" id="cb226"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb226-1"><a href="#cb226-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
+<span id="cb226-2"><a href="#cb226-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[frozenCache = yes]</span>
+<span id="cb226-3"><a href="#cb226-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
+<span id="cb226-4"><a href="#cb226-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb226-5"><a href="#cb226-5" aria-hidden="true" tabindex="-1"></a>Hi *world*!</span>
+<span id="cb226-6"><a href="#cb226-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb226-7"><a href="#cb226-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
<p>Last, invoke pdfTeX without shell access from the terminal:</p>
-<div class="sourceCode" id="cb219"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb219-1"><a href="#cb219-1" aria-hidden="true" tabindex="-1"></a><span class="ex">texexec</span> <span class="at">--passon</span><span class="op">=</span>--no-shell-escape document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb227"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb227-1"><a href="#cb227-1" aria-hidden="true" tabindex="-1"></a><span class="ex">texexec</span> <span class="at">--passon</span><span class="op">=</span>--no-shell-escape document.tex</span></code></pre></div>
<p>A new PDF document named <code>document.pdf</code> should be produced
and contain the same text “Hello <em>world</em>!” Since we used the
contents of the frozen cache using the
@@ -3332,130 +3511,8 @@ contents of the frozen cache using the
the document without accessing the shell or invoking Lua, but the change
in the content of the markdown document from “Hello <em>world</em>!” to
“Hi <em>world</em>!” was not reflected.</p>
-<h4 data-number="2.2.1.21" id="option-notes"><span
-class="header-section-number">2.2.1.21</span> Option
-<code>notes</code></h4>
-<dl>
-<dt><code>notes</code> (default value: <code>false</code>)</dt>
-<dd>
-<dl>
-<dt>true</dt>
-<dd>
-<p>Enable the Pandoc note syntax extension:</p>
-<div class="sourceCode" id="cb220"><pre
-class="sourceCode md"><code class="sourceCode markdown"><span id="cb220-1"><a href="#cb220-1" aria-hidden="true" tabindex="-1"></a>Here is a note reference,<span class="ot">[^1]</span> and another.<span class="ot">[^longnote]</span></span>
-<span id="cb220-2"><a href="#cb220-2" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb220-3"><a href="#cb220-3" aria-hidden="true" tabindex="-1"></a><span class="ot">[^1]: </span>Here is the note.</span>
-<span id="cb220-4"><a href="#cb220-4" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb220-5"><a href="#cb220-5" aria-hidden="true" tabindex="-1"></a><span class="ot">[^longnote]: </span>Here&#39;s one with multiple blocks.</span>
-<span id="cb220-6"><a href="#cb220-6" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb220-7"><a href="#cb220-7" aria-hidden="true" tabindex="-1"></a><span class="in"> Subsequent paragraphs are indented to show that they</span></span>
-<span id="cb220-8"><a href="#cb220-8" aria-hidden="true" tabindex="-1"></a>belong to the previous note.</span>
-<span id="cb220-9"><a href="#cb220-9" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb220-10"><a href="#cb220-10" aria-hidden="true" tabindex="-1"></a><span class="in"> { some.code }</span></span>
-<span id="cb220-11"><a href="#cb220-11" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb220-12"><a href="#cb220-12" aria-hidden="true" tabindex="-1"></a><span class="in"> The whole paragraph can be indented, or just the</span></span>
-<span id="cb220-13"><a href="#cb220-13" aria-hidden="true" tabindex="-1"></a><span class="in"> first line. In this way, multi-paragraph notes</span></span>
-<span id="cb220-14"><a href="#cb220-14" aria-hidden="true" tabindex="-1"></a><span class="in"> work like multi-paragraph list items.</span></span>
-<span id="cb220-15"><a href="#cb220-15" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb220-16"><a href="#cb220-16" aria-hidden="true" tabindex="-1"></a>This paragraph won&#39;t be part of the note, because it</span>
-<span id="cb220-17"><a href="#cb220-17" aria-hidden="true" tabindex="-1"></a>isn&#39;t indented.</span></code></pre></div>
-</dd>
-</dl>
-</dd>
-<dd>
-<dl>
-<dt>false</dt>
-<dd>
-<p>Disable the Pandoc note syntax extension.</p>
-</dd>
-</dl>
-</dd>
-</dl>
-<h5 class="unnumbered" id="latex-example-18"><span
-class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
-<p>Using a text editor, create a text document named
-<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb221"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb221-1"><a href="#cb221-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb221-2"><a href="#cb221-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[notes]{<span class="ex">markdown</span>}</span>
-<span id="cb221-3"><a href="#cb221-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb221-4"><a href="#cb221-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb221-5"><a href="#cb221-5" aria-hidden="true" tabindex="-1"></a>Here is a note reference,[^1] and another.[^longnote]</span>
-<span id="cb221-6"><a href="#cb221-6" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb221-7"><a href="#cb221-7" aria-hidden="true" tabindex="-1"></a>[^1]: Here is the note.</span>
-<span id="cb221-8"><a href="#cb221-8" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb221-9"><a href="#cb221-9" aria-hidden="true" tabindex="-1"></a>[^longnote]: Here&#39;s one with multiple blocks.</span>
-<span id="cb221-10"><a href="#cb221-10" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb221-11"><a href="#cb221-11" aria-hidden="true" tabindex="-1"></a> Subsequent paragraphs are indented to show that they</span>
-<span id="cb221-12"><a href="#cb221-12" aria-hidden="true" tabindex="-1"></a>belong to the previous note.</span>
-<span id="cb221-13"><a href="#cb221-13" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb221-14"><a href="#cb221-14" aria-hidden="true" tabindex="-1"></a> { some.code }</span>
-<span id="cb221-15"><a href="#cb221-15" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb221-16"><a href="#cb221-16" aria-hidden="true" tabindex="-1"></a> The whole paragraph can be indented, or just the</span>
-<span id="cb221-17"><a href="#cb221-17" aria-hidden="true" tabindex="-1"></a> first line. In this way, multi-paragraph notes</span>
-<span id="cb221-18"><a href="#cb221-18" aria-hidden="true" tabindex="-1"></a> work like multi-paragraph list items.</span>
-<span id="cb221-19"><a href="#cb221-19" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb221-20"><a href="#cb221-20" aria-hidden="true" tabindex="-1"></a>This paragraph won&#39;t be part of the note, because it</span>
-<span id="cb221-21"><a href="#cb221-21" aria-hidden="true" tabindex="-1"></a>isn&#39;t indented.</span>
-<span id="cb221-22"><a href="#cb221-22" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb221-23"><a href="#cb221-23" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
-<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb222"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb222-1"><a href="#cb222-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
-<p>A PDF document named <code>document.pdf</code> should be produced and
-contain the following text:</p>
-<blockquote>
-<p>Here is a note reference,<a href="#fn1" class="footnote-ref"
-id="fnref1" role="doc-noteref"><sup>1</sup></a> and another.<a
-href="#fn2" class="footnote-ref" id="fnref2"
-role="doc-noteref"><sup>2</sup></a></p>
-<p>This paragraph won’t be part of the note, because it isn’t
-indented.</p>
-</blockquote>
-<h5 class="unnumbered" id="context-example-13">Con<span
-class="tex">T<sub>e</sub>X</span>t Example</h5>
-<p>Using a text editor, create a text document named
-<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb224"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb224-1"><a href="#cb224-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
-<span id="cb224-2"><a href="#cb224-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[notes = yes]</span>
-<span id="cb224-3"><a href="#cb224-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
-<span id="cb224-4"><a href="#cb224-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb224-5"><a href="#cb224-5" aria-hidden="true" tabindex="-1"></a>Here is a note reference,[^1] and another.[^longnote]</span>
-<span id="cb224-6"><a href="#cb224-6" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb224-7"><a href="#cb224-7" aria-hidden="true" tabindex="-1"></a>[^1]: Here is the note.</span>
-<span id="cb224-8"><a href="#cb224-8" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb224-9"><a href="#cb224-9" aria-hidden="true" tabindex="-1"></a>[^longnote]: Here&#39;s one with multiple blocks.</span>
-<span id="cb224-10"><a href="#cb224-10" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb224-11"><a href="#cb224-11" aria-hidden="true" tabindex="-1"></a> Subsequent paragraphs are indented to show that they</span>
-<span id="cb224-12"><a href="#cb224-12" aria-hidden="true" tabindex="-1"></a>belong to the previous note.</span>
-<span id="cb224-13"><a href="#cb224-13" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb224-14"><a href="#cb224-14" aria-hidden="true" tabindex="-1"></a> { some.code }</span>
-<span id="cb224-15"><a href="#cb224-15" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb224-16"><a href="#cb224-16" aria-hidden="true" tabindex="-1"></a> The whole paragraph can be indented, or just the</span>
-<span id="cb224-17"><a href="#cb224-17" aria-hidden="true" tabindex="-1"></a> first line. In this way, multi-paragraph notes</span>
-<span id="cb224-18"><a href="#cb224-18" aria-hidden="true" tabindex="-1"></a> work like multi-paragraph list items.</span>
-<span id="cb224-19"><a href="#cb224-19" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb224-20"><a href="#cb224-20" aria-hidden="true" tabindex="-1"></a>This paragraph won&#39;t be part of the note, because it</span>
-<span id="cb224-21"><a href="#cb224-21" aria-hidden="true" tabindex="-1"></a>isn&#39;t indented.</span>
-<span id="cb224-22"><a href="#cb224-22" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb224-23"><a href="#cb224-23" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
-<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb225"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb225-1"><a href="#cb225-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
-<p>A PDF document named <code>document.pdf</code> should be produced and
-contain the following text:</p>
-<blockquote>
-<p>Here is a note reference,<a href="#fn3" class="footnote-ref"
-id="fnref3" role="doc-noteref"><sup>3</sup></a> and another.<a
-href="#fn4" class="footnote-ref" id="fnref4"
-role="doc-noteref"><sup>4</sup></a></p>
-<p>This paragraph won’t be part of the note, because it isn’t
-indented.</p>
-</blockquote>
-<h4 data-number="2.2.1.22" id="option-frozencachecounter"><span
-class="header-section-number">2.2.1.22</span> Option
+<h4 data-number="2.2.1.24" id="option-frozencachecounter"><span
+class="header-section-number">2.2.1.24</span> Option
<code>frozenCacheCounter</code></h4>
<dl>
<dt><code>frozenCacheCounter</code> (default value: <code>0</code>)</dt>
@@ -3474,25 +3531,25 @@ markdown document number ⟨<em>number</em>⟩.</p>
<h5 class="unnumbered" id="lua-module-example-8">Lua Module Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb227"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb227-1"><a href="#cb227-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
-<span id="cb227-2"><a href="#cb227-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\directlua</span>{</span>
-<span id="cb227-3"><a href="#cb227-3" aria-hidden="true" tabindex="-1"></a> local markdown = require(&quot;markdown&quot;)</span>
-<span id="cb227-4"><a href="#cb227-4" aria-hidden="true" tabindex="-1"></a> local firstConvert = markdown.new({finalizeCache = true, frozenCacheCounter = 0})</span>
-<span id="cb227-5"><a href="#cb227-5" aria-hidden="true" tabindex="-1"></a> local firstInput = &quot;Hello&quot;</span>
-<span id="cb227-6"><a href="#cb227-6" aria-hidden="true" tabindex="-1"></a> local secondConvert = markdown.new({finalizeCache = true, frozenCacheCounter = 1})</span>
-<span id="cb227-7"><a href="#cb227-7" aria-hidden="true" tabindex="-1"></a> local secondInput = &quot;*world*!&quot;</span>
-<span id="cb227-8"><a href="#cb227-8" aria-hidden="true" tabindex="-1"></a> tex.sprint(firstConvert(firstInput) .. [[ ]] .. secondConvert(secondInput)) }</span>
-<span id="cb227-9"><a href="#cb227-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
-<p>Then, invoke LuaTeX from the terminal:</p>
<div class="sourceCode" id="cb228"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb228-1"><a href="#cb228-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb228-1"><a href="#cb228-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
+<span id="cb228-2"><a href="#cb228-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\directlua</span>{</span>
+<span id="cb228-3"><a href="#cb228-3" aria-hidden="true" tabindex="-1"></a> local markdown = require(&quot;markdown&quot;)</span>
+<span id="cb228-4"><a href="#cb228-4" aria-hidden="true" tabindex="-1"></a> local firstConvert = markdown.new({finalizeCache = true, frozenCacheCounter = 0})</span>
+<span id="cb228-5"><a href="#cb228-5" aria-hidden="true" tabindex="-1"></a> local firstInput = &quot;Hello&quot;</span>
+<span id="cb228-6"><a href="#cb228-6" aria-hidden="true" tabindex="-1"></a> local secondConvert = markdown.new({finalizeCache = true, frozenCacheCounter = 1})</span>
+<span id="cb228-7"><a href="#cb228-7" aria-hidden="true" tabindex="-1"></a> local secondInput = &quot;*world*!&quot;</span>
+<span id="cb228-8"><a href="#cb228-8" aria-hidden="true" tabindex="-1"></a> tex.sprint(firstConvert(firstInput) .. [[ ]] .. secondConvert(secondInput)) }</span>
+<span id="cb228-9"><a href="#cb228-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
+<p>Then, invoke LuaTeX from the terminal:</p>
+<div class="sourceCode" id="cb229"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb229-1"><a href="#cb229-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the text “Hello <em>world</em>!” A frozen cache with two entries
will also be produced as we requested using the
<code>frozenCacheCounter</code> option.</p>
-<h4 data-number="2.2.1.23" id="option-hardlinebreaks"><span
-class="header-section-number">2.2.1.23</span> Option
+<h4 data-number="2.2.1.25" id="option-hardlinebreaks"><span
+class="header-section-number">2.2.1.25</span> Option
<code>hardLineBreaks</code></h4>
<dl>
<dt><code>hardLineBreaks</code> (default value: <code>false</code>)</dt>
@@ -3514,33 +3571,33 @@ of spaces.</p>
</dl>
</dd>
</dl>
-<h5 class="unnumbered" id="latex-example-19"><span
+<h5 class="unnumbered" id="latex-example-21"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb229"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb229-1"><a href="#cb229-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb229-2"><a href="#cb229-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span>
-<span id="cb229-3"><a href="#cb229-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb229-4"><a href="#cb229-4" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb229-5"><a href="#cb229-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb229-6"><a href="#cb229-6" aria-hidden="true" tabindex="-1"></a>&#39;Twas brillig, and the slithy toves</span>
-<span id="cb229-7"><a href="#cb229-7" aria-hidden="true" tabindex="-1"></a>Did gyre and gimble in the wabe;</span>
-<span id="cb229-8"><a href="#cb229-8" aria-hidden="true" tabindex="-1"></a>All mimsy were the borogoves,</span>
-<span id="cb229-9"><a href="#cb229-9" aria-hidden="true" tabindex="-1"></a>And the mome raths outgrabe.</span>
-<span id="cb229-10"><a href="#cb229-10" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb229-11"><a href="#cb229-11" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb229-12"><a href="#cb229-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{hardLineBreaks}</span>
-<span id="cb229-13"><a href="#cb229-13" aria-hidden="true" tabindex="-1"></a>&#39;Twas brillig, and the slithy toves</span>
-<span id="cb229-14"><a href="#cb229-14" aria-hidden="true" tabindex="-1"></a>Did gyre and gimble in the wabe;</span>
-<span id="cb229-15"><a href="#cb229-15" aria-hidden="true" tabindex="-1"></a>All mimsy were the borogoves,</span>
-<span id="cb229-16"><a href="#cb229-16" aria-hidden="true" tabindex="-1"></a>And the mome raths outgrabe.</span>
-<span id="cb229-17"><a href="#cb229-17" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span>
-<span id="cb229-18"><a href="#cb229-18" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb229-19"><a href="#cb229-19" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
-<p>Next, invoke LuaTeX from the terminal:</p>
<div class="sourceCode" id="cb230"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb230-1"><a href="#cb230-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb230-1"><a href="#cb230-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb230-2"><a href="#cb230-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span>
+<span id="cb230-3"><a href="#cb230-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb230-4"><a href="#cb230-4" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb230-5"><a href="#cb230-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb230-6"><a href="#cb230-6" aria-hidden="true" tabindex="-1"></a>&#39;Twas brillig, and the slithy toves</span>
+<span id="cb230-7"><a href="#cb230-7" aria-hidden="true" tabindex="-1"></a>Did gyre and gimble in the wabe;</span>
+<span id="cb230-8"><a href="#cb230-8" aria-hidden="true" tabindex="-1"></a>All mimsy were the borogoves,</span>
+<span id="cb230-9"><a href="#cb230-9" aria-hidden="true" tabindex="-1"></a>And the mome raths outgrabe.</span>
+<span id="cb230-10"><a href="#cb230-10" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb230-11"><a href="#cb230-11" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb230-12"><a href="#cb230-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{hardLineBreaks}</span>
+<span id="cb230-13"><a href="#cb230-13" aria-hidden="true" tabindex="-1"></a>&#39;Twas brillig, and the slithy toves</span>
+<span id="cb230-14"><a href="#cb230-14" aria-hidden="true" tabindex="-1"></a>Did gyre and gimble in the wabe;</span>
+<span id="cb230-15"><a href="#cb230-15" aria-hidden="true" tabindex="-1"></a>All mimsy were the borogoves,</span>
+<span id="cb230-16"><a href="#cb230-16" aria-hidden="true" tabindex="-1"></a>And the mome raths outgrabe.</span>
+<span id="cb230-17"><a href="#cb230-17" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span>
+<span id="cb230-18"><a href="#cb230-18" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb230-19"><a href="#cb230-19" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<p>Next, invoke LuaTeX from the terminal:</p>
+<div class="sourceCode" id="cb231"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb231-1"><a href="#cb231-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -3549,8 +3606,8 @@ All mimsy were the borogoves, And the mome raths outgrabe.</p>
<p>’Twas brillig, and the slithy toves Did gyre and gimble in the wabe;
All mimsy were the borogoves, And the mome raths outgrabe.</p>
</blockquote>
-<h4 data-number="2.2.1.24" id="option-hashenumerators"><span
-class="header-section-number">2.2.1.24</span> Option
+<h4 data-number="2.2.1.26" id="option-hashenumerators"><span
+class="header-section-number">2.2.1.26</span> Option
<code>hashEnumerators</code></h4>
<dl>
<dt><code>hashEnumerators</code> (default value:
@@ -3561,10 +3618,10 @@ class="header-section-number">2.2.1.24</span> Option
<dd>
<p>Enable the use of hash symbols (<code>#</code>) as ordered item list
markers:</p>
-<div class="sourceCode" id="cb231"><pre
-class="sourceCode md"><code class="sourceCode markdown"><span id="cb231-1"><a href="#cb231-1" aria-hidden="true" tabindex="-1"></a>#. Bird</span>
-<span id="cb231-2"><a href="#cb231-2" aria-hidden="true" tabindex="-1"></a>#. McHale</span>
-<span id="cb231-3"><a href="#cb231-3" aria-hidden="true" tabindex="-1"></a>#. Parish</span></code></pre></div>
+<div class="sourceCode" id="cb232"><pre
+class="sourceCode md"><code class="sourceCode markdown"><span id="cb232-1"><a href="#cb232-1" aria-hidden="true" tabindex="-1"></a>#. Bird</span>
+<span id="cb232-2"><a href="#cb232-2" aria-hidden="true" tabindex="-1"></a>#. McHale</span>
+<span id="cb232-3"><a href="#cb232-3" aria-hidden="true" tabindex="-1"></a>#. Parish</span></code></pre></div>
</dd>
</dl>
</dd>
@@ -3578,31 +3635,31 @@ markers.</p>
</dl>
</dd>
</dl>
-<h5 class="unnumbered" id="latex-example-20"><span
+<h5 class="unnumbered" id="latex-example-22"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb232"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb232-1"><a href="#cb232-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb232-2"><a href="#cb232-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span>
-<span id="cb232-3"><a href="#cb232-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb232-4"><a href="#cb232-4" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb232-5"><a href="#cb232-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb232-6"><a href="#cb232-6" aria-hidden="true" tabindex="-1"></a>#. Bird</span>
-<span id="cb232-7"><a href="#cb232-7" aria-hidden="true" tabindex="-1"></a>#. McHale</span>
-<span id="cb232-8"><a href="#cb232-8" aria-hidden="true" tabindex="-1"></a>#. Parish</span>
-<span id="cb232-9"><a href="#cb232-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb232-10"><a href="#cb232-10" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb232-11"><a href="#cb232-11" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{hashEnumerators}</span>
-<span id="cb232-12"><a href="#cb232-12" aria-hidden="true" tabindex="-1"></a>#. Bird</span>
-<span id="cb232-13"><a href="#cb232-13" aria-hidden="true" tabindex="-1"></a>#. McHale</span>
-<span id="cb232-14"><a href="#cb232-14" aria-hidden="true" tabindex="-1"></a>#. Parish</span>
-<span id="cb232-15"><a href="#cb232-15" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span>
-<span id="cb232-16"><a href="#cb232-16" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb232-17"><a href="#cb232-17" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
-<p>Next, invoke LuaTeX from the terminal:</p>
<div class="sourceCode" id="cb233"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb233-1"><a href="#cb233-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb233-1"><a href="#cb233-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb233-2"><a href="#cb233-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span>
+<span id="cb233-3"><a href="#cb233-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb233-4"><a href="#cb233-4" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb233-5"><a href="#cb233-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb233-6"><a href="#cb233-6" aria-hidden="true" tabindex="-1"></a>#. Bird</span>
+<span id="cb233-7"><a href="#cb233-7" aria-hidden="true" tabindex="-1"></a>#. McHale</span>
+<span id="cb233-8"><a href="#cb233-8" aria-hidden="true" tabindex="-1"></a>#. Parish</span>
+<span id="cb233-9"><a href="#cb233-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb233-10"><a href="#cb233-10" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb233-11"><a href="#cb233-11" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{hashEnumerators}</span>
+<span id="cb233-12"><a href="#cb233-12" aria-hidden="true" tabindex="-1"></a>#. Bird</span>
+<span id="cb233-13"><a href="#cb233-13" aria-hidden="true" tabindex="-1"></a>#. McHale</span>
+<span id="cb233-14"><a href="#cb233-14" aria-hidden="true" tabindex="-1"></a>#. Parish</span>
+<span id="cb233-15"><a href="#cb233-15" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span>
+<span id="cb233-16"><a href="#cb233-16" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb233-17"><a href="#cb233-17" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<p>Next, invoke LuaTeX from the terminal:</p>
+<div class="sourceCode" id="cb234"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb234-1"><a href="#cb234-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -3615,31 +3672,31 @@ contain the following text:</p>
<li>Parish</li>
</ol>
</blockquote>
-<h5 class="unnumbered" id="context-example-14">Con<span
+<h5 class="unnumbered" id="context-example-13">Con<span
class="tex">T<sub>e</sub>X</span>t Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb234"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb234-1"><a href="#cb234-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
-<span id="cb234-2"><a href="#cb234-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
-<span id="cb234-3"><a href="#cb234-3" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb234-4"><a href="#cb234-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb234-5"><a href="#cb234-5" aria-hidden="true" tabindex="-1"></a>#. Bird</span>
-<span id="cb234-6"><a href="#cb234-6" aria-hidden="true" tabindex="-1"></a>#. McHale</span>
-<span id="cb234-7"><a href="#cb234-7" aria-hidden="true" tabindex="-1"></a>#. Parish</span>
-<span id="cb234-8"><a href="#cb234-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb234-9"><a href="#cb234-9" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb234-10"><a href="#cb234-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[hashEnumerators = yes]</span>
-<span id="cb234-11"><a href="#cb234-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb234-12"><a href="#cb234-12" aria-hidden="true" tabindex="-1"></a>#. Bird</span>
-<span id="cb234-13"><a href="#cb234-13" aria-hidden="true" tabindex="-1"></a>#. McHale</span>
-<span id="cb234-14"><a href="#cb234-14" aria-hidden="true" tabindex="-1"></a>#. Parish</span>
-<span id="cb234-15"><a href="#cb234-15" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb234-16"><a href="#cb234-16" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb234-17"><a href="#cb234-17" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
-<p>Next, invoke LuaTeX from the terminal:</p>
<div class="sourceCode" id="cb235"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb235-1"><a href="#cb235-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb235-1"><a href="#cb235-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
+<span id="cb235-2"><a href="#cb235-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
+<span id="cb235-3"><a href="#cb235-3" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb235-4"><a href="#cb235-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb235-5"><a href="#cb235-5" aria-hidden="true" tabindex="-1"></a>#. Bird</span>
+<span id="cb235-6"><a href="#cb235-6" aria-hidden="true" tabindex="-1"></a>#. McHale</span>
+<span id="cb235-7"><a href="#cb235-7" aria-hidden="true" tabindex="-1"></a>#. Parish</span>
+<span id="cb235-8"><a href="#cb235-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb235-9"><a href="#cb235-9" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb235-10"><a href="#cb235-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[hashEnumerators = yes]</span>
+<span id="cb235-11"><a href="#cb235-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb235-12"><a href="#cb235-12" aria-hidden="true" tabindex="-1"></a>#. Bird</span>
+<span id="cb235-13"><a href="#cb235-13" aria-hidden="true" tabindex="-1"></a>#. McHale</span>
+<span id="cb235-14"><a href="#cb235-14" aria-hidden="true" tabindex="-1"></a>#. Parish</span>
+<span id="cb235-15"><a href="#cb235-15" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb235-16"><a href="#cb235-16" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb235-17"><a href="#cb235-17" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
+<p>Next, invoke LuaTeX from the terminal:</p>
+<div class="sourceCode" id="cb236"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb236-1"><a href="#cb236-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -3652,8 +3709,8 @@ contain the following text:</p>
<li>Parish</li>
</ol>
</blockquote>
-<h4 data-number="2.2.1.25" id="header-attributes"><span
-class="header-section-number">2.2.1.25</span> Option
+<h4 data-number="2.2.1.27" id="header-attributes"><span
+class="header-section-number">2.2.1.27</span> Option
<code>headerAttributes</code></h4>
<dl>
<dt><code>headerAttributes</code> (default value:
@@ -3663,15 +3720,13 @@ class="header-section-number">2.2.1.25</span> Option
<dt>true</dt>
<dd>
<p>Enable the assignment of HTML attributes to headings:</p>
-<div class="sourceCode" id="cb236"><pre
-class="sourceCode md"><code class="sourceCode markdown"><span id="cb236-1"><a href="#cb236-1" aria-hidden="true" tabindex="-1"></a><span class="fu"># My first heading {#foo}</span></span>
-<span id="cb236-2"><a href="#cb236-2" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb236-3"><a href="#cb236-3" aria-hidden="true" tabindex="-1"></a><span class="fu">## My second heading ## {#bar .baz}</span></span>
-<span id="cb236-4"><a href="#cb236-4" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb236-5"><a href="#cb236-5" aria-hidden="true" tabindex="-1"></a>Yet another heading {key=value}</span>
-<span id="cb236-6"><a href="#cb236-6" aria-hidden="true" tabindex="-1"></a><span class="fu">===================</span></span></code></pre></div>
-<p>These HTML attributes have currently no effect other than enabling <a
-href="#slice">content slicing</a>.</p>
+<div class="sourceCode" id="cb237"><pre
+class="sourceCode md"><code class="sourceCode markdown"><span id="cb237-1"><a href="#cb237-1" aria-hidden="true" tabindex="-1"></a><span class="fu"># My first heading {#foo}</span></span>
+<span id="cb237-2"><a href="#cb237-2" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb237-3"><a href="#cb237-3" aria-hidden="true" tabindex="-1"></a><span class="fu">## My second heading ## {#bar .baz}</span></span>
+<span id="cb237-4"><a href="#cb237-4" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb237-5"><a href="#cb237-5" aria-hidden="true" tabindex="-1"></a>Yet another heading {key=value}</span>
+<span id="cb237-6"><a href="#cb237-6" aria-hidden="true" tabindex="-1"></a><span class="fu">===================</span></span></code></pre></div>
</dd>
</dl>
</dd>
@@ -3684,8 +3739,8 @@ href="#slice">content slicing</a>.</p>
</dl>
</dd>
</dl>
-<h4 data-number="2.2.1.26" id="option-html"><span
-class="header-section-number">2.2.1.26</span> Option
+<h4 data-number="2.2.1.28" id="option-html"><span
+class="header-section-number">2.2.1.28</span> Option
<code>html</code></h4>
<dl>
<dt><code>html</code> (default value: <code>false</code>)</dt>
@@ -3714,33 +3769,33 @@ will be rendered as plain text.</p>
<h5 class="unnumbered" id="lua-module-example-9">Lua Module Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb237"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb237-1"><a href="#cb237-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
-<span id="cb237-2"><a href="#cb237-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span>
-<span id="cb237-3"><a href="#cb237-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\directlua</span>{</span>
-<span id="cb237-4"><a href="#cb237-4" aria-hidden="true" tabindex="-1"></a> local markdown = require(&quot;markdown&quot;)</span>
-<span id="cb237-5"><a href="#cb237-5" aria-hidden="true" tabindex="-1"></a> local convert = markdown.new()</span>
-<span id="cb237-6"><a href="#cb237-6" aria-hidden="true" tabindex="-1"></a> local newline = [[^^J^^J]]</span>
-<span id="cb237-7"><a href="#cb237-7" aria-hidden="true" tabindex="-1"></a> local input =</span>
-<span id="cb237-8"><a href="#cb237-8" aria-hidden="true" tabindex="-1"></a> &quot;&lt;div&gt;*There is no block tag support.*&lt;/div&gt;&quot; .. newline ..</span>
-<span id="cb237-9"><a href="#cb237-9" aria-hidden="true" tabindex="-1"></a> &quot;*There is no &lt;inline tag=&quot;tag&quot;&gt;&lt;/inline&gt; support.*&quot; .. newline ..</span>
-<span id="cb237-10"><a href="#cb237-10" aria-hidden="true" tabindex="-1"></a> &quot;_There is no &lt;!-- comment --&gt; support._&quot; .. newline ..</span>
-<span id="cb237-11"><a href="#cb237-11" aria-hidden="true" tabindex="-1"></a> &quot;_There is no &lt;? HTML instruction ?&gt; support._&quot;</span>
-<span id="cb237-12"><a href="#cb237-12" aria-hidden="true" tabindex="-1"></a> tex.sprint(convert(input)) }</span>
-<span id="cb237-13"><a href="#cb237-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\par</span></span>
-<span id="cb237-14"><a href="#cb237-14" aria-hidden="true" tabindex="-1"></a><span class="fu">\directlua</span>{</span>
-<span id="cb237-15"><a href="#cb237-15" aria-hidden="true" tabindex="-1"></a> local markdown = require(&quot;markdown&quot;)</span>
-<span id="cb237-16"><a href="#cb237-16" aria-hidden="true" tabindex="-1"></a> local convert = markdown.new({html = true})</span>
-<span id="cb237-17"><a href="#cb237-17" aria-hidden="true" tabindex="-1"></a> local input =</span>
-<span id="cb237-18"><a href="#cb237-18" aria-hidden="true" tabindex="-1"></a> &quot;&lt;div&gt;*There is block tag support.*&lt;/div&gt;&quot; .. newline ..</span>
-<span id="cb237-19"><a href="#cb237-19" aria-hidden="true" tabindex="-1"></a> &quot;*There is &lt;inline tag=&quot;tag&quot;&gt;&lt;/inline&gt; support.*&quot; .. newline ..</span>
-<span id="cb237-20"><a href="#cb237-20" aria-hidden="true" tabindex="-1"></a> &quot;_There is &lt;!-- comment --&gt; support._&quot; .. newline ..</span>
-<span id="cb237-21"><a href="#cb237-21" aria-hidden="true" tabindex="-1"></a> &quot;_There is &lt;? HTML instruction ?&gt; support._&quot;</span>
-<span id="cb237-22"><a href="#cb237-22" aria-hidden="true" tabindex="-1"></a> tex.sprint(convert(input)) }</span>
-<span id="cb237-23"><a href="#cb237-23" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
-<p>Then, invoke LuaTeX from the terminal:</p>
<div class="sourceCode" id="cb238"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb238-1"><a href="#cb238-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb238-1"><a href="#cb238-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
+<span id="cb238-2"><a href="#cb238-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span>
+<span id="cb238-3"><a href="#cb238-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\directlua</span>{</span>
+<span id="cb238-4"><a href="#cb238-4" aria-hidden="true" tabindex="-1"></a> local markdown = require(&quot;markdown&quot;)</span>
+<span id="cb238-5"><a href="#cb238-5" aria-hidden="true" tabindex="-1"></a> local convert = markdown.new()</span>
+<span id="cb238-6"><a href="#cb238-6" aria-hidden="true" tabindex="-1"></a> local newline = [[^^J^^J]]</span>
+<span id="cb238-7"><a href="#cb238-7" aria-hidden="true" tabindex="-1"></a> local input =</span>
+<span id="cb238-8"><a href="#cb238-8" aria-hidden="true" tabindex="-1"></a> &quot;&lt;div&gt;*There is no block tag support.*&lt;/div&gt;&quot; .. newline ..</span>
+<span id="cb238-9"><a href="#cb238-9" aria-hidden="true" tabindex="-1"></a> &quot;*There is no &lt;inline tag=&quot;tag&quot;&gt;&lt;/inline&gt; support.*&quot; .. newline ..</span>
+<span id="cb238-10"><a href="#cb238-10" aria-hidden="true" tabindex="-1"></a> &quot;_There is no &lt;!-- comment --&gt; support._&quot; .. newline ..</span>
+<span id="cb238-11"><a href="#cb238-11" aria-hidden="true" tabindex="-1"></a> &quot;_There is no &lt;? HTML instruction ?&gt; support._&quot;</span>
+<span id="cb238-12"><a href="#cb238-12" aria-hidden="true" tabindex="-1"></a> tex.sprint(convert(input)) }</span>
+<span id="cb238-13"><a href="#cb238-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\par</span></span>
+<span id="cb238-14"><a href="#cb238-14" aria-hidden="true" tabindex="-1"></a><span class="fu">\directlua</span>{</span>
+<span id="cb238-15"><a href="#cb238-15" aria-hidden="true" tabindex="-1"></a> local markdown = require(&quot;markdown&quot;)</span>
+<span id="cb238-16"><a href="#cb238-16" aria-hidden="true" tabindex="-1"></a> local convert = markdown.new({html = true})</span>
+<span id="cb238-17"><a href="#cb238-17" aria-hidden="true" tabindex="-1"></a> local input =</span>
+<span id="cb238-18"><a href="#cb238-18" aria-hidden="true" tabindex="-1"></a> &quot;&lt;div&gt;*There is block tag support.*&lt;/div&gt;&quot; .. newline ..</span>
+<span id="cb238-19"><a href="#cb238-19" aria-hidden="true" tabindex="-1"></a> &quot;*There is &lt;inline tag=&quot;tag&quot;&gt;&lt;/inline&gt; support.*&quot; .. newline ..</span>
+<span id="cb238-20"><a href="#cb238-20" aria-hidden="true" tabindex="-1"></a> &quot;_There is &lt;!-- comment --&gt; support._&quot; .. newline ..</span>
+<span id="cb238-21"><a href="#cb238-21" aria-hidden="true" tabindex="-1"></a> &quot;_There is &lt;? HTML instruction ?&gt; support._&quot;</span>
+<span id="cb238-22"><a href="#cb238-22" aria-hidden="true" tabindex="-1"></a> tex.sprint(convert(input)) }</span>
+<span id="cb238-23"><a href="#cb238-23" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
+<p>Then, invoke LuaTeX from the terminal:</p>
+<div class="sourceCode" id="cb239"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb239-1"><a href="#cb239-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -3753,27 +3808,27 @@ support.</p>
<h5 class="unnumbered" id="lua-cli-example-7">Lua CLI Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb239"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb239-1"><a href="#cb239-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
-<span id="cb239-2"><a href="#cb239-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span>
-<span id="cb239-3"><a href="#cb239-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> optionfalse</span>
-<span id="cb239-4"><a href="#cb239-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\par</span></span>
-<span id="cb239-5"><a href="#cb239-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> optiontrue</span>
-<span id="cb239-6"><a href="#cb239-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
+<div class="sourceCode" id="cb240"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb240-1"><a href="#cb240-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
+<span id="cb240-2"><a href="#cb240-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span>
+<span id="cb240-3"><a href="#cb240-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> optionfalse</span>
+<span id="cb240-4"><a href="#cb240-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\par</span></span>
+<span id="cb240-5"><a href="#cb240-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> optiontrue</span>
+<span id="cb240-6"><a href="#cb240-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
<p>Using a text editor, create a text document named
<code>content.md</code> with the following content:</p>
-<div class="sourceCode" id="cb240"><pre
-class="sourceCode html"><code class="sourceCode html"><span id="cb240-1"><a href="#cb240-1" aria-hidden="true" tabindex="-1"></a><span class="kw">&lt;div&gt;</span></span>
-<span id="cb240-2"><a href="#cb240-2" aria-hidden="true" tabindex="-1"></a>*Is there block tag support?*</span>
-<span id="cb240-3"><a href="#cb240-3" aria-hidden="true" tabindex="-1"></a><span class="kw">&lt;/div&gt;</span></span>
-<span id="cb240-4"><a href="#cb240-4" aria-hidden="true" tabindex="-1"></a>*Is there <span class="kw">&lt;inline</span> <span class="er">tag</span><span class="ot">=</span><span class="st">&quot;tag&quot;</span><span class="kw">&gt;&lt;/inline&gt;</span> support?*</span>
-<span id="cb240-5"><a href="#cb240-5" aria-hidden="true" tabindex="-1"></a>_Is there <span class="co">&lt;!-- comment --&gt;</span> support?_</span>
-<span id="cb240-6"><a href="#cb240-6" aria-hidden="true" tabindex="-1"></a>_Is there <span class="kw">&lt;?</span> HTML instruction <span class="kw">?&gt;</span> support?_</span></code></pre></div>
-<p>Next, invoke LuaTeX from the terminal:</p>
<div class="sourceCode" id="cb241"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb241-1"><a href="#cb241-1" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ <span class="at">--</span> content.md optionfalse.tex</span>
-<span id="cb241-2"><a href="#cb241-2" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ html=true <span class="at">--</span> content.md optiontrue.tex</span>
-<span id="cb241-3"><a href="#cb241-3" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
+class="sourceCode html"><code class="sourceCode html"><span id="cb241-1"><a href="#cb241-1" aria-hidden="true" tabindex="-1"></a><span class="kw">&lt;div&gt;</span></span>
+<span id="cb241-2"><a href="#cb241-2" aria-hidden="true" tabindex="-1"></a>*Is there block tag support?*</span>
+<span id="cb241-3"><a href="#cb241-3" aria-hidden="true" tabindex="-1"></a><span class="kw">&lt;/div&gt;</span></span>
+<span id="cb241-4"><a href="#cb241-4" aria-hidden="true" tabindex="-1"></a>*Is there <span class="kw">&lt;inline</span> <span class="er">tag</span><span class="ot">=</span><span class="st">&quot;tag&quot;</span><span class="kw">&gt;&lt;/inline&gt;</span> support?*</span>
+<span id="cb241-5"><a href="#cb241-5" aria-hidden="true" tabindex="-1"></a>_Is there <span class="co">&lt;!-- comment --&gt;</span> support?_</span>
+<span id="cb241-6"><a href="#cb241-6" aria-hidden="true" tabindex="-1"></a>_Is there <span class="kw">&lt;?</span> HTML instruction <span class="kw">?&gt;</span> support?_</span></code></pre></div>
+<p>Next, invoke LuaTeX from the terminal:</p>
+<div class="sourceCode" id="cb242"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb242-1"><a href="#cb242-1" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ <span class="at">--</span> content.md optionfalse.tex</span>
+<span id="cb242-2"><a href="#cb242-2" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ html=true <span class="at">--</span> content.md optiontrue.tex</span>
+<span id="cb242-3"><a href="#cb242-3" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
<p>where ⟨<em>CLI pathname</em>⟩ corresponds to the location of the Lua
CLI script file, such as
<code>~/texmf/scripts/markdown/markdown-cli.lua</code> on UN*X systems
@@ -3795,33 +3850,33 @@ contain the following text:</p>
class="tex">T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb242"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb242-1"><a href="#cb242-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
-<span id="cb242-2"><a href="#cb242-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span>
-<span id="cb242-3"><a href="#cb242-3" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb242-4"><a href="#cb242-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
-<span id="cb242-5"><a href="#cb242-5" aria-hidden="true" tabindex="-1"></a>&lt;div&gt;</span>
-<span id="cb242-6"><a href="#cb242-6" aria-hidden="true" tabindex="-1"></a>*There is no block tag support.*</span>
-<span id="cb242-7"><a href="#cb242-7" aria-hidden="true" tabindex="-1"></a>&lt;/div&gt;</span>
-<span id="cb242-8"><a href="#cb242-8" aria-hidden="true" tabindex="-1"></a>*There is no &lt;inline tag=&quot;tag&quot;&gt;&lt;/inline&gt; support.*</span>
-<span id="cb242-9"><a href="#cb242-9" aria-hidden="true" tabindex="-1"></a>_There is no &lt;!-- comment --&gt; support._</span>
-<span id="cb242-10"><a href="#cb242-10" aria-hidden="true" tabindex="-1"></a>_There is no &lt;? HTML instruction ?&gt; support._</span>
-<span id="cb242-11"><a href="#cb242-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
-<span id="cb242-12"><a href="#cb242-12" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb242-13"><a href="#cb242-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionHtml</span>{true}</span>
-<span id="cb242-14"><a href="#cb242-14" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
-<span id="cb242-15"><a href="#cb242-15" aria-hidden="true" tabindex="-1"></a>&lt;div&gt;</span>
-<span id="cb242-16"><a href="#cb242-16" aria-hidden="true" tabindex="-1"></a>*There is block tag support.*</span>
-<span id="cb242-17"><a href="#cb242-17" aria-hidden="true" tabindex="-1"></a>&lt;/div&gt;</span>
-<span id="cb242-18"><a href="#cb242-18" aria-hidden="true" tabindex="-1"></a>*There is &lt;inline tag=&quot;tag&quot;&gt;&lt;/inline&gt; support.*</span>
-<span id="cb242-19"><a href="#cb242-19" aria-hidden="true" tabindex="-1"></a>_There is &lt;!-- comment --&gt; support._</span>
-<span id="cb242-20"><a href="#cb242-20" aria-hidden="true" tabindex="-1"></a>_There is &lt;? HTML instruction ?&gt; support._</span>
-<span id="cb242-21"><a href="#cb242-21" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
-<span id="cb242-22"><a href="#cb242-22" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb242-23"><a href="#cb242-23" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
-<p>Next, invoke LuaTeX from the terminal:</p>
<div class="sourceCode" id="cb243"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb243-1"><a href="#cb243-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb243-1"><a href="#cb243-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
+<span id="cb243-2"><a href="#cb243-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span>
+<span id="cb243-3"><a href="#cb243-3" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb243-4"><a href="#cb243-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
+<span id="cb243-5"><a href="#cb243-5" aria-hidden="true" tabindex="-1"></a>&lt;div&gt;</span>
+<span id="cb243-6"><a href="#cb243-6" aria-hidden="true" tabindex="-1"></a>*There is no block tag support.*</span>
+<span id="cb243-7"><a href="#cb243-7" aria-hidden="true" tabindex="-1"></a>&lt;/div&gt;</span>
+<span id="cb243-8"><a href="#cb243-8" aria-hidden="true" tabindex="-1"></a>*There is no &lt;inline tag=&quot;tag&quot;&gt;&lt;/inline&gt; support.*</span>
+<span id="cb243-9"><a href="#cb243-9" aria-hidden="true" tabindex="-1"></a>_There is no &lt;!-- comment --&gt; support._</span>
+<span id="cb243-10"><a href="#cb243-10" aria-hidden="true" tabindex="-1"></a>_There is no &lt;? HTML instruction ?&gt; support._</span>
+<span id="cb243-11"><a href="#cb243-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
+<span id="cb243-12"><a href="#cb243-12" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb243-13"><a href="#cb243-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionHtml</span>{true}</span>
+<span id="cb243-14"><a href="#cb243-14" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
+<span id="cb243-15"><a href="#cb243-15" aria-hidden="true" tabindex="-1"></a>&lt;div&gt;</span>
+<span id="cb243-16"><a href="#cb243-16" aria-hidden="true" tabindex="-1"></a>*There is block tag support.*</span>
+<span id="cb243-17"><a href="#cb243-17" aria-hidden="true" tabindex="-1"></a>&lt;/div&gt;</span>
+<span id="cb243-18"><a href="#cb243-18" aria-hidden="true" tabindex="-1"></a>*There is &lt;inline tag=&quot;tag&quot;&gt;&lt;/inline&gt; support.*</span>
+<span id="cb243-19"><a href="#cb243-19" aria-hidden="true" tabindex="-1"></a>_There is &lt;!-- comment --&gt; support._</span>
+<span id="cb243-20"><a href="#cb243-20" aria-hidden="true" tabindex="-1"></a>_There is &lt;? HTML instruction ?&gt; support._</span>
+<span id="cb243-21"><a href="#cb243-21" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
+<span id="cb243-22"><a href="#cb243-22" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb243-23"><a href="#cb243-23" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
+<p>Next, invoke LuaTeX from the terminal:</p>
+<div class="sourceCode" id="cb244"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb244-1"><a href="#cb244-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -3831,37 +3886,37 @@ comment –&gt; support. There is no &lt;? HTML instruction ?&gt;
support.</p>
<p>There is support. There is support. There is support.</p>
</blockquote>
-<h5 class="unnumbered" id="latex-example-21"><span
+<h5 class="unnumbered" id="latex-example-23"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb244"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb244-1"><a href="#cb244-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb244-2"><a href="#cb244-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span>
-<span id="cb244-3"><a href="#cb244-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb244-4"><a href="#cb244-4" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb244-5"><a href="#cb244-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb244-6"><a href="#cb244-6" aria-hidden="true" tabindex="-1"></a>&lt;div&gt;</span>
-<span id="cb244-7"><a href="#cb244-7" aria-hidden="true" tabindex="-1"></a>*There is no block tag support.*</span>
-<span id="cb244-8"><a href="#cb244-8" aria-hidden="true" tabindex="-1"></a>&lt;/div&gt;</span>
-<span id="cb244-9"><a href="#cb244-9" aria-hidden="true" tabindex="-1"></a>*There is no &lt;inline tag=&quot;tag&quot;&gt;&lt;/inline&gt; support.*</span>
-<span id="cb244-10"><a href="#cb244-10" aria-hidden="true" tabindex="-1"></a>_There is no &lt;!-- comment --&gt; support._</span>
-<span id="cb244-11"><a href="#cb244-11" aria-hidden="true" tabindex="-1"></a>_There is no &lt;? HTML instruction ?&gt; support._</span>
-<span id="cb244-12"><a href="#cb244-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb244-13"><a href="#cb244-13" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb244-14"><a href="#cb244-14" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{html}</span>
-<span id="cb244-15"><a href="#cb244-15" aria-hidden="true" tabindex="-1"></a>&lt;div&gt;</span>
-<span id="cb244-16"><a href="#cb244-16" aria-hidden="true" tabindex="-1"></a>*There is block tag support.*</span>
-<span id="cb244-17"><a href="#cb244-17" aria-hidden="true" tabindex="-1"></a>&lt;/div&gt;</span>
-<span id="cb244-18"><a href="#cb244-18" aria-hidden="true" tabindex="-1"></a>*There is &lt;inline tag=&quot;tag&quot;&gt;&lt;/inline&gt; support.*</span>
-<span id="cb244-19"><a href="#cb244-19" aria-hidden="true" tabindex="-1"></a>_There is &lt;!-- comment --&gt; support._</span>
-<span id="cb244-20"><a href="#cb244-20" aria-hidden="true" tabindex="-1"></a>_There is &lt;? HTML instruction ?&gt; support._</span>
-<span id="cb244-21"><a href="#cb244-21" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span>
-<span id="cb244-22"><a href="#cb244-22" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb244-23"><a href="#cb244-23" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
-<p>Next, invoke LuaTeX from the terminal:</p>
<div class="sourceCode" id="cb245"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb245-1"><a href="#cb245-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb245-1"><a href="#cb245-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb245-2"><a href="#cb245-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span>
+<span id="cb245-3"><a href="#cb245-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb245-4"><a href="#cb245-4" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb245-5"><a href="#cb245-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb245-6"><a href="#cb245-6" aria-hidden="true" tabindex="-1"></a>&lt;div&gt;</span>
+<span id="cb245-7"><a href="#cb245-7" aria-hidden="true" tabindex="-1"></a>*There is no block tag support.*</span>
+<span id="cb245-8"><a href="#cb245-8" aria-hidden="true" tabindex="-1"></a>&lt;/div&gt;</span>
+<span id="cb245-9"><a href="#cb245-9" aria-hidden="true" tabindex="-1"></a>*There is no &lt;inline tag=&quot;tag&quot;&gt;&lt;/inline&gt; support.*</span>
+<span id="cb245-10"><a href="#cb245-10" aria-hidden="true" tabindex="-1"></a>_There is no &lt;!-- comment --&gt; support._</span>
+<span id="cb245-11"><a href="#cb245-11" aria-hidden="true" tabindex="-1"></a>_There is no &lt;? HTML instruction ?&gt; support._</span>
+<span id="cb245-12"><a href="#cb245-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb245-13"><a href="#cb245-13" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb245-14"><a href="#cb245-14" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{html}</span>
+<span id="cb245-15"><a href="#cb245-15" aria-hidden="true" tabindex="-1"></a>&lt;div&gt;</span>
+<span id="cb245-16"><a href="#cb245-16" aria-hidden="true" tabindex="-1"></a>*There is block tag support.*</span>
+<span id="cb245-17"><a href="#cb245-17" aria-hidden="true" tabindex="-1"></a>&lt;/div&gt;</span>
+<span id="cb245-18"><a href="#cb245-18" aria-hidden="true" tabindex="-1"></a>*There is &lt;inline tag=&quot;tag&quot;&gt;&lt;/inline&gt; support.*</span>
+<span id="cb245-19"><a href="#cb245-19" aria-hidden="true" tabindex="-1"></a>_There is &lt;!-- comment --&gt; support._</span>
+<span id="cb245-20"><a href="#cb245-20" aria-hidden="true" tabindex="-1"></a>_There is &lt;? HTML instruction ?&gt; support._</span>
+<span id="cb245-21"><a href="#cb245-21" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span>
+<span id="cb245-22"><a href="#cb245-22" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb245-23"><a href="#cb245-23" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<p>Next, invoke LuaTeX from the terminal:</p>
+<div class="sourceCode" id="cb246"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb246-1"><a href="#cb246-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -3871,37 +3926,37 @@ comment –&gt; support. There is no &lt;? HTML instruction ?&gt;
support.</p>
<p>There is support. There is support. There is support.</p>
</blockquote>
-<h5 class="unnumbered" id="context-example-15">Con<span
+<h5 class="unnumbered" id="context-example-14">Con<span
class="tex">T<sub>e</sub>X</span>t Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb246"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb246-1"><a href="#cb246-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
-<span id="cb246-2"><a href="#cb246-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
-<span id="cb246-3"><a href="#cb246-3" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb246-4"><a href="#cb246-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb246-5"><a href="#cb246-5" aria-hidden="true" tabindex="-1"></a>&lt;div&gt;</span>
-<span id="cb246-6"><a href="#cb246-6" aria-hidden="true" tabindex="-1"></a>*There is no block tag support.*</span>
-<span id="cb246-7"><a href="#cb246-7" aria-hidden="true" tabindex="-1"></a>&lt;/div&gt;</span>
-<span id="cb246-8"><a href="#cb246-8" aria-hidden="true" tabindex="-1"></a>*There is no &lt;inline tag=&quot;tag&quot;&gt;&lt;/inline&gt; support.*</span>
-<span id="cb246-9"><a href="#cb246-9" aria-hidden="true" tabindex="-1"></a>_There is no &lt;!-- comment --&gt; support._</span>
-<span id="cb246-10"><a href="#cb246-10" aria-hidden="true" tabindex="-1"></a>_There is no &lt;? HTML instruction ?&gt; support._</span>
-<span id="cb246-11"><a href="#cb246-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb246-12"><a href="#cb246-12" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb246-13"><a href="#cb246-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[html = yes]</span>
-<span id="cb246-14"><a href="#cb246-14" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb246-15"><a href="#cb246-15" aria-hidden="true" tabindex="-1"></a>&lt;div&gt;</span>
-<span id="cb246-16"><a href="#cb246-16" aria-hidden="true" tabindex="-1"></a>*There is block tag support.*</span>
-<span id="cb246-17"><a href="#cb246-17" aria-hidden="true" tabindex="-1"></a>&lt;/div&gt;</span>
-<span id="cb246-18"><a href="#cb246-18" aria-hidden="true" tabindex="-1"></a>*There is &lt;inline tag=&quot;tag&quot;&gt;&lt;/inline&gt; support.*</span>
-<span id="cb246-19"><a href="#cb246-19" aria-hidden="true" tabindex="-1"></a>_There is &lt;!-- comment --&gt; support._</span>
-<span id="cb246-20"><a href="#cb246-20" aria-hidden="true" tabindex="-1"></a>_There is &lt;? HTML instruction ?&gt; support._</span>
-<span id="cb246-21"><a href="#cb246-21" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb246-22"><a href="#cb246-22" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb246-23"><a href="#cb246-23" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
-<p>Next, invoke LuaTeX from the terminal:</p>
<div class="sourceCode" id="cb247"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb247-1"><a href="#cb247-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb247-1"><a href="#cb247-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
+<span id="cb247-2"><a href="#cb247-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
+<span id="cb247-3"><a href="#cb247-3" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb247-4"><a href="#cb247-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb247-5"><a href="#cb247-5" aria-hidden="true" tabindex="-1"></a>&lt;div&gt;</span>
+<span id="cb247-6"><a href="#cb247-6" aria-hidden="true" tabindex="-1"></a>*There is no block tag support.*</span>
+<span id="cb247-7"><a href="#cb247-7" aria-hidden="true" tabindex="-1"></a>&lt;/div&gt;</span>
+<span id="cb247-8"><a href="#cb247-8" aria-hidden="true" tabindex="-1"></a>*There is no &lt;inline tag=&quot;tag&quot;&gt;&lt;/inline&gt; support.*</span>
+<span id="cb247-9"><a href="#cb247-9" aria-hidden="true" tabindex="-1"></a>_There is no &lt;!-- comment --&gt; support._</span>
+<span id="cb247-10"><a href="#cb247-10" aria-hidden="true" tabindex="-1"></a>_There is no &lt;? HTML instruction ?&gt; support._</span>
+<span id="cb247-11"><a href="#cb247-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb247-12"><a href="#cb247-12" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb247-13"><a href="#cb247-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[html = yes]</span>
+<span id="cb247-14"><a href="#cb247-14" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb247-15"><a href="#cb247-15" aria-hidden="true" tabindex="-1"></a>&lt;div&gt;</span>
+<span id="cb247-16"><a href="#cb247-16" aria-hidden="true" tabindex="-1"></a>*There is block tag support.*</span>
+<span id="cb247-17"><a href="#cb247-17" aria-hidden="true" tabindex="-1"></a>&lt;/div&gt;</span>
+<span id="cb247-18"><a href="#cb247-18" aria-hidden="true" tabindex="-1"></a>*There is &lt;inline tag=&quot;tag&quot;&gt;&lt;/inline&gt; support.*</span>
+<span id="cb247-19"><a href="#cb247-19" aria-hidden="true" tabindex="-1"></a>_There is &lt;!-- comment --&gt; support._</span>
+<span id="cb247-20"><a href="#cb247-20" aria-hidden="true" tabindex="-1"></a>_There is &lt;? HTML instruction ?&gt; support._</span>
+<span id="cb247-21"><a href="#cb247-21" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb247-22"><a href="#cb247-22" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb247-23"><a href="#cb247-23" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
+<p>Next, invoke LuaTeX from the terminal:</p>
+<div class="sourceCode" id="cb248"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb248-1"><a href="#cb248-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -3911,8 +3966,8 @@ comment –&gt; support. There is no &lt;? HTML instruction ?&gt;
support.</p>
<p>There is support. There is support. There is support.</p>
</blockquote>
-<h4 data-number="2.2.1.27" id="option-hybrid"><span
-class="header-section-number">2.2.1.27</span> Option
+<h4 data-number="2.2.1.29" id="option-hybrid"><span
+class="header-section-number">2.2.1.29</span> Option
<code>hybrid</code></h4>
<dl>
<dt><code>hybrid</code> (default value: <code>false</code>)</dt>
@@ -3948,27 +4003,27 @@ prepared with this package in mind.</p>
Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb248"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb248-1"><a href="#cb248-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
-<span id="cb248-2"><a href="#cb248-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span>
-<span id="cb248-3"><a href="#cb248-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\directlua</span>{</span>
-<span id="cb248-4"><a href="#cb248-4" aria-hidden="true" tabindex="-1"></a> local markdown = require(&quot;markdown&quot;)</span>
-<span id="cb248-5"><a href="#cb248-5" aria-hidden="true" tabindex="-1"></a> local input, convert_safe, convert_unsafe, paragraph</span>
-<span id="cb248-6"><a href="#cb248-6" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb248-7"><a href="#cb248-7" aria-hidden="true" tabindex="-1"></a> input = [[<span class="ss">$</span><span class="sc">\string\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.]]</span>
-<span id="cb248-8"><a href="#cb248-8" aria-hidden="true" tabindex="-1"></a> convert_safe = markdown.new()</span>
-<span id="cb248-9"><a href="#cb248-9" aria-hidden="true" tabindex="-1"></a> convert_unsafe = markdown.new({hybrid = true})</span>
-<span id="cb248-10"><a href="#cb248-10" aria-hidden="true" tabindex="-1"></a> paragraph = [[<span class="fu">\par</span>]]</span>
-<span id="cb248-11"><a href="#cb248-11" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb248-12"><a href="#cb248-12" aria-hidden="true" tabindex="-1"></a> tex.sprint(</span>
-<span id="cb248-13"><a href="#cb248-13" aria-hidden="true" tabindex="-1"></a> convert_safe(input) .. paragraph ..</span>
-<span id="cb248-14"><a href="#cb248-14" aria-hidden="true" tabindex="-1"></a> convert_unsafe(input)</span>
-<span id="cb248-15"><a href="#cb248-15" aria-hidden="true" tabindex="-1"></a> )</span>
-<span id="cb248-16"><a href="#cb248-16" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb248-17"><a href="#cb248-17" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
-<p>Then, invoke LuaTeX from the terminal:</p>
<div class="sourceCode" id="cb249"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb249-1"><a href="#cb249-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb249-1"><a href="#cb249-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
+<span id="cb249-2"><a href="#cb249-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span>
+<span id="cb249-3"><a href="#cb249-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\directlua</span>{</span>
+<span id="cb249-4"><a href="#cb249-4" aria-hidden="true" tabindex="-1"></a> local markdown = require(&quot;markdown&quot;)</span>
+<span id="cb249-5"><a href="#cb249-5" aria-hidden="true" tabindex="-1"></a> local input, convert_safe, convert_unsafe, paragraph</span>
+<span id="cb249-6"><a href="#cb249-6" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb249-7"><a href="#cb249-7" aria-hidden="true" tabindex="-1"></a> input = [[<span class="ss">$</span><span class="sc">\string\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.]]</span>
+<span id="cb249-8"><a href="#cb249-8" aria-hidden="true" tabindex="-1"></a> convert_safe = markdown.new()</span>
+<span id="cb249-9"><a href="#cb249-9" aria-hidden="true" tabindex="-1"></a> convert_unsafe = markdown.new({hybrid = true})</span>
+<span id="cb249-10"><a href="#cb249-10" aria-hidden="true" tabindex="-1"></a> paragraph = [[<span class="fu">\par</span>]]</span>
+<span id="cb249-11"><a href="#cb249-11" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb249-12"><a href="#cb249-12" aria-hidden="true" tabindex="-1"></a> tex.sprint(</span>
+<span id="cb249-13"><a href="#cb249-13" aria-hidden="true" tabindex="-1"></a> convert_safe(input) .. paragraph ..</span>
+<span id="cb249-14"><a href="#cb249-14" aria-hidden="true" tabindex="-1"></a> convert_unsafe(input)</span>
+<span id="cb249-15"><a href="#cb249-15" aria-hidden="true" tabindex="-1"></a> )</span>
+<span id="cb249-16"><a href="#cb249-16" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb249-17"><a href="#cb249-17" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
+<p>Then, invoke LuaTeX from the terminal:</p>
+<div class="sourceCode" id="cb250"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb250-1"><a href="#cb250-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -3978,25 +4033,25 @@ contain the following text:</p>
<h5 class="unnumbered" id="lua-cli-example-8">Lua CLI Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb250"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb250-1"><a href="#cb250-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
-<span id="cb250-2"><a href="#cb250-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span>
-<span id="cb250-3"><a href="#cb250-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> optionfalse</span>
-<span id="cb250-4"><a href="#cb250-4" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb250-5"><a href="#cb250-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\begingroup</span></span>
-<span id="cb250-6"><a href="#cb250-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\catcode</span>`<span class="fu">\%</span>=12</span>
-<span id="cb250-7"><a href="#cb250-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> optiontrue</span>
-<span id="cb250-8"><a href="#cb250-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\endgroup</span></span>
-<span id="cb250-9"><a href="#cb250-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
+<div class="sourceCode" id="cb251"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb251-1"><a href="#cb251-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
+<span id="cb251-2"><a href="#cb251-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span>
+<span id="cb251-3"><a href="#cb251-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> optionfalse</span>
+<span id="cb251-4"><a href="#cb251-4" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb251-5"><a href="#cb251-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\begingroup</span></span>
+<span id="cb251-6"><a href="#cb251-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\catcode</span>`<span class="fu">\%</span>=12</span>
+<span id="cb251-7"><a href="#cb251-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> optiontrue</span>
+<span id="cb251-8"><a href="#cb251-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\endgroup</span></span>
+<span id="cb251-9"><a href="#cb251-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
<p>Using a text editor, create a text document named
<code>content.md</code> with the following content:</p>
-<div class="sourceCode" id="cb251"><pre
-class="sourceCode md"><code class="sourceCode markdown"><span id="cb251-1"><a href="#cb251-1" aria-hidden="true" tabindex="-1"></a>$\sqrt{-1}$ *equals* $i$.</span></code></pre></div>
-<p>Next, invoke LuaTeX from the terminal:</p>
<div class="sourceCode" id="cb252"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb252-1"><a href="#cb252-1" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ <span class="at">--</span> content.md optionfalse.tex</span>
-<span id="cb252-2"><a href="#cb252-2" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ hybrid=true <span class="at">--</span> content.md optiontrue.tex</span>
-<span id="cb252-3"><a href="#cb252-3" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
+class="sourceCode md"><code class="sourceCode markdown"><span id="cb252-1"><a href="#cb252-1" aria-hidden="true" tabindex="-1"></a>$\sqrt{-1}$ *equals* $i$.</span></code></pre></div>
+<p>Next, invoke LuaTeX from the terminal:</p>
+<div class="sourceCode" id="cb253"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb253-1"><a href="#cb253-1" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ <span class="at">--</span> content.md optionfalse.tex</span>
+<span id="cb253-2"><a href="#cb253-2" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ hybrid=true <span class="at">--</span> content.md optiontrue.tex</span>
+<span id="cb253-3"><a href="#cb253-3" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
<p>where ⟨<em>CLI pathname</em>⟩ corresponds to the location of the Lua
CLI script file, such as
<code>~/texmf/scripts/markdown/markdown-cli.lua</code> on UN*X systems
@@ -4016,85 +4071,85 @@ contain the following text:</p>
class="tex">T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb253"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb253-1"><a href="#cb253-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
-<span id="cb253-2"><a href="#cb253-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span>
-<span id="cb253-3"><a href="#cb253-3" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb253-4"><a href="#cb253-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
-<span id="cb253-5"><a href="#cb253-5" aria-hidden="true" tabindex="-1"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</span>
-<span id="cb253-6"><a href="#cb253-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
-<span id="cb253-7"><a href="#cb253-7" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb253-8"><a href="#cb253-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionHybrid</span>{true}</span>
-<span id="cb253-9"><a href="#cb253-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
-<span id="cb253-10"><a href="#cb253-10" aria-hidden="true" tabindex="-1"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</span>
-<span id="cb253-11"><a href="#cb253-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
-<span id="cb253-12"><a href="#cb253-12" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb253-13"><a href="#cb253-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
-<p>Next, invoke LuaTeX from the terminal:</p>
<div class="sourceCode" id="cb254"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb254-1"><a href="#cb254-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb254-1"><a href="#cb254-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
+<span id="cb254-2"><a href="#cb254-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span>
+<span id="cb254-3"><a href="#cb254-3" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb254-4"><a href="#cb254-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
+<span id="cb254-5"><a href="#cb254-5" aria-hidden="true" tabindex="-1"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</span>
+<span id="cb254-6"><a href="#cb254-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
+<span id="cb254-7"><a href="#cb254-7" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb254-8"><a href="#cb254-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionHybrid</span>{true}</span>
+<span id="cb254-9"><a href="#cb254-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
+<span id="cb254-10"><a href="#cb254-10" aria-hidden="true" tabindex="-1"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</span>
+<span id="cb254-11"><a href="#cb254-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
+<span id="cb254-12"><a href="#cb254-12" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb254-13"><a href="#cb254-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
+<p>Next, invoke LuaTeX from the terminal:</p>
+<div class="sourceCode" id="cb255"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb255-1"><a href="#cb255-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
<p>$\sqrt {-1}$ <em>equals</em> $i$.</p>
<p>√-̅1̅ <em>equals</em> <span class="math inline"><em>i</em></span>.</p>
</blockquote>
-<h5 class="unnumbered" id="latex-example-22"><span
+<h5 class="unnumbered" id="latex-example-24"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb255"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb255-1"><a href="#cb255-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb255-2"><a href="#cb255-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span>
-<span id="cb255-3"><a href="#cb255-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb255-4"><a href="#cb255-4" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb255-5"><a href="#cb255-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb255-6"><a href="#cb255-6" aria-hidden="true" tabindex="-1"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</span>
-<span id="cb255-7"><a href="#cb255-7" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb255-8"><a href="#cb255-8" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb255-9"><a href="#cb255-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{hybrid}</span>
-<span id="cb255-10"><a href="#cb255-10" aria-hidden="true" tabindex="-1"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</span>
-<span id="cb255-11"><a href="#cb255-11" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span>
-<span id="cb255-12"><a href="#cb255-12" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb255-13"><a href="#cb255-13" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
-<p>Next, invoke LuaTeX from the terminal:</p>
<div class="sourceCode" id="cb256"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb256-1"><a href="#cb256-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb256-1"><a href="#cb256-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb256-2"><a href="#cb256-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span>
+<span id="cb256-3"><a href="#cb256-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb256-4"><a href="#cb256-4" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb256-5"><a href="#cb256-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb256-6"><a href="#cb256-6" aria-hidden="true" tabindex="-1"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</span>
+<span id="cb256-7"><a href="#cb256-7" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb256-8"><a href="#cb256-8" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb256-9"><a href="#cb256-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{hybrid}</span>
+<span id="cb256-10"><a href="#cb256-10" aria-hidden="true" tabindex="-1"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</span>
+<span id="cb256-11"><a href="#cb256-11" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span>
+<span id="cb256-12"><a href="#cb256-12" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb256-13"><a href="#cb256-13" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<p>Next, invoke LuaTeX from the terminal:</p>
+<div class="sourceCode" id="cb257"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb257-1"><a href="#cb257-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
<p>$\sqrt {-1}$ <em>equals</em> $i$.</p>
<p>√-̅1̅ <em>equals</em> <span class="math inline"><em>i</em></span>.</p>
</blockquote>
-<h5 class="unnumbered" id="context-example-16">Con<span
+<h5 class="unnumbered" id="context-example-15">Con<span
class="tex">T<sub>e</sub>X</span>t Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb257"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb257-1"><a href="#cb257-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
-<span id="cb257-2"><a href="#cb257-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
-<span id="cb257-3"><a href="#cb257-3" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb257-4"><a href="#cb257-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb257-5"><a href="#cb257-5" aria-hidden="true" tabindex="-1"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</span>
-<span id="cb257-6"><a href="#cb257-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb257-7"><a href="#cb257-7" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb257-8"><a href="#cb257-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[hybrid = yes]</span>
-<span id="cb257-9"><a href="#cb257-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb257-10"><a href="#cb257-10" aria-hidden="true" tabindex="-1"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</span>
-<span id="cb257-11"><a href="#cb257-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb257-12"><a href="#cb257-12" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb257-13"><a href="#cb257-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
-<p>Next, invoke LuaTeX from the terminal:</p>
<div class="sourceCode" id="cb258"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb258-1"><a href="#cb258-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb258-1"><a href="#cb258-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
+<span id="cb258-2"><a href="#cb258-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
+<span id="cb258-3"><a href="#cb258-3" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb258-4"><a href="#cb258-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb258-5"><a href="#cb258-5" aria-hidden="true" tabindex="-1"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</span>
+<span id="cb258-6"><a href="#cb258-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb258-7"><a href="#cb258-7" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb258-8"><a href="#cb258-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[hybrid = yes]</span>
+<span id="cb258-9"><a href="#cb258-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb258-10"><a href="#cb258-10" aria-hidden="true" tabindex="-1"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</span>
+<span id="cb258-11"><a href="#cb258-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb258-12"><a href="#cb258-12" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb258-13"><a href="#cb258-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
+<p>Next, invoke LuaTeX from the terminal:</p>
+<div class="sourceCode" id="cb259"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb259-1"><a href="#cb259-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
<p>$\sqrt {-1}$ <em>equals</em> $i$.</p>
<p>√-̅1̅ <em>equals</em> <span class="math inline"><em>i</em></span>.</p>
</blockquote>
-<h4 data-number="2.2.1.28" id="option-inlinenotes"><span
-class="header-section-number">2.2.1.28</span> Option
+<h4 data-number="2.2.1.30" id="option-inlinenotes"><span
+class="header-section-number">2.2.1.30</span> Option
<code>inlineNotes</code></h4>
<dl>
<dt><code>inlineNotes</code> (default value: <code>false</code>)</dt>
@@ -4103,10 +4158,10 @@ class="header-section-number">2.2.1.28</span> Option
<dt>true</dt>
<dd>
<p>Enable the Pandoc inline note syntax extension:</p>
-<div class="sourceCode" id="cb259"><pre
-class="sourceCode md"><code class="sourceCode markdown"><span id="cb259-1"><a href="#cb259-1" aria-hidden="true" tabindex="-1"></a>Here is an inline note.^[Inlines notes are easier to</span>
-<span id="cb259-2"><a href="#cb259-2" aria-hidden="true" tabindex="-1"></a>write, since you don&#39;t have to pick an identifier and</span>
-<span id="cb259-3"><a href="#cb259-3" aria-hidden="true" tabindex="-1"></a>move down to type the note.]</span></code></pre></div>
+<div class="sourceCode" id="cb260"><pre
+class="sourceCode md"><code class="sourceCode markdown"><span id="cb260-1"><a href="#cb260-1" aria-hidden="true" tabindex="-1"></a>Here is an inline note.^[Inlines notes are easier to</span>
+<span id="cb260-2"><a href="#cb260-2" aria-hidden="true" tabindex="-1"></a>write, since you don&#39;t have to pick an identifier and</span>
+<span id="cb260-3"><a href="#cb260-3" aria-hidden="true" tabindex="-1"></a>move down to type the note.]</span></code></pre></div>
</dd>
</dl>
</dd>
@@ -4119,54 +4174,54 @@ class="sourceCode md"><code class="sourceCode markdown"><span id="cb259-1"><a hr
</dl>
</dd>
</dl>
-<h5 class="unnumbered" id="latex-example-23"><span
+<h5 class="unnumbered" id="latex-example-25"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb260"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb260-1"><a href="#cb260-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb260-2"><a href="#cb260-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[inlineNotes]{<span class="ex">markdown</span>}</span>
-<span id="cb260-3"><a href="#cb260-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb260-4"><a href="#cb260-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb260-5"><a href="#cb260-5" aria-hidden="true" tabindex="-1"></a>Here is an inline note.^[Inlines notes are easier to</span>
-<span id="cb260-6"><a href="#cb260-6" aria-hidden="true" tabindex="-1"></a>write, since you don&#39;t have to pick an identifier and</span>
-<span id="cb260-7"><a href="#cb260-7" aria-hidden="true" tabindex="-1"></a>move down to type the note.]</span>
-<span id="cb260-8"><a href="#cb260-8" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb260-9"><a href="#cb260-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
-<p>Next, invoke LuaTeX from the terminal:</p>
<div class="sourceCode" id="cb261"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb261-1"><a href="#cb261-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb261-1"><a href="#cb261-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb261-2"><a href="#cb261-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[inlineNotes]{<span class="ex">markdown</span>}</span>
+<span id="cb261-3"><a href="#cb261-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb261-4"><a href="#cb261-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb261-5"><a href="#cb261-5" aria-hidden="true" tabindex="-1"></a>Here is an inline note.^[Inlines notes are easier to</span>
+<span id="cb261-6"><a href="#cb261-6" aria-hidden="true" tabindex="-1"></a>write, since you don&#39;t have to pick an identifier and</span>
+<span id="cb261-7"><a href="#cb261-7" aria-hidden="true" tabindex="-1"></a>move down to type the note.]</span>
+<span id="cb261-8"><a href="#cb261-8" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb261-9"><a href="#cb261-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<p>Next, invoke LuaTeX from the terminal:</p>
+<div class="sourceCode" id="cb262"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb262-1"><a href="#cb262-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
-<p>Here is an inline note.<a href="#fn5" class="footnote-ref"
-id="fnref5" role="doc-noteref"><sup>5</sup></a></p>
+<p>Here is an inline note.<a href="#fn1" class="footnote-ref"
+id="fnref1" role="doc-noteref"><sup>1</sup></a></p>
</blockquote>
-<h5 class="unnumbered" id="context-example-17">Con<span
+<h5 class="unnumbered" id="context-example-16">Con<span
class="tex">T<sub>e</sub>X</span>t Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb262"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb262-1"><a href="#cb262-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
-<span id="cb262-2"><a href="#cb262-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[inlineNotes = yes]</span>
-<span id="cb262-3"><a href="#cb262-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
-<span id="cb262-4"><a href="#cb262-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb262-5"><a href="#cb262-5" aria-hidden="true" tabindex="-1"></a>Here is an inline note.^[Inlines notes are easier to</span>
-<span id="cb262-6"><a href="#cb262-6" aria-hidden="true" tabindex="-1"></a>write, since you don&#39;t have to pick an identifier and</span>
-<span id="cb262-7"><a href="#cb262-7" aria-hidden="true" tabindex="-1"></a>move down to type the note.]</span>
-<span id="cb262-8"><a href="#cb262-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb262-9"><a href="#cb262-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
-<p>Next, invoke LuaTeX from the terminal:</p>
<div class="sourceCode" id="cb263"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb263-1"><a href="#cb263-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb263-1"><a href="#cb263-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
+<span id="cb263-2"><a href="#cb263-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[inlineNotes = yes]</span>
+<span id="cb263-3"><a href="#cb263-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
+<span id="cb263-4"><a href="#cb263-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb263-5"><a href="#cb263-5" aria-hidden="true" tabindex="-1"></a>Here is an inline note.^[Inlines notes are easier to</span>
+<span id="cb263-6"><a href="#cb263-6" aria-hidden="true" tabindex="-1"></a>write, since you don&#39;t have to pick an identifier and</span>
+<span id="cb263-7"><a href="#cb263-7" aria-hidden="true" tabindex="-1"></a>move down to type the note.]</span>
+<span id="cb263-8"><a href="#cb263-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb263-9"><a href="#cb263-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
+<p>Next, invoke LuaTeX from the terminal:</p>
+<div class="sourceCode" id="cb264"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb264-1"><a href="#cb264-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
-<p>Here is an inline note.<a href="#fn6" class="footnote-ref"
-id="fnref6" role="doc-noteref"><sup>6</sup></a></p>
+<p>Here is an inline note.<a href="#fn2" class="footnote-ref"
+id="fnref2" role="doc-noteref"><sup>2</sup></a></p>
</blockquote>
-<h4 data-number="2.2.1.29" id="option-jekylldata"><span
-class="header-section-number">2.2.1.29</span> Option
+<h4 data-number="2.2.1.31" id="option-jekylldata"><span
+class="header-section-number">2.2.1.31</span> Option
<code>jekyllData</code></h4>
<dl>
<dt><code>jekyllData</code> (default value: <code>false</code>)</dt>
@@ -4176,18 +4231,18 @@ class="header-section-number">2.2.1.29</span> Option
<dd>
<p>Enable the Pandoc <code>yaml_metadata_block</code> syntax extension
for entering metadata in <abbr>yaml</abbr>:</p>
-<div class="sourceCode" id="cb264"><pre
-class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb264-1"><a href="#cb264-1" aria-hidden="true" tabindex="-1"></a><span class="pp">---</span></span>
-<span id="cb264-2"><a href="#cb264-2" aria-hidden="true" tabindex="-1"></a><span class="fu">title</span><span class="kw">:</span><span class="at"> </span><span class="st">&#39;This is the title: it contains a colon&#39;</span></span>
-<span id="cb264-3"><a href="#cb264-3" aria-hidden="true" tabindex="-1"></a><span class="fu">author</span><span class="kw">:</span></span>
-<span id="cb264-4"><a href="#cb264-4" aria-hidden="true" tabindex="-1"></a><span class="kw">-</span><span class="at"> Author One</span></span>
-<span id="cb264-5"><a href="#cb264-5" aria-hidden="true" tabindex="-1"></a><span class="kw">-</span><span class="at"> Author Two</span></span>
-<span id="cb264-6"><a href="#cb264-6" aria-hidden="true" tabindex="-1"></a><span class="fu">keywords</span><span class="kw">:</span><span class="at"> </span><span class="kw">[</span><span class="at">nothing</span><span class="kw">,</span><span class="at"> nothingness</span><span class="kw">]</span></span>
-<span id="cb264-7"><a href="#cb264-7" aria-hidden="true" tabindex="-1"></a><span class="fu">abstract</span><span class="kw">: </span><span class="ch">|</span></span>
-<span id="cb264-8"><a href="#cb264-8" aria-hidden="true" tabindex="-1"></a> This is the abstract.</span>
-<span id="cb264-9"><a href="#cb264-9" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb264-10"><a href="#cb264-10" aria-hidden="true" tabindex="-1"></a> It consists of two paragraphs.</span>
-<span id="cb264-11"><a href="#cb264-11" aria-hidden="true" tabindex="-1"></a><span class="pp">---</span></span></code></pre></div>
+<div class="sourceCode" id="cb265"><pre
+class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb265-1"><a href="#cb265-1" aria-hidden="true" tabindex="-1"></a><span class="pp">---</span></span>
+<span id="cb265-2"><a href="#cb265-2" aria-hidden="true" tabindex="-1"></a><span class="fu">title</span><span class="kw">:</span><span class="at"> </span><span class="st">&#39;This is the title: it contains a colon&#39;</span></span>
+<span id="cb265-3"><a href="#cb265-3" aria-hidden="true" tabindex="-1"></a><span class="fu">author</span><span class="kw">:</span></span>
+<span id="cb265-4"><a href="#cb265-4" aria-hidden="true" tabindex="-1"></a><span class="kw">-</span><span class="at"> Author One</span></span>
+<span id="cb265-5"><a href="#cb265-5" aria-hidden="true" tabindex="-1"></a><span class="kw">-</span><span class="at"> Author Two</span></span>
+<span id="cb265-6"><a href="#cb265-6" aria-hidden="true" tabindex="-1"></a><span class="fu">keywords</span><span class="kw">:</span><span class="at"> </span><span class="kw">[</span><span class="at">nothing</span><span class="kw">,</span><span class="at"> nothingness</span><span class="kw">]</span></span>
+<span id="cb265-7"><a href="#cb265-7" aria-hidden="true" tabindex="-1"></a><span class="fu">abstract</span><span class="kw">: </span><span class="ch">|</span></span>
+<span id="cb265-8"><a href="#cb265-8" aria-hidden="true" tabindex="-1"></a> This is the abstract.</span>
+<span id="cb265-9"><a href="#cb265-9" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb265-10"><a href="#cb265-10" aria-hidden="true" tabindex="-1"></a> It consists of two paragraphs.</span>
+<span id="cb265-11"><a href="#cb265-11" aria-hidden="true" tabindex="-1"></a><span class="pp">---</span></span></code></pre></div>
</dd>
</dl>
</dd>
@@ -4205,105 +4260,227 @@ for entering metadata in <abbr>yaml</abbr>.</p>
class="tex">T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb265"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb265-1"><a href="#cb265-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
-<span id="cb265-2"><a href="#cb265-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionJekyllData</span>{true}</span>
-<span id="cb265-3"><a href="#cb265-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\ExplSyntaxOn</span></span>
-<span id="cb265-4"><a href="#cb265-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\keys</span>_define:nn</span>
-<span id="cb265-5"><a href="#cb265-5" aria-hidden="true" tabindex="-1"></a> { markdown/jekyllData }</span>
-<span id="cb265-6"><a href="#cb265-6" aria-hidden="true" tabindex="-1"></a> {</span>
-<span id="cb265-7"><a href="#cb265-7" aria-hidden="true" tabindex="-1"></a> name .code:n = { <span class="fu">\gdef\name</span>{#1} },</span>
-<span id="cb265-8"><a href="#cb265-8" aria-hidden="true" tabindex="-1"></a> age .code:n = { <span class="fu">\gdef\age</span>{#1} },</span>
-<span id="cb265-9"><a href="#cb265-9" aria-hidden="true" tabindex="-1"></a> }</span>
-<span id="cb265-10"><a href="#cb265-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\ExplSyntaxOff</span></span>
-<span id="cb265-11"><a href="#cb265-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererJekyllDataEnd</span>{<span class="co">%</span></span>
-<span id="cb265-12"><a href="#cb265-12" aria-hidden="true" tabindex="-1"></a> <span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.}</span>
-<span id="cb265-13"><a href="#cb265-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
-<span id="cb265-14"><a href="#cb265-14" aria-hidden="true" tabindex="-1"></a>---</span>
-<span id="cb265-15"><a href="#cb265-15" aria-hidden="true" tabindex="-1"></a>name: Jane Doe</span>
-<span id="cb265-16"><a href="#cb265-16" aria-hidden="true" tabindex="-1"></a>age: 99</span>
-<span id="cb265-17"><a href="#cb265-17" aria-hidden="true" tabindex="-1"></a>---</span>
-<span id="cb265-18"><a href="#cb265-18" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
-<span id="cb265-19"><a href="#cb265-19" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
-<p>Next, invoke LuaTeX from the terminal:</p>
<div class="sourceCode" id="cb266"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb266-1"><a href="#cb266-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb266-1"><a href="#cb266-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
+<span id="cb266-2"><a href="#cb266-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionJekyllData</span>{true}</span>
+<span id="cb266-3"><a href="#cb266-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\ExplSyntaxOn</span></span>
+<span id="cb266-4"><a href="#cb266-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\keys</span>_define:nn</span>
+<span id="cb266-5"><a href="#cb266-5" aria-hidden="true" tabindex="-1"></a> { markdown/jekyllData }</span>
+<span id="cb266-6"><a href="#cb266-6" aria-hidden="true" tabindex="-1"></a> {</span>
+<span id="cb266-7"><a href="#cb266-7" aria-hidden="true" tabindex="-1"></a> name .code:n = { <span class="fu">\gdef\name</span>{#1} },</span>
+<span id="cb266-8"><a href="#cb266-8" aria-hidden="true" tabindex="-1"></a> age .code:n = { <span class="fu">\gdef\age</span>{#1} },</span>
+<span id="cb266-9"><a href="#cb266-9" aria-hidden="true" tabindex="-1"></a> }</span>
+<span id="cb266-10"><a href="#cb266-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\ExplSyntaxOff</span></span>
+<span id="cb266-11"><a href="#cb266-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererJekyllDataEnd</span>{<span class="co">%</span></span>
+<span id="cb266-12"><a href="#cb266-12" aria-hidden="true" tabindex="-1"></a> <span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.}</span>
+<span id="cb266-13"><a href="#cb266-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
+<span id="cb266-14"><a href="#cb266-14" aria-hidden="true" tabindex="-1"></a>---</span>
+<span id="cb266-15"><a href="#cb266-15" aria-hidden="true" tabindex="-1"></a>name: Jane Doe</span>
+<span id="cb266-16"><a href="#cb266-16" aria-hidden="true" tabindex="-1"></a>age: 99</span>
+<span id="cb266-17"><a href="#cb266-17" aria-hidden="true" tabindex="-1"></a>---</span>
+<span id="cb266-18"><a href="#cb266-18" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
+<span id="cb266-19"><a href="#cb266-19" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
+<p>Next, invoke LuaTeX from the terminal:</p>
+<div class="sourceCode" id="cb267"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb267-1"><a href="#cb267-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
<p>Jane Doe is 99 years old.</p>
</blockquote>
-<h5 class="unnumbered" id="latex-example-24"><span
+<h5 class="unnumbered" id="latex-example-26"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb267"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb267-1"><a href="#cb267-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb267-2"><a href="#cb267-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[jekyllData]{<span class="ex">markdown</span>}</span>
-<span id="cb267-3"><a href="#cb267-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
-<span id="cb267-4"><a href="#cb267-4" aria-hidden="true" tabindex="-1"></a> jekyllDataRenderers = {</span>
-<span id="cb267-5"><a href="#cb267-5" aria-hidden="true" tabindex="-1"></a> name = {<span class="fu">\gdef\name</span>{#1}},</span>
-<span id="cb267-6"><a href="#cb267-6" aria-hidden="true" tabindex="-1"></a> code = {<span class="fu">\gdef\age</span>{#1}},</span>
-<span id="cb267-7"><a href="#cb267-7" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb267-8"><a href="#cb267-8" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
-<span id="cb267-9"><a href="#cb267-9" aria-hidden="true" tabindex="-1"></a> jekyllDataEnd = {<span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.},</span>
-<span id="cb267-10"><a href="#cb267-10" aria-hidden="true" tabindex="-1"></a> }</span>
-<span id="cb267-11"><a href="#cb267-11" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb267-12"><a href="#cb267-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb267-13"><a href="#cb267-13" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb267-14"><a href="#cb267-14" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb267-15"><a href="#cb267-15" aria-hidden="true" tabindex="-1"></a>---</span>
-<span id="cb267-16"><a href="#cb267-16" aria-hidden="true" tabindex="-1"></a>name: Jane Doe</span>
-<span id="cb267-17"><a href="#cb267-17" aria-hidden="true" tabindex="-1"></a>age: 99</span>
-<span id="cb267-18"><a href="#cb267-18" aria-hidden="true" tabindex="-1"></a>---</span>
-<span id="cb267-19"><a href="#cb267-19" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb267-20"><a href="#cb267-20" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb267-21"><a href="#cb267-21" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
-<p>Next, invoke LuaTeX from the terminal:</p>
<div class="sourceCode" id="cb268"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb268-1"><a href="#cb268-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb268-1"><a href="#cb268-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb268-2"><a href="#cb268-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[jekyllData]{<span class="ex">markdown</span>}</span>
+<span id="cb268-3"><a href="#cb268-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
+<span id="cb268-4"><a href="#cb268-4" aria-hidden="true" tabindex="-1"></a> jekyllDataRenderers = {</span>
+<span id="cb268-5"><a href="#cb268-5" aria-hidden="true" tabindex="-1"></a> name = {<span class="fu">\gdef\name</span>{#1}},</span>
+<span id="cb268-6"><a href="#cb268-6" aria-hidden="true" tabindex="-1"></a> code = {<span class="fu">\gdef\age</span>{#1}},</span>
+<span id="cb268-7"><a href="#cb268-7" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb268-8"><a href="#cb268-8" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
+<span id="cb268-9"><a href="#cb268-9" aria-hidden="true" tabindex="-1"></a> jekyllDataEnd = {<span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.},</span>
+<span id="cb268-10"><a href="#cb268-10" aria-hidden="true" tabindex="-1"></a> }</span>
+<span id="cb268-11"><a href="#cb268-11" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb268-12"><a href="#cb268-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb268-13"><a href="#cb268-13" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb268-14"><a href="#cb268-14" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb268-15"><a href="#cb268-15" aria-hidden="true" tabindex="-1"></a>---</span>
+<span id="cb268-16"><a href="#cb268-16" aria-hidden="true" tabindex="-1"></a>name: Jane Doe</span>
+<span id="cb268-17"><a href="#cb268-17" aria-hidden="true" tabindex="-1"></a>age: 99</span>
+<span id="cb268-18"><a href="#cb268-18" aria-hidden="true" tabindex="-1"></a>---</span>
+<span id="cb268-19"><a href="#cb268-19" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb268-20"><a href="#cb268-20" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb268-21"><a href="#cb268-21" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<p>Next, invoke LuaTeX from the terminal:</p>
+<div class="sourceCode" id="cb269"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb269-1"><a href="#cb269-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
<p>Jane Doe is 99 years old.</p>
</blockquote>
-<h5 class="unnumbered" id="context-example-18">Con<span
+<h5 class="unnumbered" id="context-example-17">Con<span
class="tex">T<sub>e</sub>X</span>t Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb269"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb269-1"><a href="#cb269-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
-<span id="cb269-2"><a href="#cb269-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[jekyllData = yes]</span>
-<span id="cb269-3"><a href="#cb269-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\ExplSyntaxOn</span></span>
-<span id="cb269-4"><a href="#cb269-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\keys</span>_define:nn</span>
-<span id="cb269-5"><a href="#cb269-5" aria-hidden="true" tabindex="-1"></a> { markdown/jekyllData }</span>
-<span id="cb269-6"><a href="#cb269-6" aria-hidden="true" tabindex="-1"></a> {</span>
-<span id="cb269-7"><a href="#cb269-7" aria-hidden="true" tabindex="-1"></a> name .code:n = { <span class="fu">\gdef\name</span>{#1} },</span>
-<span id="cb269-8"><a href="#cb269-8" aria-hidden="true" tabindex="-1"></a> age .code:n = { <span class="fu">\gdef\age</span>{#1} },</span>
-<span id="cb269-9"><a href="#cb269-9" aria-hidden="true" tabindex="-1"></a> }</span>
-<span id="cb269-10"><a href="#cb269-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\ExplSyntaxOff</span></span>
-<span id="cb269-11"><a href="#cb269-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererJekyllDataEnd</span>{<span class="co">%</span></span>
-<span id="cb269-12"><a href="#cb269-12" aria-hidden="true" tabindex="-1"></a> <span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.}</span>
-<span id="cb269-13"><a href="#cb269-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
-<span id="cb269-14"><a href="#cb269-14" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb269-15"><a href="#cb269-15" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb269-16"><a href="#cb269-16" aria-hidden="true" tabindex="-1"></a>---</span>
-<span id="cb269-17"><a href="#cb269-17" aria-hidden="true" tabindex="-1"></a>name: Jane Doe</span>
-<span id="cb269-18"><a href="#cb269-18" aria-hidden="true" tabindex="-1"></a>age: 99</span>
-<span id="cb269-19"><a href="#cb269-19" aria-hidden="true" tabindex="-1"></a>---</span>
-<span id="cb269-20"><a href="#cb269-20" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb269-21"><a href="#cb269-21" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb269-22"><a href="#cb269-22" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
-<p>Next, invoke LuaTeX from the terminal:</p>
<div class="sourceCode" id="cb270"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb270-1"><a href="#cb270-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb270-1"><a href="#cb270-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
+<span id="cb270-2"><a href="#cb270-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[jekyllData = yes]</span>
+<span id="cb270-3"><a href="#cb270-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\ExplSyntaxOn</span></span>
+<span id="cb270-4"><a href="#cb270-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\keys</span>_define:nn</span>
+<span id="cb270-5"><a href="#cb270-5" aria-hidden="true" tabindex="-1"></a> { markdown/jekyllData }</span>
+<span id="cb270-6"><a href="#cb270-6" aria-hidden="true" tabindex="-1"></a> {</span>
+<span id="cb270-7"><a href="#cb270-7" aria-hidden="true" tabindex="-1"></a> name .code:n = { <span class="fu">\gdef\name</span>{#1} },</span>
+<span id="cb270-8"><a href="#cb270-8" aria-hidden="true" tabindex="-1"></a> age .code:n = { <span class="fu">\gdef\age</span>{#1} },</span>
+<span id="cb270-9"><a href="#cb270-9" aria-hidden="true" tabindex="-1"></a> }</span>
+<span id="cb270-10"><a href="#cb270-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\ExplSyntaxOff</span></span>
+<span id="cb270-11"><a href="#cb270-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererJekyllDataEnd</span>{<span class="co">%</span></span>
+<span id="cb270-12"><a href="#cb270-12" aria-hidden="true" tabindex="-1"></a> <span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.}</span>
+<span id="cb270-13"><a href="#cb270-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
+<span id="cb270-14"><a href="#cb270-14" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb270-15"><a href="#cb270-15" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb270-16"><a href="#cb270-16" aria-hidden="true" tabindex="-1"></a>---</span>
+<span id="cb270-17"><a href="#cb270-17" aria-hidden="true" tabindex="-1"></a>name: Jane Doe</span>
+<span id="cb270-18"><a href="#cb270-18" aria-hidden="true" tabindex="-1"></a>age: 99</span>
+<span id="cb270-19"><a href="#cb270-19" aria-hidden="true" tabindex="-1"></a>---</span>
+<span id="cb270-20"><a href="#cb270-20" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb270-21"><a href="#cb270-21" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb270-22"><a href="#cb270-22" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
+<p>Next, invoke LuaTeX from the terminal:</p>
+<div class="sourceCode" id="cb271"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb271-1"><a href="#cb271-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
<p>Jane Doe is 99 years old.</p>
</blockquote>
-<h4 data-number="2.2.1.30" id="pipe-tables"><span
-class="header-section-number">2.2.1.30</span> Option
+<h4 data-number="2.2.1.32" id="option-notes"><span
+class="header-section-number">2.2.1.32</span> Option
+<code>notes</code></h4>
+<dl>
+<dt><code>notes</code> (default value: <code>false</code>)</dt>
+<dd>
+<dl>
+<dt>true</dt>
+<dd>
+<p>Enable the Pandoc note syntax extension:</p>
+<div class="sourceCode" id="cb272"><pre
+class="sourceCode md"><code class="sourceCode markdown"><span id="cb272-1"><a href="#cb272-1" aria-hidden="true" tabindex="-1"></a>Here is a note reference,<span class="ot">[^1]</span> and another.<span class="ot">[^longnote]</span></span>
+<span id="cb272-2"><a href="#cb272-2" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb272-3"><a href="#cb272-3" aria-hidden="true" tabindex="-1"></a><span class="ot">[^1]: </span>Here is the note.</span>
+<span id="cb272-4"><a href="#cb272-4" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb272-5"><a href="#cb272-5" aria-hidden="true" tabindex="-1"></a><span class="ot">[^longnote]: </span>Here&#39;s one with multiple blocks.</span>
+<span id="cb272-6"><a href="#cb272-6" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb272-7"><a href="#cb272-7" aria-hidden="true" tabindex="-1"></a><span class="in"> Subsequent paragraphs are indented to show that they</span></span>
+<span id="cb272-8"><a href="#cb272-8" aria-hidden="true" tabindex="-1"></a>belong to the previous note.</span>
+<span id="cb272-9"><a href="#cb272-9" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb272-10"><a href="#cb272-10" aria-hidden="true" tabindex="-1"></a><span class="in"> { some.code }</span></span>
+<span id="cb272-11"><a href="#cb272-11" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb272-12"><a href="#cb272-12" aria-hidden="true" tabindex="-1"></a><span class="in"> The whole paragraph can be indented, or just the</span></span>
+<span id="cb272-13"><a href="#cb272-13" aria-hidden="true" tabindex="-1"></a><span class="in"> first line. In this way, multi-paragraph notes</span></span>
+<span id="cb272-14"><a href="#cb272-14" aria-hidden="true" tabindex="-1"></a><span class="in"> work like multi-paragraph list items.</span></span>
+<span id="cb272-15"><a href="#cb272-15" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb272-16"><a href="#cb272-16" aria-hidden="true" tabindex="-1"></a>This paragraph won&#39;t be part of the note, because it</span>
+<span id="cb272-17"><a href="#cb272-17" aria-hidden="true" tabindex="-1"></a>isn&#39;t indented.</span></code></pre></div>
+</dd>
+</dl>
+</dd>
+<dd>
+<dl>
+<dt>false</dt>
+<dd>
+<p>Disable the Pandoc note syntax extension.</p>
+</dd>
+</dl>
+</dd>
+</dl>
+<h5 class="unnumbered" id="latex-example-27"><span
+class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
+<p>Using a text editor, create a text document named
+<code>document.tex</code> with the following content:</p>
+<div class="sourceCode" id="cb273"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb273-1"><a href="#cb273-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb273-2"><a href="#cb273-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[notes]{<span class="ex">markdown</span>}</span>
+<span id="cb273-3"><a href="#cb273-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb273-4"><a href="#cb273-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb273-5"><a href="#cb273-5" aria-hidden="true" tabindex="-1"></a>Here is a note reference,[^1] and another.[^longnote]</span>
+<span id="cb273-6"><a href="#cb273-6" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb273-7"><a href="#cb273-7" aria-hidden="true" tabindex="-1"></a>[^1]: Here is the note.</span>
+<span id="cb273-8"><a href="#cb273-8" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb273-9"><a href="#cb273-9" aria-hidden="true" tabindex="-1"></a>[^longnote]: Here&#39;s one with multiple blocks.</span>
+<span id="cb273-10"><a href="#cb273-10" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb273-11"><a href="#cb273-11" aria-hidden="true" tabindex="-1"></a> Subsequent paragraphs are indented to show that they</span>
+<span id="cb273-12"><a href="#cb273-12" aria-hidden="true" tabindex="-1"></a>belong to the previous note.</span>
+<span id="cb273-13"><a href="#cb273-13" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb273-14"><a href="#cb273-14" aria-hidden="true" tabindex="-1"></a> { some.code }</span>
+<span id="cb273-15"><a href="#cb273-15" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb273-16"><a href="#cb273-16" aria-hidden="true" tabindex="-1"></a> The whole paragraph can be indented, or just the</span>
+<span id="cb273-17"><a href="#cb273-17" aria-hidden="true" tabindex="-1"></a> first line. In this way, multi-paragraph notes</span>
+<span id="cb273-18"><a href="#cb273-18" aria-hidden="true" tabindex="-1"></a> work like multi-paragraph list items.</span>
+<span id="cb273-19"><a href="#cb273-19" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb273-20"><a href="#cb273-20" aria-hidden="true" tabindex="-1"></a>This paragraph won&#39;t be part of the note, because it</span>
+<span id="cb273-21"><a href="#cb273-21" aria-hidden="true" tabindex="-1"></a>isn&#39;t indented.</span>
+<span id="cb273-22"><a href="#cb273-22" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb273-23"><a href="#cb273-23" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<p>Next, invoke LuaTeX from the terminal:</p>
+<div class="sourceCode" id="cb274"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb274-1"><a href="#cb274-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+<p>A PDF document named <code>document.pdf</code> should be produced and
+contain the following text:</p>
+<blockquote>
+<p>Here is a note reference,<a href="#fn3" class="footnote-ref"
+id="fnref3" role="doc-noteref"><sup>3</sup></a> and another.<a
+href="#fn4" class="footnote-ref" id="fnref4"
+role="doc-noteref"><sup>4</sup></a></p>
+<p>This paragraph won’t be part of the note, because it isn’t
+indented.</p>
+</blockquote>
+<h5 class="unnumbered" id="context-example-18">Con<span
+class="tex">T<sub>e</sub>X</span>t Example</h5>
+<p>Using a text editor, create a text document named
+<code>document.tex</code> with the following content:</p>
+<div class="sourceCode" id="cb276"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb276-1"><a href="#cb276-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
+<span id="cb276-2"><a href="#cb276-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[notes = yes]</span>
+<span id="cb276-3"><a href="#cb276-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
+<span id="cb276-4"><a href="#cb276-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb276-5"><a href="#cb276-5" aria-hidden="true" tabindex="-1"></a>Here is a note reference,[^1] and another.[^longnote]</span>
+<span id="cb276-6"><a href="#cb276-6" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb276-7"><a href="#cb276-7" aria-hidden="true" tabindex="-1"></a>[^1]: Here is the note.</span>
+<span id="cb276-8"><a href="#cb276-8" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb276-9"><a href="#cb276-9" aria-hidden="true" tabindex="-1"></a>[^longnote]: Here&#39;s one with multiple blocks.</span>
+<span id="cb276-10"><a href="#cb276-10" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb276-11"><a href="#cb276-11" aria-hidden="true" tabindex="-1"></a> Subsequent paragraphs are indented to show that they</span>
+<span id="cb276-12"><a href="#cb276-12" aria-hidden="true" tabindex="-1"></a>belong to the previous note.</span>
+<span id="cb276-13"><a href="#cb276-13" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb276-14"><a href="#cb276-14" aria-hidden="true" tabindex="-1"></a> { some.code }</span>
+<span id="cb276-15"><a href="#cb276-15" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb276-16"><a href="#cb276-16" aria-hidden="true" tabindex="-1"></a> The whole paragraph can be indented, or just the</span>
+<span id="cb276-17"><a href="#cb276-17" aria-hidden="true" tabindex="-1"></a> first line. In this way, multi-paragraph notes</span>
+<span id="cb276-18"><a href="#cb276-18" aria-hidden="true" tabindex="-1"></a> work like multi-paragraph list items.</span>
+<span id="cb276-19"><a href="#cb276-19" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb276-20"><a href="#cb276-20" aria-hidden="true" tabindex="-1"></a>This paragraph won&#39;t be part of the note, because it</span>
+<span id="cb276-21"><a href="#cb276-21" aria-hidden="true" tabindex="-1"></a>isn&#39;t indented.</span>
+<span id="cb276-22"><a href="#cb276-22" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb276-23"><a href="#cb276-23" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
+<p>Next, invoke LuaTeX from the terminal:</p>
+<div class="sourceCode" id="cb277"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb277-1"><a href="#cb277-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
+<p>A PDF document named <code>document.pdf</code> should be produced and
+contain the following text:</p>
+<blockquote>
+<p>Here is a note reference,<a href="#fn5" class="footnote-ref"
+id="fnref5" role="doc-noteref"><sup>5</sup></a> and another.<a
+href="#fn6" class="footnote-ref" id="fnref6"
+role="doc-noteref"><sup>6</sup></a></p>
+<p>This paragraph won’t be part of the note, because it isn’t
+indented.</p>
+</blockquote>
+<h4 data-number="2.2.1.33" id="pipe-tables"><span
+class="header-section-number">2.2.1.33</span> Option
<code>pipeTables</code></h4>
<dl>
<dt><code>pipeTables</code> (default value: <code>false</code>)</dt>
@@ -4312,12 +4489,12 @@ class="header-section-number">2.2.1.30</span> Option
<dt>true</dt>
<dd>
<p>Enable the <abbr>PHP</abbr> Markdown pipe table syntax extension:</p>
-<div class="sourceCode" id="cb271"><pre
-class="sourceCode md"><code class="sourceCode markdown"><span id="cb271-1"><a href="#cb271-1" aria-hidden="true" tabindex="-1"></a>| Right | Left | Default | Center |</span>
-<span id="cb271-2"><a href="#cb271-2" aria-hidden="true" tabindex="-1"></a>|------:|:-----|---------|:------:|</span>
-<span id="cb271-3"><a href="#cb271-3" aria-hidden="true" tabindex="-1"></a>| 12 | 12 | 12 | 12 |</span>
-<span id="cb271-4"><a href="#cb271-4" aria-hidden="true" tabindex="-1"></a>| 123 | 123 | 123 | 123 |</span>
-<span id="cb271-5"><a href="#cb271-5" aria-hidden="true" tabindex="-1"></a>| 1 | 1 | 1 | 1 |</span></code></pre></div>
+<div class="sourceCode" id="cb279"><pre
+class="sourceCode md"><code class="sourceCode markdown"><span id="cb279-1"><a href="#cb279-1" aria-hidden="true" tabindex="-1"></a>| Right | Left | Default | Center |</span>
+<span id="cb279-2"><a href="#cb279-2" aria-hidden="true" tabindex="-1"></a>|------:|:-----|---------|:------:|</span>
+<span id="cb279-3"><a href="#cb279-3" aria-hidden="true" tabindex="-1"></a>| 12 | 12 | 12 | 12 |</span>
+<span id="cb279-4"><a href="#cb279-4" aria-hidden="true" tabindex="-1"></a>| 123 | 123 | 123 | 123 |</span>
+<span id="cb279-5"><a href="#cb279-5" aria-hidden="true" tabindex="-1"></a>| 1 | 1 | 1 | 1 |</span></code></pre></div>
</dd>
</dl>
</dd>
@@ -4331,25 +4508,25 @@ extension.</p>
</dl>
</dd>
</dl>
-<h5 class="unnumbered" id="latex-example-25"><span
+<h5 class="unnumbered" id="latex-example-28"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb272"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb272-1"><a href="#cb272-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb272-2"><a href="#cb272-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[pipeTables]{<span class="ex">markdown</span>}</span>
-<span id="cb272-3"><a href="#cb272-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb272-4"><a href="#cb272-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb272-5"><a href="#cb272-5" aria-hidden="true" tabindex="-1"></a>| Right | Left | Default | Center |</span>
-<span id="cb272-6"><a href="#cb272-6" aria-hidden="true" tabindex="-1"></a>|------:|:-----|---------|:------:|</span>
-<span id="cb272-7"><a href="#cb272-7" aria-hidden="true" tabindex="-1"></a>| 12 | 12 | 12 | 12 |</span>
-<span id="cb272-8"><a href="#cb272-8" aria-hidden="true" tabindex="-1"></a>| 123 | 123 | 123 | 123 |</span>
-<span id="cb272-9"><a href="#cb272-9" aria-hidden="true" tabindex="-1"></a>| 1 | 1 | 1 | 1 |</span>
-<span id="cb272-10"><a href="#cb272-10" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb272-11"><a href="#cb272-11" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<div class="sourceCode" id="cb280"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb280-1"><a href="#cb280-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb280-2"><a href="#cb280-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[pipeTables]{<span class="ex">markdown</span>}</span>
+<span id="cb280-3"><a href="#cb280-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb280-4"><a href="#cb280-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb280-5"><a href="#cb280-5" aria-hidden="true" tabindex="-1"></a>| Right | Left | Default | Center |</span>
+<span id="cb280-6"><a href="#cb280-6" aria-hidden="true" tabindex="-1"></a>|------:|:-----|---------|:------:|</span>
+<span id="cb280-7"><a href="#cb280-7" aria-hidden="true" tabindex="-1"></a>| 12 | 12 | 12 | 12 |</span>
+<span id="cb280-8"><a href="#cb280-8" aria-hidden="true" tabindex="-1"></a>| 123 | 123 | 123 | 123 |</span>
+<span id="cb280-9"><a href="#cb280-9" aria-hidden="true" tabindex="-1"></a>| 1 | 1 | 1 | 1 |</span>
+<span id="cb280-10"><a href="#cb280-10" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb280-11"><a href="#cb280-11" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb273"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb273-1"><a href="#cb273-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb281"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb281-1"><a href="#cb281-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -4388,21 +4565,21 @@ contain the following text:</p>
class="tex">T<sub>e</sub>X</span>t Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb274"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb274-1"><a href="#cb274-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
-<span id="cb274-2"><a href="#cb274-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[pipeTables = yes]</span>
-<span id="cb274-3"><a href="#cb274-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
-<span id="cb274-4"><a href="#cb274-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb274-5"><a href="#cb274-5" aria-hidden="true" tabindex="-1"></a>| Right | Left | Default | Center |</span>
-<span id="cb274-6"><a href="#cb274-6" aria-hidden="true" tabindex="-1"></a>|------:|:-----|---------|:------:|</span>
-<span id="cb274-7"><a href="#cb274-7" aria-hidden="true" tabindex="-1"></a>| 12 | 12 | 12 | 12 |</span>
-<span id="cb274-8"><a href="#cb274-8" aria-hidden="true" tabindex="-1"></a>| 123 | 123 | 123 | 123 |</span>
-<span id="cb274-9"><a href="#cb274-9" aria-hidden="true" tabindex="-1"></a>| 1 | 1 | 1 | 1 |</span>
-<span id="cb274-10"><a href="#cb274-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb274-11"><a href="#cb274-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
+<div class="sourceCode" id="cb282"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb282-1"><a href="#cb282-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
+<span id="cb282-2"><a href="#cb282-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[pipeTables = yes]</span>
+<span id="cb282-3"><a href="#cb282-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
+<span id="cb282-4"><a href="#cb282-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb282-5"><a href="#cb282-5" aria-hidden="true" tabindex="-1"></a>| Right | Left | Default | Center |</span>
+<span id="cb282-6"><a href="#cb282-6" aria-hidden="true" tabindex="-1"></a>|------:|:-----|---------|:------:|</span>
+<span id="cb282-7"><a href="#cb282-7" aria-hidden="true" tabindex="-1"></a>| 12 | 12 | 12 | 12 |</span>
+<span id="cb282-8"><a href="#cb282-8" aria-hidden="true" tabindex="-1"></a>| 123 | 123 | 123 | 123 |</span>
+<span id="cb282-9"><a href="#cb282-9" aria-hidden="true" tabindex="-1"></a>| 1 | 1 | 1 | 1 |</span>
+<span id="cb282-10"><a href="#cb282-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb282-11"><a href="#cb282-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb275"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb275-1"><a href="#cb275-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb283"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb283-1"><a href="#cb283-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -4437,8 +4614,8 @@ contain the following text:</p>
</tbody>
</table>
</blockquote>
-<h4 data-number="2.2.1.31" id="option-preservetabs"><span
-class="header-section-number">2.2.1.31</span> Option
+<h4 data-number="2.2.1.34" id="option-preservetabs"><span
+class="header-section-number">2.2.1.34</span> Option
<code>preserveTabs</code></h4>
<dl>
<dt><code>preserveTabs</code> (default value: <code>false</code>)</dt>
@@ -4459,8 +4636,8 @@ class="header-section-number">2.2.1.31</span> Option
</dl>
</dd>
</dl>
-<h4 data-number="2.2.1.32" id="option-rawattribute"><span
-class="header-section-number">2.2.1.32</span> Option
+<h4 data-number="2.2.1.35" id="option-rawattribute"><span
+class="header-section-number">2.2.1.35</span> Option
<code>rawAttribute</code></h4>
<dl>
<dt><code>rawAttribute</code> (default value: <code>false</code>)</dt>
@@ -4469,20 +4646,20 @@ class="header-section-number">2.2.1.32</span> Option
<dt>true</dt>
<dd>
<p>Enable the Pandoc raw attribute syntax extension:</p>
-<div class="sourceCode" id="cb276"><pre
-class="sourceCode md"><code class="sourceCode markdown"><span id="cb276-1"><a href="#cb276-1" aria-hidden="true" tabindex="-1"></a><span class="in">`$H_2 O$`</span>{=tex} is a liquid.</span></code></pre></div>
+<div class="sourceCode" id="cb284"><pre
+class="sourceCode md"><code class="sourceCode markdown"><span id="cb284-1"><a href="#cb284-1" aria-hidden="true" tabindex="-1"></a><span class="in">`$H_2 O$`</span>{=tex} is a liquid.</span></code></pre></div>
<p>To enable raw blocks, the <strong><code>fencedCode</code></strong>
option must also be enabled:</p>
-<div class="sourceCode" id="cb277"><pre
-class="sourceCode md"><code class="sourceCode markdown"><span id="cb277-1"><a href="#cb277-1" aria-hidden="true" tabindex="-1"></a><span class="an">Here is a mathematical formula:</span></span>
-<span id="cb277-2"><a href="#cb277-2" aria-hidden="true" tabindex="-1"></a><span class="in">``` {=tex}</span></span>
-<span id="cb277-3"><a href="#cb277-3" aria-hidden="true" tabindex="-1"></a><span class="in">\[distance[i] =</span></span>
-<span id="cb277-4"><a href="#cb277-4" aria-hidden="true" tabindex="-1"></a><span class="in"> \begin{dcases}</span></span>
-<span id="cb277-5"><a href="#cb277-5" aria-hidden="true" tabindex="-1"></a><span class="in"> a &amp; b \\</span></span>
-<span id="cb277-6"><a href="#cb277-6" aria-hidden="true" tabindex="-1"></a><span class="in"> c &amp; d</span></span>
-<span id="cb277-7"><a href="#cb277-7" aria-hidden="true" tabindex="-1"></a><span class="in"> \end{dcases}</span></span>
-<span id="cb277-8"><a href="#cb277-8" aria-hidden="true" tabindex="-1"></a><span class="in">\]</span></span>
-<span id="cb277-9"><a href="#cb277-9" aria-hidden="true" tabindex="-1"></a><span class="in">```</span></span></code></pre></div>
+<div class="sourceCode" id="cb285"><pre
+class="sourceCode md"><code class="sourceCode markdown"><span id="cb285-1"><a href="#cb285-1" aria-hidden="true" tabindex="-1"></a><span class="an">Here is a mathematical formula:</span></span>
+<span id="cb285-2"><a href="#cb285-2" aria-hidden="true" tabindex="-1"></a><span class="in">``` {=tex}</span></span>
+<span id="cb285-3"><a href="#cb285-3" aria-hidden="true" tabindex="-1"></a><span class="in">\[distance[i] =</span></span>
+<span id="cb285-4"><a href="#cb285-4" aria-hidden="true" tabindex="-1"></a><span class="in"> \begin{dcases}</span></span>
+<span id="cb285-5"><a href="#cb285-5" aria-hidden="true" tabindex="-1"></a><span class="in"> a &amp; b \\</span></span>
+<span id="cb285-6"><a href="#cb285-6" aria-hidden="true" tabindex="-1"></a><span class="in"> c &amp; d</span></span>
+<span id="cb285-7"><a href="#cb285-7" aria-hidden="true" tabindex="-1"></a><span class="in"> \end{dcases}</span></span>
+<span id="cb285-8"><a href="#cb285-8" aria-hidden="true" tabindex="-1"></a><span class="in">\]</span></span>
+<span id="cb285-9"><a href="#cb285-9" aria-hidden="true" tabindex="-1"></a><span class="in">```</span></span></code></pre></div>
<p>The <strong><code>rawAttribute</code></strong> option is a good
alternative to the <strong><code>hybrid</code></strong> option. Unlike
the <strong><code>hybrid</code></strong> option, which affects the
@@ -4500,33 +4677,33 @@ allows you to isolate the parts of your documents that use TeX:</p>
</dl>
</dd>
</dl>
-<h5 class="unnumbered" id="latex-example-26"><span
+<h5 class="unnumbered" id="latex-example-29"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb278"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb278-1"><a href="#cb278-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb278-2"><a href="#cb278-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[rawAttribute, fencedCode]{<span class="ex">markdown</span>}</span>
-<span id="cb278-3"><a href="#cb278-3" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">expl3</span>}</span>
-<span id="cb278-4"><a href="#cb278-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb278-5"><a href="#cb278-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb278-6"><a href="#cb278-6" aria-hidden="true" tabindex="-1"></a>`<span class="ss">$H_2 O$</span>`{=tex} is a liquid.</span>
-<span id="cb278-7"><a href="#cb278-7" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb278-8"><a href="#cb278-8" aria-hidden="true" tabindex="-1"></a>``` {=html}</span>
-<span id="cb278-9"><a href="#cb278-9" aria-hidden="true" tabindex="-1"></a>&lt;p&gt;Here is some HTML content that will be ignored.&lt;/p&gt;</span>
-<span id="cb278-10"><a href="#cb278-10" aria-hidden="true" tabindex="-1"></a>```</span>
-<span id="cb278-11"><a href="#cb278-11" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb278-12"><a href="#cb278-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<div class="sourceCode" id="cb286"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb286-1"><a href="#cb286-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb286-2"><a href="#cb286-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[rawAttribute, fencedCode]{<span class="ex">markdown</span>}</span>
+<span id="cb286-3"><a href="#cb286-3" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">expl3</span>}</span>
+<span id="cb286-4"><a href="#cb286-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb286-5"><a href="#cb286-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb286-6"><a href="#cb286-6" aria-hidden="true" tabindex="-1"></a>`<span class="ss">$H_2 O$</span>`{=tex} is a liquid.</span>
+<span id="cb286-7"><a href="#cb286-7" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb286-8"><a href="#cb286-8" aria-hidden="true" tabindex="-1"></a>``` {=html}</span>
+<span id="cb286-9"><a href="#cb286-9" aria-hidden="true" tabindex="-1"></a>&lt;p&gt;Here is some HTML content that will be ignored.&lt;/p&gt;</span>
+<span id="cb286-10"><a href="#cb286-10" aria-hidden="true" tabindex="-1"></a>```</span>
+<span id="cb286-11"><a href="#cb286-11" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb286-12"><a href="#cb286-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb279"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb279-1"><a href="#cb279-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb287"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb287-1"><a href="#cb287-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
<p>H<sub>2</sub>O is a liquid.</p>
</blockquote>
-<h4 data-number="2.2.1.33" id="option-relativereferences"><span
-class="header-section-number">2.2.1.33</span> Option
+<h4 data-number="2.2.1.36" id="option-relativereferences"><span
+class="header-section-number">2.2.1.36</span> Option
<code>relativeReferences</code></h4>
<dl>
<dt><code>relativeReferences</code> (default value:
@@ -4538,14 +4715,14 @@ class="header-section-number">2.2.1.33</span> Option
<p>Enable <a
href="https://datatracker.ietf.org/doc/html/rfc3986#section-4.2">relative
references</a> in autolinks:</p>
-<div class="sourceCode" id="cb280"><pre
-class="sourceCode md"><code class="sourceCode markdown"><span id="cb280-1"><a href="#cb280-1" aria-hidden="true" tabindex="-1"></a>I conclude in Section &lt;#conclusion&gt;.</span>
-<span id="cb280-2"><a href="#cb280-2" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb280-3"><a href="#cb280-3" aria-hidden="true" tabindex="-1"></a>Conclusion {#conclusion}</span>
-<span id="cb280-4"><a href="#cb280-4" aria-hidden="true" tabindex="-1"></a><span class="fu">==========</span></span>
-<span id="cb280-5"><a href="#cb280-5" aria-hidden="true" tabindex="-1"></a>In this paper, we have discovered that most</span>
-<span id="cb280-6"><a href="#cb280-6" aria-hidden="true" tabindex="-1"></a>grandmas would rather eat dinner with their</span>
-<span id="cb280-7"><a href="#cb280-7" aria-hidden="true" tabindex="-1"></a>grandchildren than get eaten. Begone, wolf!</span></code></pre></div>
+<div class="sourceCode" id="cb288"><pre
+class="sourceCode md"><code class="sourceCode markdown"><span id="cb288-1"><a href="#cb288-1" aria-hidden="true" tabindex="-1"></a>I conclude in Section &lt;#conclusion&gt;.</span>
+<span id="cb288-2"><a href="#cb288-2" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb288-3"><a href="#cb288-3" aria-hidden="true" tabindex="-1"></a>Conclusion {#conclusion}</span>
+<span id="cb288-4"><a href="#cb288-4" aria-hidden="true" tabindex="-1"></a><span class="fu">==========</span></span>
+<span id="cb288-5"><a href="#cb288-5" aria-hidden="true" tabindex="-1"></a>In this paper, we have discovered that most</span>
+<span id="cb288-6"><a href="#cb288-6" aria-hidden="true" tabindex="-1"></a>grandmas would rather eat dinner with their</span>
+<span id="cb288-7"><a href="#cb288-7" aria-hidden="true" tabindex="-1"></a>grandchildren than get eaten. Begone, wolf!</span></code></pre></div>
</dd>
</dl>
</dd>
@@ -4558,30 +4735,30 @@ class="sourceCode md"><code class="sourceCode markdown"><span id="cb280-1"><a hr
</dl>
</dd>
</dl>
-<h5 class="unnumbered" id="latex-example-27"><span
+<h5 class="unnumbered" id="latex-example-30"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb281"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb281-1"><a href="#cb281-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb281-2"><a href="#cb281-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[headerAttributes, relativeReferences]{<span class="ex">markdown</span>}</span>
-<span id="cb281-3"><a href="#cb281-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb281-4"><a href="#cb281-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb281-5"><a href="#cb281-5" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb281-6"><a href="#cb281-6" aria-hidden="true" tabindex="-1"></a>I conclude in Section &lt;#conclusion&gt;.</span>
-<span id="cb281-7"><a href="#cb281-7" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb281-8"><a href="#cb281-8" aria-hidden="true" tabindex="-1"></a>Conclusion {#conclusion}</span>
-<span id="cb281-9"><a href="#cb281-9" aria-hidden="true" tabindex="-1"></a>==========</span>
-<span id="cb281-10"><a href="#cb281-10" aria-hidden="true" tabindex="-1"></a>In this paper, we have discovered that most</span>
-<span id="cb281-11"><a href="#cb281-11" aria-hidden="true" tabindex="-1"></a>grandmas would rather eat dinner with their</span>
-<span id="cb281-12"><a href="#cb281-12" aria-hidden="true" tabindex="-1"></a>grandchildren than get eaten. Begone, wolf!</span>
-<span id="cb281-13"><a href="#cb281-13" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb281-14"><a href="#cb281-14" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb281-15"><a href="#cb281-15" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<div class="sourceCode" id="cb289"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb289-1"><a href="#cb289-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb289-2"><a href="#cb289-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[headerAttributes, relativeReferences]{<span class="ex">markdown</span>}</span>
+<span id="cb289-3"><a href="#cb289-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb289-4"><a href="#cb289-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb289-5"><a href="#cb289-5" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb289-6"><a href="#cb289-6" aria-hidden="true" tabindex="-1"></a>I conclude in Section &lt;#conclusion&gt;.</span>
+<span id="cb289-7"><a href="#cb289-7" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb289-8"><a href="#cb289-8" aria-hidden="true" tabindex="-1"></a>Conclusion {#conclusion}</span>
+<span id="cb289-9"><a href="#cb289-9" aria-hidden="true" tabindex="-1"></a>==========</span>
+<span id="cb289-10"><a href="#cb289-10" aria-hidden="true" tabindex="-1"></a>In this paper, we have discovered that most</span>
+<span id="cb289-11"><a href="#cb289-11" aria-hidden="true" tabindex="-1"></a>grandmas would rather eat dinner with their</span>
+<span id="cb289-12"><a href="#cb289-12" aria-hidden="true" tabindex="-1"></a>grandchildren than get eaten. Begone, wolf!</span>
+<span id="cb289-13"><a href="#cb289-13" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb289-14"><a href="#cb289-14" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb289-15"><a href="#cb289-15" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Next, invoke LuaTeX twice from the terminal:</p>
-<div class="sourceCode" id="cb282"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb282-1"><a href="#cb282-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span>
-<span id="cb282-2"><a href="#cb282-2" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb290"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb290-1"><a href="#cb290-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span>
+<span id="cb290-2"><a href="#cb290-2" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -4590,8 +4767,8 @@ contain the following text:</p>
<p>In this paper, we have discovered that most grandmas would rather eat
dinner with their grandchildren than get eaten. Begone, wolf!</p>
</blockquote>
-<h4 data-number="2.2.1.34" id="option-shiftheadings"><span
-class="header-section-number">2.2.1.34</span> Option
+<h4 data-number="2.2.1.37" id="option-shiftheadings"><span
+class="header-section-number">2.2.1.37</span> Option
<code>shiftHeadings</code></h4>
<dl>
<dt><code>shiftHeadings</code> (default value: <code>0</code>)</dt>
@@ -4607,32 +4784,32 @@ when ⟨<em>shift amount</em>⟩ is positive, and to level 1, when
class="tex">T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>example.md</code> with the following content:</p>
-<div class="sourceCode" id="cb283"><pre
-class="sourceCode md"><code class="sourceCode markdown"><span id="cb283-1"><a href="#cb283-1" aria-hidden="true" tabindex="-1"></a><span class="fu">## A section</span></span></code></pre></div>
+<div class="sourceCode" id="cb291"><pre
+class="sourceCode md"><code class="sourceCode markdown"><span id="cb291-1"><a href="#cb291-1" aria-hidden="true" tabindex="-1"></a><span class="fu">## A section</span></span></code></pre></div>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb284"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb284-1"><a href="#cb284-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
-<span id="cb284-2"><a href="#cb284-2" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb284-3"><a href="#cb284-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\font\normal</span>=cmr10<span class="fu">\normal</span></span>
-<span id="cb284-4"><a href="#cb284-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\font\big</span>=cmr10 at 12pt</span>
-<span id="cb284-5"><a href="#cb284-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHeadingTwo</span>#1{{<span class="fu">\big</span> #1<span class="fu">\par</span>}}</span>
-<span id="cb284-6"><a href="#cb284-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\font\bigger</span>=cmr10 scaled 1440</span>
-<span id="cb284-7"><a href="#cb284-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHeadingOne</span>#1{{<span class="fu">\bigger</span> #1<span class="fu">\par</span>}}</span>
-<span id="cb284-8"><a href="#cb284-8" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb284-9"><a href="#cb284-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionShiftHeadings</span>{-1}</span>
-<span id="cb284-10"><a href="#cb284-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownInput</span>{example.md}</span>
-<span id="cb284-11"><a href="#cb284-11" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb284-12"><a href="#cb284-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionShiftHeadings</span>{0}</span>
-<span id="cb284-13"><a href="#cb284-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownInput</span>{example.md}</span>
-<span id="cb284-14"><a href="#cb284-14" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb284-15"><a href="#cb284-15" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionShiftHeadings</span>{+1}</span>
-<span id="cb284-16"><a href="#cb284-16" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownInput</span>{example.md}</span>
-<span id="cb284-17"><a href="#cb284-17" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb284-18"><a href="#cb284-18" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
+<div class="sourceCode" id="cb292"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb292-1"><a href="#cb292-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
+<span id="cb292-2"><a href="#cb292-2" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb292-3"><a href="#cb292-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\font\normal</span>=cmr10<span class="fu">\normal</span></span>
+<span id="cb292-4"><a href="#cb292-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\font\big</span>=cmr10 at 12pt</span>
+<span id="cb292-5"><a href="#cb292-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHeadingTwo</span>#1{{<span class="fu">\big</span> #1<span class="fu">\par</span>}}</span>
+<span id="cb292-6"><a href="#cb292-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\font\bigger</span>=cmr10 scaled 1440</span>
+<span id="cb292-7"><a href="#cb292-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHeadingOne</span>#1{{<span class="fu">\bigger</span> #1<span class="fu">\par</span>}}</span>
+<span id="cb292-8"><a href="#cb292-8" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb292-9"><a href="#cb292-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionShiftHeadings</span>{-1}</span>
+<span id="cb292-10"><a href="#cb292-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownInput</span>{example.md}</span>
+<span id="cb292-11"><a href="#cb292-11" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb292-12"><a href="#cb292-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionShiftHeadings</span>{0}</span>
+<span id="cb292-13"><a href="#cb292-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownInput</span>{example.md}</span>
+<span id="cb292-14"><a href="#cb292-14" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb292-15"><a href="#cb292-15" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionShiftHeadings</span>{+1}</span>
+<span id="cb292-16"><a href="#cb292-16" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownInput</span>{example.md}</span>
+<span id="cb292-17"><a href="#cb292-17" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb292-18"><a href="#cb292-18" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb285"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb285-1"><a href="#cb285-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb293"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb293-1"><a href="#cb293-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -4640,24 +4817,24 @@ contain the following text:</p>
<h2 id="a-section-1">A section</h2>
<h3 id="a-section-2">A section</h3>
</blockquote>
-<h5 class="unnumbered" id="latex-example-28"><span
+<h5 class="unnumbered" id="latex-example-31"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb286"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb286-1"><a href="#cb286-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb286-2"><a href="#cb286-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span>
-<span id="cb286-3"><a href="#cb286-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">filecontents</span>}[overwrite,nosearch,noheader]{example.md}</span>
-<span id="cb286-4"><a href="#cb286-4" aria-hidden="true" tabindex="-1"></a>## A section</span>
-<span id="cb286-5"><a href="#cb286-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">filecontents</span>}</span>
-<span id="cb286-6"><a href="#cb286-6" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb286-7"><a href="#cb286-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownInput</span>[shiftHeadings=-1]{example.md}</span>
-<span id="cb286-8"><a href="#cb286-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownInput</span>{example.md}</span>
-<span id="cb286-9"><a href="#cb286-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownInput</span>[shiftHeadings=+1]{example.md}</span>
-<span id="cb286-10"><a href="#cb286-10" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<div class="sourceCode" id="cb294"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb294-1"><a href="#cb294-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb294-2"><a href="#cb294-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span>
+<span id="cb294-3"><a href="#cb294-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">filecontents</span>}[overwrite,nosearch,noheader]{example.md}</span>
+<span id="cb294-4"><a href="#cb294-4" aria-hidden="true" tabindex="-1"></a>## A section</span>
+<span id="cb294-5"><a href="#cb294-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">filecontents</span>}</span>
+<span id="cb294-6"><a href="#cb294-6" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb294-7"><a href="#cb294-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownInput</span>[shiftHeadings=-1]{example.md}</span>
+<span id="cb294-8"><a href="#cb294-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownInput</span>{example.md}</span>
+<span id="cb294-9"><a href="#cb294-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownInput</span>[shiftHeadings=+1]{example.md}</span>
+<span id="cb294-10"><a href="#cb294-10" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb287"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb287-1"><a href="#cb287-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb295"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb295-1"><a href="#cb295-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -4669,22 +4846,22 @@ contain the following text:</p>
class="tex">T<sub>e</sub>X</span>t Example</h5>
<p>Using a text editor, create a text document named
<code>example.md</code> with the following content:</p>
-<div class="sourceCode" id="cb288"><pre
-class="sourceCode md"><code class="sourceCode markdown"><span id="cb288-1"><a href="#cb288-1" aria-hidden="true" tabindex="-1"></a><span class="fu">## A section</span></span></code></pre></div>
+<div class="sourceCode" id="cb296"><pre
+class="sourceCode md"><code class="sourceCode markdown"><span id="cb296-1"><a href="#cb296-1" aria-hidden="true" tabindex="-1"></a><span class="fu">## A section</span></span></code></pre></div>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb289"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb289-1"><a href="#cb289-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
-<span id="cb289-2"><a href="#cb289-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
-<span id="cb289-3"><a href="#cb289-3" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb289-4"><a href="#cb289-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\inputmarkdown</span>[shiftHeadings = -1]{example.md}</span>
-<span id="cb289-5"><a href="#cb289-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\inputmarkdown</span>[shiftHeadings = 0]{example.md}</span>
-<span id="cb289-6"><a href="#cb289-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\inputmarkdown</span>[shiftHeadings = +1]{example.md}</span>
-<span id="cb289-7"><a href="#cb289-7" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb289-8"><a href="#cb289-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
+<div class="sourceCode" id="cb297"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb297-1"><a href="#cb297-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
+<span id="cb297-2"><a href="#cb297-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
+<span id="cb297-3"><a href="#cb297-3" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb297-4"><a href="#cb297-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\inputmarkdown</span>[shiftHeadings = -1]{example.md}</span>
+<span id="cb297-5"><a href="#cb297-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\inputmarkdown</span>[shiftHeadings = 0]{example.md}</span>
+<span id="cb297-6"><a href="#cb297-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\inputmarkdown</span>[shiftHeadings = +1]{example.md}</span>
+<span id="cb297-7"><a href="#cb297-7" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb297-8"><a href="#cb297-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb290"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb290-1"><a href="#cb290-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb298"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb298-1"><a href="#cb298-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -4692,8 +4869,8 @@ contain the following text:</p>
<h2 id="a-section-7">A section</h2>
<h3 id="a-section-8">A section</h3>
</blockquote>
-<h4 data-number="2.2.1.35" id="slice"><span
-class="header-section-number">2.2.1.35</span> Option
+<h4 data-number="2.2.1.38" id="option-slice"><span
+class="header-section-number">2.2.1.38</span> Option
<code>slice</code></h4>
<dl>
<dt><code>slice</code> (default value: <code>^ $</code>)</dt>
@@ -4727,43 +4904,43 @@ i.e. the entire section with the <abbr>HTML</abbr> attribute
class="tex">T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>hamlet.md</code> with the following content:</p>
-<div class="sourceCode" id="cb291"><pre
-class="sourceCode md"><code class="sourceCode markdown"><span id="cb291-1"><a href="#cb291-1" aria-hidden="true" tabindex="-1"></a><span class="fu"># The Tragedy of Hamlet</span></span>
-<span id="cb291-2"><a href="#cb291-2" aria-hidden="true" tabindex="-1"></a>Shakespeare&#39;s longest play.</span>
-<span id="cb291-3"><a href="#cb291-3" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb291-4"><a href="#cb291-4" aria-hidden="true" tabindex="-1"></a><span class="fu">## Act III {#act-3}</span></span>
-<span id="cb291-5"><a href="#cb291-5" aria-hidden="true" tabindex="-1"></a>Hamlet kills Polonius.</span>
-<span id="cb291-6"><a href="#cb291-6" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb291-7"><a href="#cb291-7" aria-hidden="true" tabindex="-1"></a><span class="fu">## Act V {#act-5}</span></span>
-<span id="cb291-8"><a href="#cb291-8" aria-hidden="true" tabindex="-1"></a>Hamlet dies.</span>
-<span id="cb291-9"><a href="#cb291-9" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb291-10"><a href="#cb291-10" aria-hidden="true" tabindex="-1"></a><span class="fu">## Act I {#act-1}</span></span>
-<span id="cb291-11"><a href="#cb291-11" aria-hidden="true" tabindex="-1"></a>Hamlet talks to ghost.</span></code></pre></div>
+<div class="sourceCode" id="cb299"><pre
+class="sourceCode md"><code class="sourceCode markdown"><span id="cb299-1"><a href="#cb299-1" aria-hidden="true" tabindex="-1"></a><span class="fu"># The Tragedy of Hamlet</span></span>
+<span id="cb299-2"><a href="#cb299-2" aria-hidden="true" tabindex="-1"></a>Shakespeare&#39;s longest play.</span>
+<span id="cb299-3"><a href="#cb299-3" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb299-4"><a href="#cb299-4" aria-hidden="true" tabindex="-1"></a><span class="fu">## Act III {#act-3}</span></span>
+<span id="cb299-5"><a href="#cb299-5" aria-hidden="true" tabindex="-1"></a>Hamlet kills Polonius.</span>
+<span id="cb299-6"><a href="#cb299-6" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb299-7"><a href="#cb299-7" aria-hidden="true" tabindex="-1"></a><span class="fu">## Act V {#act-5}</span></span>
+<span id="cb299-8"><a href="#cb299-8" aria-hidden="true" tabindex="-1"></a>Hamlet dies.</span>
+<span id="cb299-9"><a href="#cb299-9" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb299-10"><a href="#cb299-10" aria-hidden="true" tabindex="-1"></a><span class="fu">## Act I {#act-1}</span></span>
+<span id="cb299-11"><a href="#cb299-11" aria-hidden="true" tabindex="-1"></a>Hamlet talks to ghost.</span></code></pre></div>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb292"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb292-1"><a href="#cb292-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
-<span id="cb292-2"><a href="#cb292-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionHeaderAttributes</span>{true}</span>
-<span id="cb292-3"><a href="#cb292-3" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb292-4"><a href="#cb292-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\font\normal</span>=cmr10<span class="fu">\normal</span></span>
-<span id="cb292-5"><a href="#cb292-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\font\big</span>=cmr10 at 12pt</span>
-<span id="cb292-6"><a href="#cb292-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHeadingTwo</span>#1{{<span class="fu">\big</span> #1<span class="fu">\par</span>}}</span>
-<span id="cb292-7"><a href="#cb292-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\font\bigger</span>=cmr10 scaled 1440</span>
-<span id="cb292-8"><a href="#cb292-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHeadingOne</span>#1{{<span class="fu">\bigger</span> #1<span class="fu">\par</span>}}</span>
-<span id="cb292-9"><a href="#cb292-9" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb292-10"><a href="#cb292-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionSlice</span>{^ ^act-3}</span>
-<span id="cb292-11"><a href="#cb292-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownInput</span>{hamlet.md}</span>
-<span id="cb292-12"><a href="#cb292-12" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb292-13"><a href="#cb292-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionSlice</span>{act-1}</span>
-<span id="cb292-14"><a href="#cb292-14" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownInput</span>{hamlet.md}</span>
-<span id="cb292-15"><a href="#cb292-15" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb292-16"><a href="#cb292-16" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionSlice</span>{act-3 act-5}</span>
-<span id="cb292-17"><a href="#cb292-17" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownInput</span>{hamlet.md}</span>
-<span id="cb292-18"><a href="#cb292-18" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb292-19"><a href="#cb292-19" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
+<div class="sourceCode" id="cb300"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb300-1"><a href="#cb300-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
+<span id="cb300-2"><a href="#cb300-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionHeaderAttributes</span>{true}</span>
+<span id="cb300-3"><a href="#cb300-3" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb300-4"><a href="#cb300-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\font\normal</span>=cmr10<span class="fu">\normal</span></span>
+<span id="cb300-5"><a href="#cb300-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\font\big</span>=cmr10 at 12pt</span>
+<span id="cb300-6"><a href="#cb300-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHeadingTwo</span>#1{{<span class="fu">\big</span> #1<span class="fu">\par</span>}}</span>
+<span id="cb300-7"><a href="#cb300-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\font\bigger</span>=cmr10 scaled 1440</span>
+<span id="cb300-8"><a href="#cb300-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHeadingOne</span>#1{{<span class="fu">\bigger</span> #1<span class="fu">\par</span>}}</span>
+<span id="cb300-9"><a href="#cb300-9" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb300-10"><a href="#cb300-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionSlice</span>{^ ^act-3}</span>
+<span id="cb300-11"><a href="#cb300-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownInput</span>{hamlet.md}</span>
+<span id="cb300-12"><a href="#cb300-12" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb300-13"><a href="#cb300-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionSlice</span>{act-1}</span>
+<span id="cb300-14"><a href="#cb300-14" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownInput</span>{hamlet.md}</span>
+<span id="cb300-15"><a href="#cb300-15" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb300-16"><a href="#cb300-16" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionSlice</span>{act-3 act-5}</span>
+<span id="cb300-17"><a href="#cb300-17" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownInput</span>{hamlet.md}</span>
+<span id="cb300-18"><a href="#cb300-18" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb300-19"><a href="#cb300-19" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb293"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb293-1"><a href="#cb293-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb301"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb301-1"><a href="#cb301-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -4776,34 +4953,34 @@ contain the following text:</p>
<h2 id="act-v">Act V</h2>
<p>Hamlet dies.</p>
</blockquote>
-<h5 class="unnumbered" id="latex-example-29"><span
+<h5 class="unnumbered" id="latex-example-32"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb294"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb294-1"><a href="#cb294-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb294-2"><a href="#cb294-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[headerAttributes]{<span class="ex">markdown</span>}</span>
-<span id="cb294-3"><a href="#cb294-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">filecontents</span>}[overwrite,nosearch,noheader]{hamlet.md}</span>
-<span id="cb294-4"><a href="#cb294-4" aria-hidden="true" tabindex="-1"></a># The Tragedy of Hamlet</span>
-<span id="cb294-5"><a href="#cb294-5" aria-hidden="true" tabindex="-1"></a>Shakespeare&#39;s longest play.</span>
-<span id="cb294-6"><a href="#cb294-6" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb294-7"><a href="#cb294-7" aria-hidden="true" tabindex="-1"></a>## Act III {#act-3}</span>
-<span id="cb294-8"><a href="#cb294-8" aria-hidden="true" tabindex="-1"></a>Hamlet kills Polonius.</span>
-<span id="cb294-9"><a href="#cb294-9" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb294-10"><a href="#cb294-10" aria-hidden="true" tabindex="-1"></a>## Act V {#act-5}</span>
-<span id="cb294-11"><a href="#cb294-11" aria-hidden="true" tabindex="-1"></a>Hamlet dies.</span>
-<span id="cb294-12"><a href="#cb294-12" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb294-13"><a href="#cb294-13" aria-hidden="true" tabindex="-1"></a>## Act I {#act-1}</span>
-<span id="cb294-14"><a href="#cb294-14" aria-hidden="true" tabindex="-1"></a>Hamlet talks to ghost.</span>
-<span id="cb294-15"><a href="#cb294-15" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">filecontents</span>}</span>
-<span id="cb294-16"><a href="#cb294-16" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb294-17"><a href="#cb294-17" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownInput</span>[slice=^ ^act-3]{hamlet.md}</span>
-<span id="cb294-18"><a href="#cb294-18" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownInput</span>[slice=act-1]{hamlet.md}</span>
-<span id="cb294-19"><a href="#cb294-19" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownInput</span>[slice=act-3 act-5]{hamlet.md}</span>
-<span id="cb294-20"><a href="#cb294-20" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<div class="sourceCode" id="cb302"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb302-1"><a href="#cb302-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb302-2"><a href="#cb302-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[headerAttributes]{<span class="ex">markdown</span>}</span>
+<span id="cb302-3"><a href="#cb302-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">filecontents</span>}[overwrite,nosearch,noheader]{hamlet.md}</span>
+<span id="cb302-4"><a href="#cb302-4" aria-hidden="true" tabindex="-1"></a># The Tragedy of Hamlet</span>
+<span id="cb302-5"><a href="#cb302-5" aria-hidden="true" tabindex="-1"></a>Shakespeare&#39;s longest play.</span>
+<span id="cb302-6"><a href="#cb302-6" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb302-7"><a href="#cb302-7" aria-hidden="true" tabindex="-1"></a>## Act III {#act-3}</span>
+<span id="cb302-8"><a href="#cb302-8" aria-hidden="true" tabindex="-1"></a>Hamlet kills Polonius.</span>
+<span id="cb302-9"><a href="#cb302-9" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb302-10"><a href="#cb302-10" aria-hidden="true" tabindex="-1"></a>## Act V {#act-5}</span>
+<span id="cb302-11"><a href="#cb302-11" aria-hidden="true" tabindex="-1"></a>Hamlet dies.</span>
+<span id="cb302-12"><a href="#cb302-12" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb302-13"><a href="#cb302-13" aria-hidden="true" tabindex="-1"></a>## Act I {#act-1}</span>
+<span id="cb302-14"><a href="#cb302-14" aria-hidden="true" tabindex="-1"></a>Hamlet talks to ghost.</span>
+<span id="cb302-15"><a href="#cb302-15" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">filecontents</span>}</span>
+<span id="cb302-16"><a href="#cb302-16" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb302-17"><a href="#cb302-17" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownInput</span>[slice=^ ^act-3]{hamlet.md}</span>
+<span id="cb302-18"><a href="#cb302-18" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownInput</span>[slice=act-1]{hamlet.md}</span>
+<span id="cb302-19"><a href="#cb302-19" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownInput</span>[slice=act-3 act-5]{hamlet.md}</span>
+<span id="cb302-20"><a href="#cb302-20" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb295"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb295-1"><a href="#cb295-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb303"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb303-1"><a href="#cb303-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -4820,33 +4997,33 @@ contain the following text:</p>
class="tex">T<sub>e</sub>X</span>t Example</h5>
<p>Using a text editor, create a text document named
<code>hamlet.md</code> with the following content:</p>
-<div class="sourceCode" id="cb296"><pre
-class="sourceCode md"><code class="sourceCode markdown"><span id="cb296-1"><a href="#cb296-1" aria-hidden="true" tabindex="-1"></a><span class="fu"># The Tragedy of Hamlet</span></span>
-<span id="cb296-2"><a href="#cb296-2" aria-hidden="true" tabindex="-1"></a>Shakespeare&#39;s longest play.</span>
-<span id="cb296-3"><a href="#cb296-3" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb296-4"><a href="#cb296-4" aria-hidden="true" tabindex="-1"></a><span class="fu">## Act III {#act-3}</span></span>
-<span id="cb296-5"><a href="#cb296-5" aria-hidden="true" tabindex="-1"></a>Hamlet kills Polonius.</span>
-<span id="cb296-6"><a href="#cb296-6" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb296-7"><a href="#cb296-7" aria-hidden="true" tabindex="-1"></a><span class="fu">## Act V {#act-5}</span></span>
-<span id="cb296-8"><a href="#cb296-8" aria-hidden="true" tabindex="-1"></a>Hamlet dies.</span>
-<span id="cb296-9"><a href="#cb296-9" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb296-10"><a href="#cb296-10" aria-hidden="true" tabindex="-1"></a><span class="fu">## Act I {#act-1}</span></span>
-<span id="cb296-11"><a href="#cb296-11" aria-hidden="true" tabindex="-1"></a>Hamlet talks to ghost.</span></code></pre></div>
+<div class="sourceCode" id="cb304"><pre
+class="sourceCode md"><code class="sourceCode markdown"><span id="cb304-1"><a href="#cb304-1" aria-hidden="true" tabindex="-1"></a><span class="fu"># The Tragedy of Hamlet</span></span>
+<span id="cb304-2"><a href="#cb304-2" aria-hidden="true" tabindex="-1"></a>Shakespeare&#39;s longest play.</span>
+<span id="cb304-3"><a href="#cb304-3" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb304-4"><a href="#cb304-4" aria-hidden="true" tabindex="-1"></a><span class="fu">## Act III {#act-3}</span></span>
+<span id="cb304-5"><a href="#cb304-5" aria-hidden="true" tabindex="-1"></a>Hamlet kills Polonius.</span>
+<span id="cb304-6"><a href="#cb304-6" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb304-7"><a href="#cb304-7" aria-hidden="true" tabindex="-1"></a><span class="fu">## Act V {#act-5}</span></span>
+<span id="cb304-8"><a href="#cb304-8" aria-hidden="true" tabindex="-1"></a>Hamlet dies.</span>
+<span id="cb304-9"><a href="#cb304-9" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb304-10"><a href="#cb304-10" aria-hidden="true" tabindex="-1"></a><span class="fu">## Act I {#act-1}</span></span>
+<span id="cb304-11"><a href="#cb304-11" aria-hidden="true" tabindex="-1"></a>Hamlet talks to ghost.</span></code></pre></div>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb297"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb297-1"><a href="#cb297-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
-<span id="cb297-2"><a href="#cb297-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[headerAttributes = yes]</span>
-<span id="cb297-3"><a href="#cb297-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
-<span id="cb297-4"><a href="#cb297-4" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb297-5"><a href="#cb297-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\inputmarkdown</span>[slice = ^ ^act-3]{example.md}</span>
-<span id="cb297-6"><a href="#cb297-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\inputmarkdown</span>[slice = act-1]{example.md}</span>
-<span id="cb297-7"><a href="#cb297-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\inputmarkdown</span>[slice = act-3 act-5]{example.md}</span>
-<span id="cb297-8"><a href="#cb297-8" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb297-9"><a href="#cb297-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
+<div class="sourceCode" id="cb305"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb305-1"><a href="#cb305-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
+<span id="cb305-2"><a href="#cb305-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[headerAttributes = yes]</span>
+<span id="cb305-3"><a href="#cb305-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
+<span id="cb305-4"><a href="#cb305-4" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb305-5"><a href="#cb305-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\inputmarkdown</span>[slice = ^ ^act-3]{example.md}</span>
+<span id="cb305-6"><a href="#cb305-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\inputmarkdown</span>[slice = act-1]{example.md}</span>
+<span id="cb305-7"><a href="#cb305-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\inputmarkdown</span>[slice = act-3 act-5]{example.md}</span>
+<span id="cb305-8"><a href="#cb305-8" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb305-9"><a href="#cb305-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb298"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb298-1"><a href="#cb298-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb306"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb306-1"><a href="#cb306-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -4859,8 +5036,8 @@ contain the following text:</p>
<h2 id="act-v-2">Act V</h2>
<p>Hamlet dies.</p>
</blockquote>
-<h4 data-number="2.2.1.36" id="option-smartellipses"><span
-class="header-section-number">2.2.1.36</span> Option
+<h4 data-number="2.2.1.39" id="option-smartellipses"><span
+class="header-section-number">2.2.1.39</span> Option
<code>smartEllipses</code></h4>
<dl>
<dt><code>smartEllipses</code> (default value: <code>false</code>)</dt>
@@ -4887,25 +5064,25 @@ class="tex">T<sub>e</sub>X</span> macro.</p>
Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb299"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb299-1"><a href="#cb299-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
-<span id="cb299-2"><a href="#cb299-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererEllipsis</span>{. . .}</span>
-<span id="cb299-3"><a href="#cb299-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span>
-<span id="cb299-4"><a href="#cb299-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\directlua</span>{</span>
-<span id="cb299-5"><a href="#cb299-5" aria-hidden="true" tabindex="-1"></a> local markdown = require(&quot;markdown&quot;)</span>
-<span id="cb299-6"><a href="#cb299-6" aria-hidden="true" tabindex="-1"></a> local convert = markdown.new()</span>
-<span id="cb299-7"><a href="#cb299-7" aria-hidden="true" tabindex="-1"></a> local input = &quot;These are just three regular dots ...&quot;</span>
-<span id="cb299-8"><a href="#cb299-8" aria-hidden="true" tabindex="-1"></a> tex.sprint(convert(input)) }</span>
-<span id="cb299-9"><a href="#cb299-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\par</span></span>
-<span id="cb299-10"><a href="#cb299-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\directlua</span>{</span>
-<span id="cb299-11"><a href="#cb299-11" aria-hidden="true" tabindex="-1"></a> local markdown = require(&quot;markdown&quot;)</span>
-<span id="cb299-12"><a href="#cb299-12" aria-hidden="true" tabindex="-1"></a> local convert = markdown.new({smartEllipses = true})</span>
-<span id="cb299-13"><a href="#cb299-13" aria-hidden="true" tabindex="-1"></a> local input = &quot;... and this is a victorian ellipsis.&quot;</span>
-<span id="cb299-14"><a href="#cb299-14" aria-hidden="true" tabindex="-1"></a> tex.sprint(convert(input)) }</span>
-<span id="cb299-15"><a href="#cb299-15" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
+<div class="sourceCode" id="cb307"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb307-1"><a href="#cb307-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
+<span id="cb307-2"><a href="#cb307-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererEllipsis</span>{. . .}</span>
+<span id="cb307-3"><a href="#cb307-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span>
+<span id="cb307-4"><a href="#cb307-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\directlua</span>{</span>
+<span id="cb307-5"><a href="#cb307-5" aria-hidden="true" tabindex="-1"></a> local markdown = require(&quot;markdown&quot;)</span>
+<span id="cb307-6"><a href="#cb307-6" aria-hidden="true" tabindex="-1"></a> local convert = markdown.new()</span>
+<span id="cb307-7"><a href="#cb307-7" aria-hidden="true" tabindex="-1"></a> local input = &quot;These are just three regular dots ...&quot;</span>
+<span id="cb307-8"><a href="#cb307-8" aria-hidden="true" tabindex="-1"></a> tex.sprint(convert(input)) }</span>
+<span id="cb307-9"><a href="#cb307-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\par</span></span>
+<span id="cb307-10"><a href="#cb307-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\directlua</span>{</span>
+<span id="cb307-11"><a href="#cb307-11" aria-hidden="true" tabindex="-1"></a> local markdown = require(&quot;markdown&quot;)</span>
+<span id="cb307-12"><a href="#cb307-12" aria-hidden="true" tabindex="-1"></a> local convert = markdown.new({smartEllipses = true})</span>
+<span id="cb307-13"><a href="#cb307-13" aria-hidden="true" tabindex="-1"></a> local input = &quot;... and this is a victorian ellipsis.&quot;</span>
+<span id="cb307-14"><a href="#cb307-14" aria-hidden="true" tabindex="-1"></a> tex.sprint(convert(input)) }</span>
+<span id="cb307-15"><a href="#cb307-15" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
<p>Then, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb300"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb300-1"><a href="#cb300-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb308"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb308-1"><a href="#cb308-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -4915,23 +5092,23 @@ contain the following text:</p>
<h5 class="unnumbered" id="lua-cli-example-9">Lua CLI Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb301"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb301-1"><a href="#cb301-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
-<span id="cb301-2"><a href="#cb301-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererEllipsis</span>{. . .}</span>
-<span id="cb301-3"><a href="#cb301-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span>
-<span id="cb301-4"><a href="#cb301-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> optionfalse</span>
-<span id="cb301-5"><a href="#cb301-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\par</span></span>
-<span id="cb301-6"><a href="#cb301-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> optiontrue</span>
-<span id="cb301-7"><a href="#cb301-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
+<div class="sourceCode" id="cb309"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb309-1"><a href="#cb309-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
+<span id="cb309-2"><a href="#cb309-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererEllipsis</span>{. . .}</span>
+<span id="cb309-3"><a href="#cb309-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span>
+<span id="cb309-4"><a href="#cb309-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> optionfalse</span>
+<span id="cb309-5"><a href="#cb309-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\par</span></span>
+<span id="cb309-6"><a href="#cb309-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> optiontrue</span>
+<span id="cb309-7"><a href="#cb309-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
<p>Using a text editor, create a text document named
<code>content.md</code> with the following content:</p>
-<div class="sourceCode" id="cb302"><pre
-class="sourceCode md"><code class="sourceCode markdown"><span id="cb302-1"><a href="#cb302-1" aria-hidden="true" tabindex="-1"></a>Are these just three regular dots, a victorian ellipsis, or ... ?</span></code></pre></div>
+<div class="sourceCode" id="cb310"><pre
+class="sourceCode md"><code class="sourceCode markdown"><span id="cb310-1"><a href="#cb310-1" aria-hidden="true" tabindex="-1"></a>Are these just three regular dots, a victorian ellipsis, or ... ?</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb303"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb303-1"><a href="#cb303-1" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ <span class="at">--</span> content.md optionfalse.tex</span>
-<span id="cb303-2"><a href="#cb303-2" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ smartEllipses=true <span class="at">--</span> content.md optiontrue.tex</span>
-<span id="cb303-3"><a href="#cb303-3" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb311"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb311-1"><a href="#cb311-1" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ <span class="at">--</span> content.md optionfalse.tex</span>
+<span id="cb311-2"><a href="#cb311-2" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ smartEllipses=true <span class="at">--</span> content.md optiontrue.tex</span>
+<span id="cb311-3"><a href="#cb311-3" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
<p>where ⟨<em>CLI pathname</em>⟩ corresponds to the location of the Lua
CLI script file, such as
<code>~/texmf/scripts/markdown/markdown-cli.lua</code> on UN*X systems
@@ -4952,55 +5129,55 @@ contain the following text:</p>
class="tex">T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb304"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb304-1"><a href="#cb304-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
-<span id="cb304-2"><a href="#cb304-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererEllipsis</span>{. . .}</span>
-<span id="cb304-3"><a href="#cb304-3" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb304-4"><a href="#cb304-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
-<span id="cb304-5"><a href="#cb304-5" aria-hidden="true" tabindex="-1"></a>These are just three regular dots ...</span>
-<span id="cb304-6"><a href="#cb304-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
-<span id="cb304-7"><a href="#cb304-7" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb304-8"><a href="#cb304-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionSmartEllipses</span>{true}</span>
-<span id="cb304-9"><a href="#cb304-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
-<span id="cb304-10"><a href="#cb304-10" aria-hidden="true" tabindex="-1"></a>... and this is a victorian ellipsis.</span>
-<span id="cb304-11"><a href="#cb304-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
-<span id="cb304-12"><a href="#cb304-12" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb304-13"><a href="#cb304-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
+<div class="sourceCode" id="cb312"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb312-1"><a href="#cb312-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
+<span id="cb312-2"><a href="#cb312-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererEllipsis</span>{. . .}</span>
+<span id="cb312-3"><a href="#cb312-3" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb312-4"><a href="#cb312-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
+<span id="cb312-5"><a href="#cb312-5" aria-hidden="true" tabindex="-1"></a>These are just three regular dots ...</span>
+<span id="cb312-6"><a href="#cb312-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
+<span id="cb312-7"><a href="#cb312-7" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb312-8"><a href="#cb312-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionSmartEllipses</span>{true}</span>
+<span id="cb312-9"><a href="#cb312-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
+<span id="cb312-10"><a href="#cb312-10" aria-hidden="true" tabindex="-1"></a>... and this is a victorian ellipsis.</span>
+<span id="cb312-11"><a href="#cb312-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
+<span id="cb312-12"><a href="#cb312-12" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb312-13"><a href="#cb312-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb305"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb305-1"><a href="#cb305-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb313"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb313-1"><a href="#cb313-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
<p>These are just three regular dots …</p>
<p>. . . and this is a victorian ellipsis.</p>
</blockquote>
-<h5 class="unnumbered" id="latex-example-30"><span
+<h5 class="unnumbered" id="latex-example-33"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb306"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb306-1"><a href="#cb306-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb306-2"><a href="#cb306-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span>
-<span id="cb306-3"><a href="#cb306-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
-<span id="cb306-4"><a href="#cb306-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
-<span id="cb306-5"><a href="#cb306-5" aria-hidden="true" tabindex="-1"></a> ellipsis = {. . .}</span>
-<span id="cb306-6"><a href="#cb306-6" aria-hidden="true" tabindex="-1"></a> }</span>
-<span id="cb306-7"><a href="#cb306-7" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb306-8"><a href="#cb306-8" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb306-9"><a href="#cb306-9" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb306-10"><a href="#cb306-10" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb306-11"><a href="#cb306-11" aria-hidden="true" tabindex="-1"></a>These are just three regular dots ...</span>
-<span id="cb306-12"><a href="#cb306-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb306-13"><a href="#cb306-13" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb306-14"><a href="#cb306-14" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{smartEllipses}</span>
-<span id="cb306-15"><a href="#cb306-15" aria-hidden="true" tabindex="-1"></a>... and this is a victorian ellipsis.</span>
-<span id="cb306-16"><a href="#cb306-16" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span>
-<span id="cb306-17"><a href="#cb306-17" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb306-18"><a href="#cb306-18" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<div class="sourceCode" id="cb314"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb314-1"><a href="#cb314-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb314-2"><a href="#cb314-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span>
+<span id="cb314-3"><a href="#cb314-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
+<span id="cb314-4"><a href="#cb314-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
+<span id="cb314-5"><a href="#cb314-5" aria-hidden="true" tabindex="-1"></a> ellipsis = {. . .}</span>
+<span id="cb314-6"><a href="#cb314-6" aria-hidden="true" tabindex="-1"></a> }</span>
+<span id="cb314-7"><a href="#cb314-7" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb314-8"><a href="#cb314-8" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb314-9"><a href="#cb314-9" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb314-10"><a href="#cb314-10" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb314-11"><a href="#cb314-11" aria-hidden="true" tabindex="-1"></a>These are just three regular dots ...</span>
+<span id="cb314-12"><a href="#cb314-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb314-13"><a href="#cb314-13" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb314-14"><a href="#cb314-14" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{smartEllipses}</span>
+<span id="cb314-15"><a href="#cb314-15" aria-hidden="true" tabindex="-1"></a>... and this is a victorian ellipsis.</span>
+<span id="cb314-16"><a href="#cb314-16" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span>
+<span id="cb314-17"><a href="#cb314-17" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb314-18"><a href="#cb314-18" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb307"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb307-1"><a href="#cb307-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb315"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb315-1"><a href="#cb315-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -5011,32 +5188,32 @@ contain the following text:</p>
class="tex">T<sub>e</sub>X</span>t Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb308"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb308-1"><a href="#cb308-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
-<span id="cb308-2"><a href="#cb308-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererEllipsis</span>{. . .}</span>
-<span id="cb308-3"><a href="#cb308-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
-<span id="cb308-4"><a href="#cb308-4" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb308-5"><a href="#cb308-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb308-6"><a href="#cb308-6" aria-hidden="true" tabindex="-1"></a>These are just three regular dots ...</span>
-<span id="cb308-7"><a href="#cb308-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb308-8"><a href="#cb308-8" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb308-9"><a href="#cb308-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[smartEllipses = yes]</span>
-<span id="cb308-10"><a href="#cb308-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb308-11"><a href="#cb308-11" aria-hidden="true" tabindex="-1"></a>... and this is a victorian ellipsis.</span>
-<span id="cb308-12"><a href="#cb308-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb308-13"><a href="#cb308-13" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb308-14"><a href="#cb308-14" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
+<div class="sourceCode" id="cb316"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb316-1"><a href="#cb316-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
+<span id="cb316-2"><a href="#cb316-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererEllipsis</span>{. . .}</span>
+<span id="cb316-3"><a href="#cb316-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
+<span id="cb316-4"><a href="#cb316-4" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb316-5"><a href="#cb316-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb316-6"><a href="#cb316-6" aria-hidden="true" tabindex="-1"></a>These are just three regular dots ...</span>
+<span id="cb316-7"><a href="#cb316-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb316-8"><a href="#cb316-8" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb316-9"><a href="#cb316-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[smartEllipses = yes]</span>
+<span id="cb316-10"><a href="#cb316-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb316-11"><a href="#cb316-11" aria-hidden="true" tabindex="-1"></a>... and this is a victorian ellipsis.</span>
+<span id="cb316-12"><a href="#cb316-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb316-13"><a href="#cb316-13" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb316-14"><a href="#cb316-14" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb309"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb309-1"><a href="#cb309-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb317"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb317-1"><a href="#cb317-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
<p>These are just three regular dots …</p>
<p>. . . and this is a victorian ellipsis.</p>
</blockquote>
-<h4 data-number="2.2.1.37" id="option-startnumber"><span
-class="header-section-number">2.2.1.37</span> Option
+<h4 data-number="2.2.1.40" id="option-startnumber"><span
+class="header-section-number">2.2.1.40</span> Option
<code>startNumber</code></h4>
<dl>
<dt><code>startNumber</code> (default value: <code>true</code>)</dt>
@@ -5062,36 +5239,36 @@ class="tex">T<sub>e</sub>X</span> macro.</p>
</dl>
</dd>
</dl>
-<h5 class="unnumbered" id="latex-example-31"><span
+<h5 class="unnumbered" id="latex-example-34"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb310"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb310-1"><a href="#cb310-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb310-2"><a href="#cb310-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span>
-<span id="cb310-3"><a href="#cb310-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb310-4"><a href="#cb310-4" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb310-5"><a href="#cb310-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb310-6"><a href="#cb310-6" aria-hidden="true" tabindex="-1"></a>The following list respects the numbers specified in the markup:</span>
-<span id="cb310-7"><a href="#cb310-7" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb310-8"><a href="#cb310-8" aria-hidden="true" tabindex="-1"></a>3. third item</span>
-<span id="cb310-9"><a href="#cb310-9" aria-hidden="true" tabindex="-1"></a>4. fourth item</span>
-<span id="cb310-10"><a href="#cb310-10" aria-hidden="true" tabindex="-1"></a>5. fifth item</span>
-<span id="cb310-11"><a href="#cb310-11" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb310-12"><a href="#cb310-12" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb310-13"><a href="#cb310-13" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{startNumber=false}</span>
-<span id="cb310-14"><a href="#cb310-14" aria-hidden="true" tabindex="-1"></a>The following list does not respect the numbers specified in the</span>
-<span id="cb310-15"><a href="#cb310-15" aria-hidden="true" tabindex="-1"></a>markup:</span>
-<span id="cb310-16"><a href="#cb310-16" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb310-17"><a href="#cb310-17" aria-hidden="true" tabindex="-1"></a>3. third item</span>
-<span id="cb310-18"><a href="#cb310-18" aria-hidden="true" tabindex="-1"></a>4. fourth item</span>
-<span id="cb310-19"><a href="#cb310-19" aria-hidden="true" tabindex="-1"></a>5. fifth item</span>
-<span id="cb310-20"><a href="#cb310-20" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span>
-<span id="cb310-21"><a href="#cb310-21" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb310-22"><a href="#cb310-22" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<div class="sourceCode" id="cb318"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb318-1"><a href="#cb318-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb318-2"><a href="#cb318-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span>
+<span id="cb318-3"><a href="#cb318-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb318-4"><a href="#cb318-4" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb318-5"><a href="#cb318-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb318-6"><a href="#cb318-6" aria-hidden="true" tabindex="-1"></a>The following list respects the numbers specified in the markup:</span>
+<span id="cb318-7"><a href="#cb318-7" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb318-8"><a href="#cb318-8" aria-hidden="true" tabindex="-1"></a>3. third item</span>
+<span id="cb318-9"><a href="#cb318-9" aria-hidden="true" tabindex="-1"></a>4. fourth item</span>
+<span id="cb318-10"><a href="#cb318-10" aria-hidden="true" tabindex="-1"></a>5. fifth item</span>
+<span id="cb318-11"><a href="#cb318-11" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb318-12"><a href="#cb318-12" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb318-13"><a href="#cb318-13" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{startNumber=false}</span>
+<span id="cb318-14"><a href="#cb318-14" aria-hidden="true" tabindex="-1"></a>The following list does not respect the numbers specified in the</span>
+<span id="cb318-15"><a href="#cb318-15" aria-hidden="true" tabindex="-1"></a>markup:</span>
+<span id="cb318-16"><a href="#cb318-16" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb318-17"><a href="#cb318-17" aria-hidden="true" tabindex="-1"></a>3. third item</span>
+<span id="cb318-18"><a href="#cb318-18" aria-hidden="true" tabindex="-1"></a>4. fourth item</span>
+<span id="cb318-19"><a href="#cb318-19" aria-hidden="true" tabindex="-1"></a>5. fifth item</span>
+<span id="cb318-20"><a href="#cb318-20" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span>
+<span id="cb318-21"><a href="#cb318-21" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb318-22"><a href="#cb318-22" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb311"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb311-1"><a href="#cb311-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb319"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb319-1"><a href="#cb319-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -5113,30 +5290,30 @@ markup:</p>
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="cb312"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb312-1"><a href="#cb312-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
-<span id="cb312-2"><a href="#cb312-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
-<span id="cb312-3"><a href="#cb312-3" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb312-4"><a href="#cb312-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb312-5"><a href="#cb312-5" aria-hidden="true" tabindex="-1"></a>The following list respects the numbers specified in the markup:</span>
-<span id="cb312-6"><a href="#cb312-6" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb312-7"><a href="#cb312-7" aria-hidden="true" tabindex="-1"></a>3. third item</span>
-<span id="cb312-8"><a href="#cb312-8" aria-hidden="true" tabindex="-1"></a>4. fourth item</span>
-<span id="cb312-9"><a href="#cb312-9" aria-hidden="true" tabindex="-1"></a>5. fifth item</span>
-<span id="cb312-10"><a href="#cb312-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb312-11"><a href="#cb312-11" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb312-12"><a href="#cb312-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[startNumber = no]</span>
-<span id="cb312-13"><a href="#cb312-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb312-14"><a href="#cb312-14" aria-hidden="true" tabindex="-1"></a>The following list respects the numbers specified in the markup:</span>
-<span id="cb312-15"><a href="#cb312-15" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb312-16"><a href="#cb312-16" aria-hidden="true" tabindex="-1"></a>3. third item</span>
-<span id="cb312-17"><a href="#cb312-17" aria-hidden="true" tabindex="-1"></a>4. fourth item</span>
-<span id="cb312-18"><a href="#cb312-18" aria-hidden="true" tabindex="-1"></a>5. fifth item</span>
-<span id="cb312-19"><a href="#cb312-19" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb312-20"><a href="#cb312-20" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
+<div class="sourceCode" id="cb320"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb320-1"><a href="#cb320-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
+<span id="cb320-2"><a href="#cb320-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
+<span id="cb320-3"><a href="#cb320-3" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb320-4"><a href="#cb320-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb320-5"><a href="#cb320-5" aria-hidden="true" tabindex="-1"></a>The following list respects the numbers specified in the markup:</span>
+<span id="cb320-6"><a href="#cb320-6" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb320-7"><a href="#cb320-7" aria-hidden="true" tabindex="-1"></a>3. third item</span>
+<span id="cb320-8"><a href="#cb320-8" aria-hidden="true" tabindex="-1"></a>4. fourth item</span>
+<span id="cb320-9"><a href="#cb320-9" aria-hidden="true" tabindex="-1"></a>5. fifth item</span>
+<span id="cb320-10"><a href="#cb320-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb320-11"><a href="#cb320-11" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb320-12"><a href="#cb320-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[startNumber = no]</span>
+<span id="cb320-13"><a href="#cb320-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb320-14"><a href="#cb320-14" aria-hidden="true" tabindex="-1"></a>The following list respects the numbers specified in the markup:</span>
+<span id="cb320-15"><a href="#cb320-15" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb320-16"><a href="#cb320-16" aria-hidden="true" tabindex="-1"></a>3. third item</span>
+<span id="cb320-17"><a href="#cb320-17" aria-hidden="true" tabindex="-1"></a>4. fourth item</span>
+<span id="cb320-18"><a href="#cb320-18" aria-hidden="true" tabindex="-1"></a>5. fifth item</span>
+<span id="cb320-19"><a href="#cb320-19" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb320-20"><a href="#cb320-20" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb313"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb313-1"><a href="#cb313-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb321"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb321-1"><a href="#cb321-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -5154,8 +5331,8 @@ markup:</p>
<li>fifth item</li>
</ol>
</blockquote>
-<h4 data-number="2.2.1.38" id="option-strikethrough"><span
-class="header-section-number">2.2.1.38</span> Option
+<h4 data-number="2.2.1.41" id="option-strikethrough"><span
+class="header-section-number">2.2.1.41</span> Option
<code>strikeThrough</code></h4>
<dl>
<dt><code>strikeThrough</code> (default value: <code>false</code>)</dt>
@@ -5164,8 +5341,8 @@ class="header-section-number">2.2.1.38</span> Option
<dt>true</dt>
<dd>
<p>Enable the Pandoc strike-through syntax extension:</p>
-<div class="sourceCode" id="cb314"><pre
-class="sourceCode md"><code class="sourceCode markdown"><span id="cb314-1"><a href="#cb314-1" aria-hidden="true" tabindex="-1"></a>This ~~is deleted text.~~</span></code></pre></div>
+<div class="sourceCode" id="cb322"><pre
+class="sourceCode md"><code class="sourceCode markdown"><span id="cb322-1"><a href="#cb322-1" aria-hidden="true" tabindex="-1"></a>This ~~is deleted text.~~</span></code></pre></div>
</dd>
</dl>
</dd>
@@ -5182,44 +5359,44 @@ class="sourceCode md"><code class="sourceCode markdown"><span id="cb314-1"><a hr
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="cb315"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb315-1"><a href="#cb315-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
-<span id="cb315-2"><a href="#cb315-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionStrikeThrough</span>{true}</span>
-<span id="cb315-3"><a href="#cb315-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> soulutf8.sty</span>
-<span id="cb315-4"><a href="#cb315-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererStrikeThrough</span>#1{<span class="fu">\st</span>{#1}}</span>
-<span id="cb315-5"><a href="#cb315-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
-<span id="cb315-6"><a href="#cb315-6" aria-hidden="true" tabindex="-1"></a>This is ~~a lunar roving vehicle~~ strike-through text.</span>
-<span id="cb315-7"><a href="#cb315-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
-<span id="cb315-8"><a href="#cb315-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
+<div class="sourceCode" id="cb323"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb323-1"><a href="#cb323-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
+<span id="cb323-2"><a href="#cb323-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionStrikeThrough</span>{true}</span>
+<span id="cb323-3"><a href="#cb323-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> soulutf8.sty</span>
+<span id="cb323-4"><a href="#cb323-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererStrikeThrough</span>#1{<span class="fu">\st</span>{#1}}</span>
+<span id="cb323-5"><a href="#cb323-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
+<span id="cb323-6"><a href="#cb323-6" aria-hidden="true" tabindex="-1"></a>This is ~~a lunar roving vehicle~~ strike-through text.</span>
+<span id="cb323-7"><a href="#cb323-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
+<span id="cb323-8"><a href="#cb323-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb316"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb316-1"><a href="#cb316-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb324"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb324-1"><a href="#cb324-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
<p>This is <del>a lunar roving vehicle</del> strike-through text.</p>
</blockquote>
-<h5 class="unnumbered" id="latex-example-32"><span
+<h5 class="unnumbered" id="latex-example-35"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb317"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb317-1"><a href="#cb317-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb317-2"><a href="#cb317-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[strikeThrough]{<span class="ex">markdown</span>}</span>
-<span id="cb317-3"><a href="#cb317-3" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">soulutf8</span>}</span>
-<span id="cb317-4"><a href="#cb317-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
-<span id="cb317-5"><a href="#cb317-5" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
-<span id="cb317-6"><a href="#cb317-6" aria-hidden="true" tabindex="-1"></a> strikeThrough = {<span class="fu">\st</span>{#1}},</span>
-<span id="cb317-7"><a href="#cb317-7" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb317-8"><a href="#cb317-8" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb317-9"><a href="#cb317-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb317-10"><a href="#cb317-10" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb317-11"><a href="#cb317-11" aria-hidden="true" tabindex="-1"></a>This is ~~a lunar roving vehicle~~ strike-through text.</span>
-<span id="cb317-12"><a href="#cb317-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb317-13"><a href="#cb317-13" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<div class="sourceCode" id="cb325"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb325-1"><a href="#cb325-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb325-2"><a href="#cb325-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[strikeThrough]{<span class="ex">markdown</span>}</span>
+<span id="cb325-3"><a href="#cb325-3" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">soulutf8</span>}</span>
+<span id="cb325-4"><a href="#cb325-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
+<span id="cb325-5"><a href="#cb325-5" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
+<span id="cb325-6"><a href="#cb325-6" aria-hidden="true" tabindex="-1"></a> strikeThrough = {<span class="fu">\st</span>{#1}},</span>
+<span id="cb325-7"><a href="#cb325-7" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb325-8"><a href="#cb325-8" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb325-9"><a href="#cb325-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb325-10"><a href="#cb325-10" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb325-11"><a href="#cb325-11" aria-hidden="true" tabindex="-1"></a>This is ~~a lunar roving vehicle~~ strike-through text.</span>
+<span id="cb325-12"><a href="#cb325-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb325-13"><a href="#cb325-13" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb318"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb318-1"><a href="#cb318-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb326"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb326-1"><a href="#cb326-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -5229,25 +5406,25 @@ contain the following text:</p>
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="cb319"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb319-1"><a href="#cb319-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
-<span id="cb319-2"><a href="#cb319-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[strikeThrough = yes]</span>
-<span id="cb319-3"><a href="#cb319-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererStrikeThrough</span>#1{<span class="fu">\overstrikes</span>{#1}}</span>
-<span id="cb319-4"><a href="#cb319-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
-<span id="cb319-5"><a href="#cb319-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb319-6"><a href="#cb319-6" aria-hidden="true" tabindex="-1"></a>This is ~~a lunar roving vehicle~~ strike-through text.</span>
-<span id="cb319-7"><a href="#cb319-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb319-8"><a href="#cb319-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
+<div class="sourceCode" id="cb327"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb327-1"><a href="#cb327-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
+<span id="cb327-2"><a href="#cb327-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[strikeThrough = yes]</span>
+<span id="cb327-3"><a href="#cb327-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererStrikeThrough</span>#1{<span class="fu">\overstrikes</span>{#1}}</span>
+<span id="cb327-4"><a href="#cb327-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
+<span id="cb327-5"><a href="#cb327-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb327-6"><a href="#cb327-6" aria-hidden="true" tabindex="-1"></a>This is ~~a lunar roving vehicle~~ strike-through text.</span>
+<span id="cb327-7"><a href="#cb327-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb327-8"><a href="#cb327-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb320"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb320-1"><a href="#cb320-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb328"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb328-1"><a href="#cb328-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
<p>This is <del>a lunar roving vehicle</del> strike-through text.</p>
</blockquote>
-<h4 data-number="2.2.1.39" id="option-stripindent"><span
-class="header-section-number">2.2.1.39</span> Option
+<h4 data-number="2.2.1.42" id="option-stripindent"><span
+class="header-section-number">2.2.1.42</span> Option
<code>stripIndent</code></h4>
<dl>
<dt><code>stripIndent</code> (default value: <code>false</code>)</dt>
@@ -5258,14 +5435,14 @@ class="header-section-number">2.2.1.39</span> Option
<p>Strip the minimal indentation of non-blank lines from all lines in a
markdown document. Requires that the
<strong><code>preserveTabs</code></strong> Lua option is disabled:</p>
-<div class="sourceCode" id="cb321"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb321-1"><a href="#cb321-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb321-2"><a href="#cb321-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[stripIndent]{<span class="ex">markdown</span>}</span>
-<span id="cb321-3"><a href="#cb321-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb321-4"><a href="#cb321-4" aria-hidden="true" tabindex="-1"></a> <span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb321-5"><a href="#cb321-5" aria-hidden="true" tabindex="-1"></a> Hello *world*!</span>
-<span id="cb321-6"><a href="#cb321-6" aria-hidden="true" tabindex="-1"></a> <span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb321-7"><a href="#cb321-7" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<div class="sourceCode" id="cb329"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb329-1"><a href="#cb329-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb329-2"><a href="#cb329-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[stripIndent]{<span class="ex">markdown</span>}</span>
+<span id="cb329-3"><a href="#cb329-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb329-4"><a href="#cb329-4" aria-hidden="true" tabindex="-1"></a> <span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb329-5"><a href="#cb329-5" aria-hidden="true" tabindex="-1"></a> Hello *world*!</span>
+<span id="cb329-6"><a href="#cb329-6" aria-hidden="true" tabindex="-1"></a> <span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb329-7"><a href="#cb329-7" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
</dd>
</dl>
</dd>
@@ -5283,54 +5460,54 @@ document.</p>
class="tex">T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb322"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb322-1"><a href="#cb322-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
-<span id="cb322-2"><a href="#cb322-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionStripIndent</span>{true}</span>
-<span id="cb322-3"><a href="#cb322-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
-<span id="cb322-4"><a href="#cb322-4" aria-hidden="true" tabindex="-1"></a> Hello *world*!</span>
-<span id="cb322-5"><a href="#cb322-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
-<span id="cb322-6"><a href="#cb322-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
+<div class="sourceCode" id="cb330"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb330-1"><a href="#cb330-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
+<span id="cb330-2"><a href="#cb330-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionStripIndent</span>{true}</span>
+<span id="cb330-3"><a href="#cb330-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
+<span id="cb330-4"><a href="#cb330-4" aria-hidden="true" tabindex="-1"></a> Hello *world*!</span>
+<span id="cb330-5"><a href="#cb330-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
+<span id="cb330-6"><a href="#cb330-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb323"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb323-1"><a href="#cb323-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb331"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb331-1"><a href="#cb331-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the text “Hello <em>world</em>!”</p>
-<h5 class="unnumbered" id="latex-example-33"><span
+<h5 class="unnumbered" id="latex-example-36"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb324"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb324-1"><a href="#cb324-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb324-2"><a href="#cb324-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[stripIndent]{<span class="ex">markdown</span>}</span>
-<span id="cb324-3"><a href="#cb324-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb324-4"><a href="#cb324-4" aria-hidden="true" tabindex="-1"></a> <span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb324-5"><a href="#cb324-5" aria-hidden="true" tabindex="-1"></a> Hello *world*!</span>
-<span id="cb324-6"><a href="#cb324-6" aria-hidden="true" tabindex="-1"></a> <span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb324-7"><a href="#cb324-7" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<div class="sourceCode" id="cb332"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb332-1"><a href="#cb332-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb332-2"><a href="#cb332-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[stripIndent]{<span class="ex">markdown</span>}</span>
+<span id="cb332-3"><a href="#cb332-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb332-4"><a href="#cb332-4" aria-hidden="true" tabindex="-1"></a> <span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb332-5"><a href="#cb332-5" aria-hidden="true" tabindex="-1"></a> Hello *world*!</span>
+<span id="cb332-6"><a href="#cb332-6" aria-hidden="true" tabindex="-1"></a> <span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb332-7"><a href="#cb332-7" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb325"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb325-1"><a href="#cb325-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb333"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb333-1"><a href="#cb333-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the text “Hello <em>world</em>!”</p>
<h5 class="unnumbered" id="context-example-25">Con<span
class="tex">T<sub>e</sub>X</span>t Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb326"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb326-1"><a href="#cb326-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
-<span id="cb326-2"><a href="#cb326-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[stripIndent = yes]</span>
-<span id="cb326-3"><a href="#cb326-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
-<span id="cb326-4"><a href="#cb326-4" aria-hidden="true" tabindex="-1"></a> <span class="fu">\startmarkdown</span></span>
-<span id="cb326-5"><a href="#cb326-5" aria-hidden="true" tabindex="-1"></a> Hello *world*!</span>
-<span id="cb326-6"><a href="#cb326-6" aria-hidden="true" tabindex="-1"></a> <span class="fu">\stopmarkdown</span></span>
-<span id="cb326-7"><a href="#cb326-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
+<div class="sourceCode" id="cb334"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb334-1"><a href="#cb334-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
+<span id="cb334-2"><a href="#cb334-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[stripIndent = yes]</span>
+<span id="cb334-3"><a href="#cb334-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
+<span id="cb334-4"><a href="#cb334-4" aria-hidden="true" tabindex="-1"></a> <span class="fu">\startmarkdown</span></span>
+<span id="cb334-5"><a href="#cb334-5" aria-hidden="true" tabindex="-1"></a> Hello *world*!</span>
+<span id="cb334-6"><a href="#cb334-6" aria-hidden="true" tabindex="-1"></a> <span class="fu">\stopmarkdown</span></span>
+<span id="cb334-7"><a href="#cb334-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb327"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb327-1"><a href="#cb327-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb335"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb335-1"><a href="#cb335-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the text “Hello <em>world</em>!”</p>
-<h4 data-number="2.2.1.40" id="option-subscripts"><span
-class="header-section-number">2.2.1.40</span> Option
+<h4 data-number="2.2.1.43" id="option-subscripts"><span
+class="header-section-number">2.2.1.43</span> Option
<code>subscripts</code></h4>
<dl>
<dt><code>subscripts</code> (default value: <code>false</code>)</dt>
@@ -5339,8 +5516,8 @@ class="header-section-number">2.2.1.40</span> Option
<dt>true</dt>
<dd>
<p>Enable the Pandoc subscript syntax extension:</p>
-<div class="sourceCode" id="cb328"><pre
-class="sourceCode md"><code class="sourceCode markdown"><span id="cb328-1"><a href="#cb328-1" aria-hidden="true" tabindex="-1"></a>H~2~O is a liquid.</span></code></pre></div>
+<div class="sourceCode" id="cb336"><pre
+class="sourceCode md"><code class="sourceCode markdown"><span id="cb336-1"><a href="#cb336-1" aria-hidden="true" tabindex="-1"></a>H~2~O is a liquid.</span></code></pre></div>
</dd>
</dl>
</dd>
@@ -5353,21 +5530,21 @@ class="sourceCode md"><code class="sourceCode markdown"><span id="cb328-1"><a hr
</dl>
</dd>
</dl>
-<h5 class="unnumbered" id="latex-example-34"><span
+<h5 class="unnumbered" id="latex-example-37"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb329"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb329-1"><a href="#cb329-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb329-2"><a href="#cb329-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[subscripts]{<span class="ex">markdown</span>}</span>
-<span id="cb329-3"><a href="#cb329-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb329-4"><a href="#cb329-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb329-5"><a href="#cb329-5" aria-hidden="true" tabindex="-1"></a>H~2~O is a liquid.</span>
-<span id="cb329-6"><a href="#cb329-6" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb329-7"><a href="#cb329-7" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<div class="sourceCode" id="cb337"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb337-1"><a href="#cb337-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb337-2"><a href="#cb337-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[subscripts]{<span class="ex">markdown</span>}</span>
+<span id="cb337-3"><a href="#cb337-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb337-4"><a href="#cb337-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb337-5"><a href="#cb337-5" aria-hidden="true" tabindex="-1"></a>H~2~O is a liquid.</span>
+<span id="cb337-6"><a href="#cb337-6" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb337-7"><a href="#cb337-7" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb330"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb330-1"><a href="#cb330-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb338"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb338-1"><a href="#cb338-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -5377,24 +5554,24 @@ contain the following text:</p>
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="cb331"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb331-1"><a href="#cb331-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
-<span id="cb331-2"><a href="#cb331-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[subscripts = yes]</span>
-<span id="cb331-3"><a href="#cb331-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
-<span id="cb331-4"><a href="#cb331-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb331-5"><a href="#cb331-5" aria-hidden="true" tabindex="-1"></a>H~2~O is a liquid.</span>
-<span id="cb331-6"><a href="#cb331-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb331-7"><a href="#cb331-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
+<div class="sourceCode" id="cb339"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb339-1"><a href="#cb339-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
+<span id="cb339-2"><a href="#cb339-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[subscripts = yes]</span>
+<span id="cb339-3"><a href="#cb339-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
+<span id="cb339-4"><a href="#cb339-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb339-5"><a href="#cb339-5" aria-hidden="true" tabindex="-1"></a>H~2~O is a liquid.</span>
+<span id="cb339-6"><a href="#cb339-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb339-7"><a href="#cb339-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb332"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb332-1"><a href="#cb332-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb340"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb340-1"><a href="#cb340-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
<p>H<sub>2</sub>O is a liquid.</p>
</blockquote>
-<h4 data-number="2.2.1.41" id="option-superscripts"><span
-class="header-section-number">2.2.1.41</span> Option
+<h4 data-number="2.2.1.44" id="option-superscripts"><span
+class="header-section-number">2.2.1.44</span> Option
<code>superscripts</code></h4>
<dl>
<dt><code>superscripts</code> (default value: <code>false</code>)</dt>
@@ -5403,8 +5580,8 @@ class="header-section-number">2.2.1.41</span> Option
<dt>true</dt>
<dd>
<p>Enable the Pandoc superscript syntax extension:</p>
-<div class="sourceCode" id="cb333"><pre
-class="sourceCode md"><code class="sourceCode markdown"><span id="cb333-1"><a href="#cb333-1" aria-hidden="true" tabindex="-1"></a>2^10^ is 1024.</span></code></pre></div>
+<div class="sourceCode" id="cb341"><pre
+class="sourceCode md"><code class="sourceCode markdown"><span id="cb341-1"><a href="#cb341-1" aria-hidden="true" tabindex="-1"></a>2^10^ is 1024.</span></code></pre></div>
</dd>
</dl>
</dd>
@@ -5417,21 +5594,21 @@ class="sourceCode md"><code class="sourceCode markdown"><span id="cb333-1"><a hr
</dl>
</dd>
</dl>
-<h5 class="unnumbered" id="latex-example-35"><span
+<h5 class="unnumbered" id="latex-example-38"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb334"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb334-1"><a href="#cb334-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb334-2"><a href="#cb334-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[superscripts]{<span class="ex">markdown</span>}</span>
-<span id="cb334-3"><a href="#cb334-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb334-4"><a href="#cb334-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb334-5"><a href="#cb334-5" aria-hidden="true" tabindex="-1"></a>2^10^ is 1024.</span>
-<span id="cb334-6"><a href="#cb334-6" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb334-7"><a href="#cb334-7" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<div class="sourceCode" id="cb342"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb342-1"><a href="#cb342-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb342-2"><a href="#cb342-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[superscripts]{<span class="ex">markdown</span>}</span>
+<span id="cb342-3"><a href="#cb342-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb342-4"><a href="#cb342-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb342-5"><a href="#cb342-5" aria-hidden="true" tabindex="-1"></a>2^10^ is 1024.</span>
+<span id="cb342-6"><a href="#cb342-6" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb342-7"><a href="#cb342-7" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb335"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb335-1"><a href="#cb335-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb343"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb343-1"><a href="#cb343-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -5441,24 +5618,24 @@ contain the following text:</p>
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="cb336"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb336-1"><a href="#cb336-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
-<span id="cb336-2"><a href="#cb336-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[superscripts = yes]</span>
-<span id="cb336-3"><a href="#cb336-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
-<span id="cb336-4"><a href="#cb336-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb336-5"><a href="#cb336-5" aria-hidden="true" tabindex="-1"></a>2^10^ is 1024.</span>
-<span id="cb336-6"><a href="#cb336-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb336-7"><a href="#cb336-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
+<div class="sourceCode" id="cb344"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb344-1"><a href="#cb344-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
+<span id="cb344-2"><a href="#cb344-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[superscripts = yes]</span>
+<span id="cb344-3"><a href="#cb344-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
+<span id="cb344-4"><a href="#cb344-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb344-5"><a href="#cb344-5" aria-hidden="true" tabindex="-1"></a>2^10^ is 1024.</span>
+<span id="cb344-6"><a href="#cb344-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb344-7"><a href="#cb344-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb337"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb337-1"><a href="#cb337-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb345"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb345-1"><a href="#cb345-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
<p>2<sup>10</sup> is 1024.</p>
</blockquote>
-<h4 data-number="2.2.1.42" id="option-tablecaptions"><span
-class="header-section-number">2.2.1.42</span> Option
+<h4 data-number="2.2.1.45" id="option-tablecaptions"><span
+class="header-section-number">2.2.1.45</span> Option
<code>tableCaptions</code></h4>
<dl>
<dt><code>tableCaptions</code> (default value: <code>false</code>)</dt>
@@ -5468,14 +5645,14 @@ class="header-section-number">2.2.1.42</span> Option
<dd>
<p>Enable the Pandoc <code>table_captions</code> syntax extension for <a
href="#pipe-tables">pipe tables</a>.</p>
-<div class="sourceCode" id="cb338"><pre
-class="sourceCode md"><code class="sourceCode markdown"><span id="cb338-1"><a href="#cb338-1" aria-hidden="true" tabindex="-1"></a>| Right | Left | Default | Center |</span>
-<span id="cb338-2"><a href="#cb338-2" aria-hidden="true" tabindex="-1"></a>|------:|:-----|---------|:------:|</span>
-<span id="cb338-3"><a href="#cb338-3" aria-hidden="true" tabindex="-1"></a>| 12 | 12 | 12 | 12 |</span>
-<span id="cb338-4"><a href="#cb338-4" aria-hidden="true" tabindex="-1"></a>| 123 | 123 | 123 | 123 |</span>
-<span id="cb338-5"><a href="#cb338-5" aria-hidden="true" tabindex="-1"></a>| 1 | 1 | 1 | 1 |</span>
-<span id="cb338-6"><a href="#cb338-6" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb338-7"><a href="#cb338-7" aria-hidden="true" tabindex="-1"></a> : Demonstration of pipe table syntax.</span></code></pre></div>
+<div class="sourceCode" id="cb346"><pre
+class="sourceCode md"><code class="sourceCode markdown"><span id="cb346-1"><a href="#cb346-1" aria-hidden="true" tabindex="-1"></a>| Right | Left | Default | Center |</span>
+<span id="cb346-2"><a href="#cb346-2" aria-hidden="true" tabindex="-1"></a>|------:|:-----|---------|:------:|</span>
+<span id="cb346-3"><a href="#cb346-3" aria-hidden="true" tabindex="-1"></a>| 12 | 12 | 12 | 12 |</span>
+<span id="cb346-4"><a href="#cb346-4" aria-hidden="true" tabindex="-1"></a>| 123 | 123 | 123 | 123 |</span>
+<span id="cb346-5"><a href="#cb346-5" aria-hidden="true" tabindex="-1"></a>| 1 | 1 | 1 | 1 |</span>
+<span id="cb346-6"><a href="#cb346-6" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb346-7"><a href="#cb346-7" aria-hidden="true" tabindex="-1"></a> : Demonstration of pipe table syntax.</span></code></pre></div>
</dd>
</dl>
</dd>
@@ -5488,27 +5665,27 @@ class="sourceCode md"><code class="sourceCode markdown"><span id="cb338-1"><a hr
</dl>
</dd>
</dl>
-<h5 class="unnumbered" id="latex-example-36"><span
+<h5 class="unnumbered" id="latex-example-39"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb339"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb339-1"><a href="#cb339-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb339-2"><a href="#cb339-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[pipeTables, tableCaptions]{<span class="ex">markdown</span>}</span>
-<span id="cb339-3"><a href="#cb339-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb339-4"><a href="#cb339-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb339-5"><a href="#cb339-5" aria-hidden="true" tabindex="-1"></a>| Right | Left | Default | Center |</span>
-<span id="cb339-6"><a href="#cb339-6" aria-hidden="true" tabindex="-1"></a>|------:|:-----|---------|:------:|</span>
-<span id="cb339-7"><a href="#cb339-7" aria-hidden="true" tabindex="-1"></a>| 12 | 12 | 12 | 12 |</span>
-<span id="cb339-8"><a href="#cb339-8" aria-hidden="true" tabindex="-1"></a>| 123 | 123 | 123 | 123 |</span>
-<span id="cb339-9"><a href="#cb339-9" aria-hidden="true" tabindex="-1"></a>| 1 | 1 | 1 | 1 |</span>
-<span id="cb339-10"><a href="#cb339-10" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb339-11"><a href="#cb339-11" aria-hidden="true" tabindex="-1"></a>: Demonstration of pipe table syntax.</span>
-<span id="cb339-12"><a href="#cb339-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb339-13"><a href="#cb339-13" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<div class="sourceCode" id="cb347"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb347-1"><a href="#cb347-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb347-2"><a href="#cb347-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[pipeTables, tableCaptions]{<span class="ex">markdown</span>}</span>
+<span id="cb347-3"><a href="#cb347-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb347-4"><a href="#cb347-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb347-5"><a href="#cb347-5" aria-hidden="true" tabindex="-1"></a>| Right | Left | Default | Center |</span>
+<span id="cb347-6"><a href="#cb347-6" aria-hidden="true" tabindex="-1"></a>|------:|:-----|---------|:------:|</span>
+<span id="cb347-7"><a href="#cb347-7" aria-hidden="true" tabindex="-1"></a>| 12 | 12 | 12 | 12 |</span>
+<span id="cb347-8"><a href="#cb347-8" aria-hidden="true" tabindex="-1"></a>| 123 | 123 | 123 | 123 |</span>
+<span id="cb347-9"><a href="#cb347-9" aria-hidden="true" tabindex="-1"></a>| 1 | 1 | 1 | 1 |</span>
+<span id="cb347-10"><a href="#cb347-10" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb347-11"><a href="#cb347-11" aria-hidden="true" tabindex="-1"></a>: Demonstration of pipe table syntax.</span>
+<span id="cb347-12"><a href="#cb347-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb347-13"><a href="#cb347-13" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb340"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb340-1"><a href="#cb340-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb348"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb348-1"><a href="#cb348-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -5548,27 +5725,27 @@ contain the following text:</p>
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="cb341"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb341-1"><a href="#cb341-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
-<span id="cb341-2"><a href="#cb341-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span></span>
-<span id="cb341-3"><a href="#cb341-3" aria-hidden="true" tabindex="-1"></a> [</span>
-<span id="cb341-4"><a href="#cb341-4" aria-hidden="true" tabindex="-1"></a> pipeTables = yes,</span>
-<span id="cb341-5"><a href="#cb341-5" aria-hidden="true" tabindex="-1"></a> tableCaptions = yes,</span>
-<span id="cb341-6"><a href="#cb341-6" aria-hidden="true" tabindex="-1"></a> ]</span>
-<span id="cb341-7"><a href="#cb341-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
-<span id="cb341-8"><a href="#cb341-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb341-9"><a href="#cb341-9" aria-hidden="true" tabindex="-1"></a>| Right | Left | Default | Center |</span>
-<span id="cb341-10"><a href="#cb341-10" aria-hidden="true" tabindex="-1"></a>|------:|:-----|---------|:------:|</span>
-<span id="cb341-11"><a href="#cb341-11" aria-hidden="true" tabindex="-1"></a>| 12 | 12 | 12 | 12 |</span>
-<span id="cb341-12"><a href="#cb341-12" aria-hidden="true" tabindex="-1"></a>| 123 | 123 | 123 | 123 |</span>
-<span id="cb341-13"><a href="#cb341-13" aria-hidden="true" tabindex="-1"></a>| 1 | 1 | 1 | 1 |</span>
-<span id="cb341-14"><a href="#cb341-14" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb341-15"><a href="#cb341-15" aria-hidden="true" tabindex="-1"></a>: Demonstration of pipe table syntax.</span>
-<span id="cb341-16"><a href="#cb341-16" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb341-17"><a href="#cb341-17" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
+<div class="sourceCode" id="cb349"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb349-1"><a href="#cb349-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
+<span id="cb349-2"><a href="#cb349-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span></span>
+<span id="cb349-3"><a href="#cb349-3" aria-hidden="true" tabindex="-1"></a> [</span>
+<span id="cb349-4"><a href="#cb349-4" aria-hidden="true" tabindex="-1"></a> pipeTables = yes,</span>
+<span id="cb349-5"><a href="#cb349-5" aria-hidden="true" tabindex="-1"></a> tableCaptions = yes,</span>
+<span id="cb349-6"><a href="#cb349-6" aria-hidden="true" tabindex="-1"></a> ]</span>
+<span id="cb349-7"><a href="#cb349-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
+<span id="cb349-8"><a href="#cb349-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb349-9"><a href="#cb349-9" aria-hidden="true" tabindex="-1"></a>| Right | Left | Default | Center |</span>
+<span id="cb349-10"><a href="#cb349-10" aria-hidden="true" tabindex="-1"></a>|------:|:-----|---------|:------:|</span>
+<span id="cb349-11"><a href="#cb349-11" aria-hidden="true" tabindex="-1"></a>| 12 | 12 | 12 | 12 |</span>
+<span id="cb349-12"><a href="#cb349-12" aria-hidden="true" tabindex="-1"></a>| 123 | 123 | 123 | 123 |</span>
+<span id="cb349-13"><a href="#cb349-13" aria-hidden="true" tabindex="-1"></a>| 1 | 1 | 1 | 1 |</span>
+<span id="cb349-14"><a href="#cb349-14" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb349-15"><a href="#cb349-15" aria-hidden="true" tabindex="-1"></a>: Demonstration of pipe table syntax.</span>
+<span id="cb349-16"><a href="#cb349-16" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb349-17"><a href="#cb349-17" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb342"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb342-1"><a href="#cb342-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb350"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb350-1"><a href="#cb350-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -5604,8 +5781,8 @@ contain the following text:</p>
</tbody>
</table>
</blockquote>
-<h4 data-number="2.2.1.43" id="option-tasklists"><span
-class="header-section-number">2.2.1.43</span> Option
+<h4 data-number="2.2.1.46" id="option-tasklists"><span
+class="header-section-number">2.2.1.46</span> Option
<code>taskLists</code></h4>
<dl>
<dt><code>taskLists</code> (default value: <code>false</code>)</dt>
@@ -5614,10 +5791,10 @@ class="header-section-number">2.2.1.43</span> Option
<dt>true</dt>
<dd>
<p>Enable the Pandoc <code>task_lists</code> syntax extension.</p>
-<div class="sourceCode" id="cb343"><pre
-class="sourceCode md"><code class="sourceCode markdown"><span id="cb343-1"><a href="#cb343-1" aria-hidden="true" tabindex="-1"></a><span class="ss">- </span><span class="va">[ ]</span> an unticked task list item</span>
-<span id="cb343-2"><a href="#cb343-2" aria-hidden="true" tabindex="-1"></a><span class="ss">- </span><span class="co">[</span><span class="ot">/</span><span class="co">]</span> a half-checked task list item</span>
-<span id="cb343-3"><a href="#cb343-3" aria-hidden="true" tabindex="-1"></a><span class="ss">- </span><span class="co">[</span><span class="ot">X</span><span class="co">]</span> a ticked task list item</span></code></pre></div>
+<div class="sourceCode" id="cb351"><pre
+class="sourceCode md"><code class="sourceCode markdown"><span id="cb351-1"><a href="#cb351-1" aria-hidden="true" tabindex="-1"></a><span class="ss">- </span><span class="va">[ ]</span> an unticked task list item</span>
+<span id="cb351-2"><a href="#cb351-2" aria-hidden="true" tabindex="-1"></a><span class="ss">- </span><span class="co">[</span><span class="ot">/</span><span class="co">]</span> a half-checked task list item</span>
+<span id="cb351-3"><a href="#cb351-3" aria-hidden="true" tabindex="-1"></a><span class="ss">- </span><span class="co">[</span><span class="ot">X</span><span class="co">]</span> a ticked task list item</span></code></pre></div>
</dd>
</dl>
</dd>
@@ -5630,30 +5807,30 @@ class="sourceCode md"><code class="sourceCode markdown"><span id="cb343-1"><a hr
</dl>
</dd>
</dl>
-<h5 class="unnumbered" id="latex-example-37"><span
+<h5 class="unnumbered" id="latex-example-40"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb344"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb344-1"><a href="#cb344-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb344-2"><a href="#cb344-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[taskLists]{<span class="ex">markdown</span>}</span>
-<span id="cb344-3"><a href="#cb344-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
-<span id="cb344-4"><a href="#cb344-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
-<span id="cb344-5"><a href="#cb344-5" aria-hidden="true" tabindex="-1"></a> untickedBox = No,</span>
-<span id="cb344-6"><a href="#cb344-6" aria-hidden="true" tabindex="-1"></a> halfTickedBox = Maybe,</span>
-<span id="cb344-7"><a href="#cb344-7" aria-hidden="true" tabindex="-1"></a> tickedBox = Yes,</span>
-<span id="cb344-8"><a href="#cb344-8" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb344-9"><a href="#cb344-9" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb344-10"><a href="#cb344-10" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb344-11"><a href="#cb344-11" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb344-12"><a href="#cb344-12" aria-hidden="true" tabindex="-1"></a>- [ ] you can&#39;t.</span>
-<span id="cb344-13"><a href="#cb344-13" aria-hidden="true" tabindex="-1"></a>- [/] I can?</span>
-<span id="cb344-14"><a href="#cb344-14" aria-hidden="true" tabindex="-1"></a>- [X] I can!</span>
-<span id="cb344-15"><a href="#cb344-15" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb344-16"><a href="#cb344-16" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<div class="sourceCode" id="cb352"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb352-1"><a href="#cb352-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb352-2"><a href="#cb352-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[taskLists]{<span class="ex">markdown</span>}</span>
+<span id="cb352-3"><a href="#cb352-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
+<span id="cb352-4"><a href="#cb352-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
+<span id="cb352-5"><a href="#cb352-5" aria-hidden="true" tabindex="-1"></a> untickedBox = No,</span>
+<span id="cb352-6"><a href="#cb352-6" aria-hidden="true" tabindex="-1"></a> halfTickedBox = Maybe,</span>
+<span id="cb352-7"><a href="#cb352-7" aria-hidden="true" tabindex="-1"></a> tickedBox = Yes,</span>
+<span id="cb352-8"><a href="#cb352-8" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb352-9"><a href="#cb352-9" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb352-10"><a href="#cb352-10" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb352-11"><a href="#cb352-11" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb352-12"><a href="#cb352-12" aria-hidden="true" tabindex="-1"></a>- [ ] you can&#39;t.</span>
+<span id="cb352-13"><a href="#cb352-13" aria-hidden="true" tabindex="-1"></a>- [/] I can?</span>
+<span id="cb352-14"><a href="#cb352-14" aria-hidden="true" tabindex="-1"></a>- [X] I can!</span>
+<span id="cb352-15"><a href="#cb352-15" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb352-16"><a href="#cb352-16" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb345"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb345-1"><a href="#cb345-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb353"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb353-1"><a href="#cb353-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -5667,22 +5844,22 @@ contain the following text:</p>
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="cb346"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb346-1"><a href="#cb346-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
-<span id="cb346-2"><a href="#cb346-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[taskLists = yes]</span>
-<span id="cb346-3"><a href="#cb346-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererUntickedBox</span>{No}</span>
-<span id="cb346-4"><a href="#cb346-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHalftickedBox</span>{Maybe}</span>
-<span id="cb346-5"><a href="#cb346-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererTickedBox</span>{Yes}</span>
-<span id="cb346-6"><a href="#cb346-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
-<span id="cb346-7"><a href="#cb346-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb346-8"><a href="#cb346-8" aria-hidden="true" tabindex="-1"></a>- [ ] you can&#39;t.</span>
-<span id="cb346-9"><a href="#cb346-9" aria-hidden="true" tabindex="-1"></a>- [/] I can?</span>
-<span id="cb346-10"><a href="#cb346-10" aria-hidden="true" tabindex="-1"></a>- [X] I can!</span>
-<span id="cb346-11"><a href="#cb346-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb346-12"><a href="#cb346-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
+<div class="sourceCode" id="cb354"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb354-1"><a href="#cb354-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
+<span id="cb354-2"><a href="#cb354-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[taskLists = yes]</span>
+<span id="cb354-3"><a href="#cb354-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererUntickedBox</span>{No}</span>
+<span id="cb354-4"><a href="#cb354-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHalftickedBox</span>{Maybe}</span>
+<span id="cb354-5"><a href="#cb354-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererTickedBox</span>{Yes}</span>
+<span id="cb354-6"><a href="#cb354-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
+<span id="cb354-7"><a href="#cb354-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb354-8"><a href="#cb354-8" aria-hidden="true" tabindex="-1"></a>- [ ] you can&#39;t.</span>
+<span id="cb354-9"><a href="#cb354-9" aria-hidden="true" tabindex="-1"></a>- [/] I can?</span>
+<span id="cb354-10"><a href="#cb354-10" aria-hidden="true" tabindex="-1"></a>- [X] I can!</span>
+<span id="cb354-11"><a href="#cb354-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb354-12"><a href="#cb354-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb347"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb347-1"><a href="#cb347-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb355"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb355-1"><a href="#cb355-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -5692,8 +5869,8 @@ contain the following text:</p>
<li>Yes I can!</li>
</ul>
</blockquote>
-<h4 data-number="2.2.1.44" id="option-texcomments"><span
-class="header-section-number">2.2.1.44</span> Option
+<h4 data-number="2.2.1.47" id="option-texcomments"><span
+class="header-section-number">2.2.1.47</span> Option
<code>texComments</code></h4>
<dl>
<dt><code>texComments</code> (default value: <code>false</code>)</dt>
@@ -5702,15 +5879,15 @@ class="header-section-number">2.2.1.44</span> Option
<dt>true</dt>
<dd>
<p>Strip <span class="tex">T<sub>e</sub>X</span>-style comments.</p>
-<div class="sourceCode" id="cb348"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb348-1"><a href="#cb348-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb348-2"><a href="#cb348-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[texComments]{<span class="ex">markdown</span>}</span>
-<span id="cb348-3"><a href="#cb348-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb348-4"><a href="#cb348-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb348-5"><a href="#cb348-5" aria-hidden="true" tabindex="-1"></a>Hel<span class="co">% this is a comment</span></span>
-<span id="cb348-6"><a href="#cb348-6" aria-hidden="true" tabindex="-1"></a> lo *world*!</span>
-<span id="cb348-7"><a href="#cb348-7" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb348-8"><a href="#cb348-8" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<div class="sourceCode" id="cb356"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb356-1"><a href="#cb356-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb356-2"><a href="#cb356-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[texComments]{<span class="ex">markdown</span>}</span>
+<span id="cb356-3"><a href="#cb356-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb356-4"><a href="#cb356-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb356-5"><a href="#cb356-5" aria-hidden="true" tabindex="-1"></a>Hel<span class="co">% this is a comment</span></span>
+<span id="cb356-6"><a href="#cb356-6" aria-hidden="true" tabindex="-1"></a> lo *world*!</span>
+<span id="cb356-7"><a href="#cb356-7" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb356-8"><a href="#cb356-8" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Always enabled when <strong><code>hybrid</code></strong> is
enabled.</p>
</dd>
@@ -5730,57 +5907,57 @@ comments.</p>
class="tex">T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb349"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb349-1"><a href="#cb349-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
-<span id="cb349-2"><a href="#cb349-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionTexComments</span>{true}</span>
-<span id="cb349-3"><a href="#cb349-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
-<span id="cb349-4"><a href="#cb349-4" aria-hidden="true" tabindex="-1"></a>Hel<span class="co">% this is a comment</span></span>
-<span id="cb349-5"><a href="#cb349-5" aria-hidden="true" tabindex="-1"></a> lo *world*!</span>
-<span id="cb349-6"><a href="#cb349-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
-<span id="cb349-7"><a href="#cb349-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
+<div class="sourceCode" id="cb357"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb357-1"><a href="#cb357-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
+<span id="cb357-2"><a href="#cb357-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionTexComments</span>{true}</span>
+<span id="cb357-3"><a href="#cb357-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
+<span id="cb357-4"><a href="#cb357-4" aria-hidden="true" tabindex="-1"></a>Hel<span class="co">% this is a comment</span></span>
+<span id="cb357-5"><a href="#cb357-5" aria-hidden="true" tabindex="-1"></a> lo *world*!</span>
+<span id="cb357-6"><a href="#cb357-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
+<span id="cb357-7"><a href="#cb357-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb350"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb350-1"><a href="#cb350-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb358"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb358-1"><a href="#cb358-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the text “Hello <em>world</em>!”</p>
-<h5 class="unnumbered" id="latex-example-38"><span
+<h5 class="unnumbered" id="latex-example-41"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb351"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb351-1"><a href="#cb351-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb351-2"><a href="#cb351-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[texComments]{<span class="ex">markdown</span>}</span>
-<span id="cb351-3"><a href="#cb351-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb351-4"><a href="#cb351-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb351-5"><a href="#cb351-5" aria-hidden="true" tabindex="-1"></a>Hel<span class="co">% this is a comment</span></span>
-<span id="cb351-6"><a href="#cb351-6" aria-hidden="true" tabindex="-1"></a> lo *world*!</span>
-<span id="cb351-7"><a href="#cb351-7" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb351-8"><a href="#cb351-8" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<div class="sourceCode" id="cb359"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb359-1"><a href="#cb359-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb359-2"><a href="#cb359-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[texComments]{<span class="ex">markdown</span>}</span>
+<span id="cb359-3"><a href="#cb359-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb359-4"><a href="#cb359-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb359-5"><a href="#cb359-5" aria-hidden="true" tabindex="-1"></a>Hel<span class="co">% this is a comment</span></span>
+<span id="cb359-6"><a href="#cb359-6" aria-hidden="true" tabindex="-1"></a> lo *world*!</span>
+<span id="cb359-7"><a href="#cb359-7" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb359-8"><a href="#cb359-8" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb352"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb352-1"><a href="#cb352-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb360"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb360-1"><a href="#cb360-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the text “Hello <em>world</em>!”</p>
<h5 class="unnumbered" id="context-example-30">Con<span
class="tex">T<sub>e</sub>X</span>t Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb353"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb353-1"><a href="#cb353-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
-<span id="cb353-2"><a href="#cb353-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[texComments = yes]</span>
-<span id="cb353-3"><a href="#cb353-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
-<span id="cb353-4"><a href="#cb353-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb353-5"><a href="#cb353-5" aria-hidden="true" tabindex="-1"></a>Hel<span class="co">% this is a comment</span></span>
-<span id="cb353-6"><a href="#cb353-6" aria-hidden="true" tabindex="-1"></a> lo *world*!</span>
-<span id="cb353-7"><a href="#cb353-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb353-8"><a href="#cb353-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
+<div class="sourceCode" id="cb361"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb361-1"><a href="#cb361-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
+<span id="cb361-2"><a href="#cb361-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[texComments = yes]</span>
+<span id="cb361-3"><a href="#cb361-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
+<span id="cb361-4"><a href="#cb361-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb361-5"><a href="#cb361-5" aria-hidden="true" tabindex="-1"></a>Hel<span class="co">% this is a comment</span></span>
+<span id="cb361-6"><a href="#cb361-6" aria-hidden="true" tabindex="-1"></a> lo *world*!</span>
+<span id="cb361-7"><a href="#cb361-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb361-8"><a href="#cb361-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb354"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb354-1"><a href="#cb354-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb362"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb362-1"><a href="#cb362-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the text “Hello <em>world</em>!”</p>
-<h4 data-number="2.2.1.45" id="option-tightlists"><span
-class="header-section-number">2.2.1.45</span> Option
+<h4 data-number="2.2.1.48" id="option-tightlists"><span
+class="header-section-number">2.2.1.48</span> Option
<code>tightLists</code></h4>
<dl>
<dt><code>tightLists</code> (default value: <code>true</code>)</dt>
@@ -5792,16 +5969,16 @@ class="header-section-number">2.2.1.45</span> Option
paragraphs will be considered <em>tight</em>. Tight lists will produce
tight renderers that may produce different output than lists that are
not tight:</p>
-<div class="sourceCode" id="cb355"><pre
-class="sourceCode md"><code class="sourceCode markdown"><span id="cb355-1"><a href="#cb355-1" aria-hidden="true" tabindex="-1"></a><span class="ss">- </span>This is</span>
-<span id="cb355-2"><a href="#cb355-2" aria-hidden="true" tabindex="-1"></a><span class="ss">- </span>a tight</span>
-<span id="cb355-3"><a href="#cb355-3" aria-hidden="true" tabindex="-1"></a><span class="ss">- </span>unordered list.</span>
-<span id="cb355-4"><a href="#cb355-4" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb355-5"><a href="#cb355-5" aria-hidden="true" tabindex="-1"></a><span class="ss">- </span>This is</span>
-<span id="cb355-6"><a href="#cb355-6" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb355-7"><a href="#cb355-7" aria-hidden="true" tabindex="-1"></a> not a tight</span>
-<span id="cb355-8"><a href="#cb355-8" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb355-9"><a href="#cb355-9" aria-hidden="true" tabindex="-1"></a><span class="ss">- </span>unordered list.</span></code></pre></div>
+<div class="sourceCode" id="cb363"><pre
+class="sourceCode md"><code class="sourceCode markdown"><span id="cb363-1"><a href="#cb363-1" aria-hidden="true" tabindex="-1"></a><span class="ss">- </span>This is</span>
+<span id="cb363-2"><a href="#cb363-2" aria-hidden="true" tabindex="-1"></a><span class="ss">- </span>a tight</span>
+<span id="cb363-3"><a href="#cb363-3" aria-hidden="true" tabindex="-1"></a><span class="ss">- </span>unordered list.</span>
+<span id="cb363-4"><a href="#cb363-4" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb363-5"><a href="#cb363-5" aria-hidden="true" tabindex="-1"></a><span class="ss">- </span>This is</span>
+<span id="cb363-6"><a href="#cb363-6" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb363-7"><a href="#cb363-7" aria-hidden="true" tabindex="-1"></a> not a tight</span>
+<span id="cb363-8"><a href="#cb363-8" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb363-9"><a href="#cb363-9" aria-hidden="true" tabindex="-1"></a><span class="ss">- </span>unordered list.</span></code></pre></div>
</dd>
</dl>
</dd>
@@ -5816,43 +5993,43 @@ multiple paragraphs.</p>
</dl>
</dd>
</dl>
-<h5 class="unnumbered" id="latex-example-39"><span
+<h5 class="unnumbered" id="latex-example-42"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb356"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb356-1"><a href="#cb356-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb356-2"><a href="#cb356-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span>
-<span id="cb356-3"><a href="#cb356-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb356-4"><a href="#cb356-4" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb356-5"><a href="#cb356-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb356-6"><a href="#cb356-6" aria-hidden="true" tabindex="-1"></a>The following list is tight:</span>
-<span id="cb356-7"><a href="#cb356-7" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb356-8"><a href="#cb356-8" aria-hidden="true" tabindex="-1"></a>- first item</span>
-<span id="cb356-9"><a href="#cb356-9" aria-hidden="true" tabindex="-1"></a>- second item</span>
-<span id="cb356-10"><a href="#cb356-10" aria-hidden="true" tabindex="-1"></a>- third item</span>
-<span id="cb356-11"><a href="#cb356-11" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb356-12"><a href="#cb356-12" aria-hidden="true" tabindex="-1"></a>The following list is loose:</span>
-<span id="cb356-13"><a href="#cb356-13" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb356-14"><a href="#cb356-14" aria-hidden="true" tabindex="-1"></a>- first item</span>
-<span id="cb356-15"><a href="#cb356-15" aria-hidden="true" tabindex="-1"></a>- second item that spans</span>
-<span id="cb356-16"><a href="#cb356-16" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb356-17"><a href="#cb356-17" aria-hidden="true" tabindex="-1"></a> multiple paragraphs</span>
-<span id="cb356-18"><a href="#cb356-18" aria-hidden="true" tabindex="-1"></a>- third item</span>
-<span id="cb356-19"><a href="#cb356-19" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb356-20"><a href="#cb356-20" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb356-21"><a href="#cb356-21" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{tightLists=false}</span>
-<span id="cb356-22"><a href="#cb356-22" aria-hidden="true" tabindex="-1"></a>The following list is now also loose:</span>
-<span id="cb356-23"><a href="#cb356-23" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb356-24"><a href="#cb356-24" aria-hidden="true" tabindex="-1"></a>- first item</span>
-<span id="cb356-25"><a href="#cb356-25" aria-hidden="true" tabindex="-1"></a>- second item</span>
-<span id="cb356-26"><a href="#cb356-26" aria-hidden="true" tabindex="-1"></a>- third item</span>
-<span id="cb356-27"><a href="#cb356-27" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span>
-<span id="cb356-28"><a href="#cb356-28" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb356-29"><a href="#cb356-29" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<div class="sourceCode" id="cb364"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb364-1"><a href="#cb364-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb364-2"><a href="#cb364-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span>
+<span id="cb364-3"><a href="#cb364-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb364-4"><a href="#cb364-4" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb364-5"><a href="#cb364-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb364-6"><a href="#cb364-6" aria-hidden="true" tabindex="-1"></a>The following list is tight:</span>
+<span id="cb364-7"><a href="#cb364-7" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb364-8"><a href="#cb364-8" aria-hidden="true" tabindex="-1"></a>- first item</span>
+<span id="cb364-9"><a href="#cb364-9" aria-hidden="true" tabindex="-1"></a>- second item</span>
+<span id="cb364-10"><a href="#cb364-10" aria-hidden="true" tabindex="-1"></a>- third item</span>
+<span id="cb364-11"><a href="#cb364-11" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb364-12"><a href="#cb364-12" aria-hidden="true" tabindex="-1"></a>The following list is loose:</span>
+<span id="cb364-13"><a href="#cb364-13" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb364-14"><a href="#cb364-14" aria-hidden="true" tabindex="-1"></a>- first item</span>
+<span id="cb364-15"><a href="#cb364-15" aria-hidden="true" tabindex="-1"></a>- second item that spans</span>
+<span id="cb364-16"><a href="#cb364-16" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb364-17"><a href="#cb364-17" aria-hidden="true" tabindex="-1"></a> multiple paragraphs</span>
+<span id="cb364-18"><a href="#cb364-18" aria-hidden="true" tabindex="-1"></a>- third item</span>
+<span id="cb364-19"><a href="#cb364-19" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb364-20"><a href="#cb364-20" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb364-21"><a href="#cb364-21" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{tightLists=false}</span>
+<span id="cb364-22"><a href="#cb364-22" aria-hidden="true" tabindex="-1"></a>The following list is now also loose:</span>
+<span id="cb364-23"><a href="#cb364-23" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb364-24"><a href="#cb364-24" aria-hidden="true" tabindex="-1"></a>- first item</span>
+<span id="cb364-25"><a href="#cb364-25" aria-hidden="true" tabindex="-1"></a>- second item</span>
+<span id="cb364-26"><a href="#cb364-26" aria-hidden="true" tabindex="-1"></a>- third item</span>
+<span id="cb364-27"><a href="#cb364-27" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span>
+<span id="cb364-28"><a href="#cb364-28" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb364-29"><a href="#cb364-29" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb357"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb357-1"><a href="#cb357-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb365"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb365-1"><a href="#cb365-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -5876,8 +6053,8 @@ contain the following text:</p>
<li><p>third item</p></li>
</ul>
</blockquote>
-<h4 data-number="2.2.1.46" id="option-underscores"><span
-class="header-section-number">2.2.1.46</span> Option
+<h4 data-number="2.2.1.49" id="option-underscores"><span
+class="header-section-number">2.2.1.49</span> Option
<code>underscores</code></h4>
<dl>
<dt><code>underscores</code> (default value: <code>true</code>)</dt>
@@ -5887,11 +6064,11 @@ class="header-section-number">2.2.1.46</span> Option
<dd>
<p>Both underscores and asterisks can be used to denote emphasis and
strong emphasis:</p>
-<div class="sourceCode" id="cb358"><pre
-class="sourceCode md"><code class="sourceCode markdown"><span id="cb358-1"><a href="#cb358-1" aria-hidden="true" tabindex="-1"></a>*single asterisks*</span>
-<span id="cb358-2"><a href="#cb358-2" aria-hidden="true" tabindex="-1"></a>_single underscores_</span>
-<span id="cb358-3"><a href="#cb358-3" aria-hidden="true" tabindex="-1"></a>**double asterisks**</span>
-<span id="cb358-4"><a href="#cb358-4" aria-hidden="true" tabindex="-1"></a>__double underscores__</span></code></pre></div>
+<div class="sourceCode" id="cb366"><pre
+class="sourceCode md"><code class="sourceCode markdown"><span id="cb366-1"><a href="#cb366-1" aria-hidden="true" tabindex="-1"></a>*single asterisks*</span>
+<span id="cb366-2"><a href="#cb366-2" aria-hidden="true" tabindex="-1"></a>_single underscores_</span>
+<span id="cb366-3"><a href="#cb366-3" aria-hidden="true" tabindex="-1"></a>**double asterisks**</span>
+<span id="cb366-4"><a href="#cb366-4" aria-hidden="true" tabindex="-1"></a>__double underscores__</span></code></pre></div>
</dd>
</dl>
</dd>
@@ -5911,23 +6088,23 @@ constantly escape subscripts.</p>
class="tex">T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb359"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb359-1"><a href="#cb359-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
-<span id="cb359-2"><a href="#cb359-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionHybrid</span>{true}</span>
-<span id="cb359-3"><a href="#cb359-3" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb359-4"><a href="#cb359-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
-<span id="cb359-5"><a href="#cb359-5" aria-hidden="true" tabindex="-1"></a>This is _emphasized text_ and this is a math subscript: <span class="ss">$m</span><span class="sc">\_</span><span class="ss">n$</span>.</span>
-<span id="cb359-6"><a href="#cb359-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
-<span id="cb359-7"><a href="#cb359-7" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb359-8"><a href="#cb359-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionUnderscores</span>{false}</span>
-<span id="cb359-9"><a href="#cb359-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
-<span id="cb359-10"><a href="#cb359-10" aria-hidden="true" tabindex="-1"></a>This is *emphasized text* and this is a math subscript: <span class="ss">$m_n$</span>.</span>
-<span id="cb359-11"><a href="#cb359-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
-<span id="cb359-12"><a href="#cb359-12" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb359-13"><a href="#cb359-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
+<div class="sourceCode" id="cb367"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb367-1"><a href="#cb367-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
+<span id="cb367-2"><a href="#cb367-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionHybrid</span>{true}</span>
+<span id="cb367-3"><a href="#cb367-3" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb367-4"><a href="#cb367-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
+<span id="cb367-5"><a href="#cb367-5" aria-hidden="true" tabindex="-1"></a>This is _emphasized text_ and this is a math subscript: <span class="ss">$m</span><span class="sc">\_</span><span class="ss">n$</span>.</span>
+<span id="cb367-6"><a href="#cb367-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
+<span id="cb367-7"><a href="#cb367-7" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb367-8"><a href="#cb367-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionUnderscores</span>{false}</span>
+<span id="cb367-9"><a href="#cb367-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
+<span id="cb367-10"><a href="#cb367-10" aria-hidden="true" tabindex="-1"></a>This is *emphasized text* and this is a math subscript: <span class="ss">$m_n$</span>.</span>
+<span id="cb367-11"><a href="#cb367-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
+<span id="cb367-12"><a href="#cb367-12" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb367-13"><a href="#cb367-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb360"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb360-1"><a href="#cb360-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb368"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb368-1"><a href="#cb368-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -5936,27 +6113,27 @@ contain the following text:</p>
<p>This is <em>emphasized text</em> and this is a math subscript:
<em>mₙ</em>.</p>
</blockquote>
-<h5 class="unnumbered" id="latex-example-40"><span
+<h5 class="unnumbered" id="latex-example-43"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb361"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb361-1"><a href="#cb361-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb361-2"><a href="#cb361-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[hybrid]{<span class="ex">markdown</span>}</span>
-<span id="cb361-3"><a href="#cb361-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb361-4"><a href="#cb361-4" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb361-5"><a href="#cb361-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb361-6"><a href="#cb361-6" aria-hidden="true" tabindex="-1"></a>This is _emphasized text_ and this is a math subscript: <span class="ss">$m</span><span class="sc">\_</span><span class="ss">n$</span>.</span>
-<span id="cb361-7"><a href="#cb361-7" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb361-8"><a href="#cb361-8" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb361-9"><a href="#cb361-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{underscores=false}</span>
-<span id="cb361-10"><a href="#cb361-10" aria-hidden="true" tabindex="-1"></a>This is *emphasized text* and this is a math subscript: <span class="ss">$m_n$</span>.</span>
-<span id="cb361-11"><a href="#cb361-11" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span>
-<span id="cb361-12"><a href="#cb361-12" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb361-13"><a href="#cb361-13" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<div class="sourceCode" id="cb369"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb369-1"><a href="#cb369-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb369-2"><a href="#cb369-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[hybrid]{<span class="ex">markdown</span>}</span>
+<span id="cb369-3"><a href="#cb369-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb369-4"><a href="#cb369-4" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb369-5"><a href="#cb369-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb369-6"><a href="#cb369-6" aria-hidden="true" tabindex="-1"></a>This is _emphasized text_ and this is a math subscript: <span class="ss">$m</span><span class="sc">\_</span><span class="ss">n$</span>.</span>
+<span id="cb369-7"><a href="#cb369-7" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb369-8"><a href="#cb369-8" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb369-9"><a href="#cb369-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{underscores=false}</span>
+<span id="cb369-10"><a href="#cb369-10" aria-hidden="true" tabindex="-1"></a>This is *emphasized text* and this is a math subscript: <span class="ss">$m_n$</span>.</span>
+<span id="cb369-11"><a href="#cb369-11" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span>
+<span id="cb369-12"><a href="#cb369-12" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb369-13"><a href="#cb369-13" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb362"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb362-1"><a href="#cb362-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb370"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb370-1"><a href="#cb370-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -5969,24 +6146,24 @@ contain the following text:</p>
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="cb363"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb363-1"><a href="#cb363-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
-<span id="cb363-2"><a href="#cb363-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[hybrid = yes]</span>
-<span id="cb363-3"><a href="#cb363-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
-<span id="cb363-4"><a href="#cb363-4" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb363-5"><a href="#cb363-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb363-6"><a href="#cb363-6" aria-hidden="true" tabindex="-1"></a>This is _emphasized text_ and this is a math subscript: <span class="ss">$m</span><span class="sc">\_</span><span class="ss">n$</span>.</span>
-<span id="cb363-7"><a href="#cb363-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb363-8"><a href="#cb363-8" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb363-9"><a href="#cb363-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[underscores = yes]</span>
-<span id="cb363-10"><a href="#cb363-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb363-11"><a href="#cb363-11" aria-hidden="true" tabindex="-1"></a>This is *emphasized text* and this is a math subscript: <span class="ss">$m_n$</span>.</span>
-<span id="cb363-12"><a href="#cb363-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb363-13"><a href="#cb363-13" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb363-14"><a href="#cb363-14" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
+<div class="sourceCode" id="cb371"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb371-1"><a href="#cb371-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
+<span id="cb371-2"><a href="#cb371-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[hybrid = yes]</span>
+<span id="cb371-3"><a href="#cb371-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
+<span id="cb371-4"><a href="#cb371-4" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb371-5"><a href="#cb371-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb371-6"><a href="#cb371-6" aria-hidden="true" tabindex="-1"></a>This is _emphasized text_ and this is a math subscript: <span class="ss">$m</span><span class="sc">\_</span><span class="ss">n$</span>.</span>
+<span id="cb371-7"><a href="#cb371-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb371-8"><a href="#cb371-8" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb371-9"><a href="#cb371-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[underscores = yes]</span>
+<span id="cb371-10"><a href="#cb371-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb371-11"><a href="#cb371-11" aria-hidden="true" tabindex="-1"></a>This is *emphasized text* and this is a math subscript: <span class="ss">$m_n$</span>.</span>
+<span id="cb371-12"><a href="#cb371-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb371-13"><a href="#cb371-13" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb371-14"><a href="#cb371-14" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb364"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb364-1"><a href="#cb364-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb372"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb372-1"><a href="#cb372-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -6013,8 +6190,8 @@ plain <span class="tex">T<sub>e</sub>X</span></h4>
<strong><code>taskLists</code></strong> Lua option to <code>true</code>,
you would include the following code in your plain <span
class="tex">T<sub>e</sub>X</span> document:</p>
-<div class="sourceCode" id="cb365"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb365-1"><a href="#cb365-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionTaskLists</span>{true}</span></code></pre></div>
+<div class="sourceCode" id="cb373"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb373-1"><a href="#cb373-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionTaskLists</span>{true}</span></code></pre></div>
<h4 data-number="2.2.2.2" id="finalizing-and-freezing-the-cache"><span
class="header-section-number">2.2.2.2</span> Finalizing and Freezing the
Cache</h4>
@@ -6034,7 +6211,7 @@ with stale auxiliary cache files.</li>
<li>Enable the <strong><code>finalizeCache</code></strong> option.</li>
<li>Typeset the plain <span class="tex">T<sub>e</sub>X</span> document
to populate and finalize the cache.</li>
-<li>Enable the <code>\markdownOptionFrozenCache</code> option.</li>
+<li>Enable the <strong><code>frozenCache</code></strong> option.</li>
<li>Publish the source code of the plain <span
class="tex">T<sub>e</sub>X</span> document and the
<strong><code>cacheDir</code></strong> directory.</li>
@@ -6064,24 +6241,24 @@ options.</p>
<p>Using a text editor, create a folder named
<code>output-directory</code> and a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb366"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb366-1"><a href="#cb366-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span>
-<span id="cb366-2"><a href="#cb366-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
-<span id="cb366-3"><a href="#cb366-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionHelperScriptFileName</span>{helper-script.lua}</span>
-<span id="cb366-4"><a href="#cb366-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionInputTempFileName</span>{temporary-input.md}</span>
-<span id="cb366-5"><a href="#cb366-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionOutputTempFileName</span>{temporary-output.tex}</span>
-<span id="cb366-6"><a href="#cb366-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionErrorTempFileName</span>{error-output.txt}</span>
-<span id="cb366-7"><a href="#cb366-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionOutputDir</span>{output-directory}</span>
-<span id="cb366-8"><a href="#cb366-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionCacheDir</span>{output-directory/cache-directory}</span>
-<span id="cb366-9"><a href="#cb366-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownOptionFinalizeCachetrue</span></span>
-<span id="cb366-10"><a href="#cb366-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionFrozenCacheFileName</span>{output-directory/cache-directory/frozen-cache.tex}</span>
-<span id="cb366-11"><a href="#cb366-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
-<span id="cb366-12"><a href="#cb366-12" aria-hidden="true" tabindex="-1"></a>Hello *world*!</span>
-<span id="cb366-13"><a href="#cb366-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
-<span id="cb366-14"><a href="#cb366-14" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
+<div class="sourceCode" id="cb374"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb374-1"><a href="#cb374-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span>
+<span id="cb374-2"><a href="#cb374-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
+<span id="cb374-3"><a href="#cb374-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionHelperScriptFileName</span>{helper-script.lua}</span>
+<span id="cb374-4"><a href="#cb374-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionInputTempFileName</span>{temporary-input.md}</span>
+<span id="cb374-5"><a href="#cb374-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionOutputTempFileName</span>{temporary-output.tex}</span>
+<span id="cb374-6"><a href="#cb374-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionErrorTempFileName</span>{error-output.txt}</span>
+<span id="cb374-7"><a href="#cb374-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionOutputDir</span>{output-directory}</span>
+<span id="cb374-8"><a href="#cb374-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionCacheDir</span>{output-directory/cache-directory}</span>
+<span id="cb374-9"><a href="#cb374-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownOptionFinalizeCachetrue</span></span>
+<span id="cb374-10"><a href="#cb374-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionFrozenCacheFileName</span>{output-directory/cache-directory/frozen-cache.tex}</span>
+<span id="cb374-11"><a href="#cb374-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
+<span id="cb374-12"><a href="#cb374-12" aria-hidden="true" tabindex="-1"></a>Hello *world*!</span>
+<span id="cb374-13"><a href="#cb374-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
+<span id="cb374-14"><a href="#cb374-14" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb367"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb367-1"><a href="#cb367-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> <span class="at">--output-directory</span> output-directory document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb375"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb375-1"><a href="#cb375-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> <span class="at">--output-directory</span> output-directory document.tex</span></code></pre></div>
<p>A text document named <code>temporary-input.md</code> should be
produced in the folder named <code>output-directory</code> and contain
the following text:</p>
@@ -6094,8 +6271,8 @@ document. LuaTeX does not need other temporary files to perform the
conversion from markdown to <span class="tex">T<sub>e</sub>X</span>. To
produce the remaining temporary files, invoke pdfTeX from the
terminal:</p>
-<div class="sourceCode" id="cb368"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb368-1"><a href="#cb368-1" aria-hidden="true" tabindex="-1"></a><span class="ex">pdftex</span> <span class="at">--output-directory</span> output-directory <span class="at">--shell-escape</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb376"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb376-1"><a href="#cb376-1" aria-hidden="true" tabindex="-1"></a><span class="ex">pdftex</span> <span class="at">--output-directory</span> output-directory <span class="at">--shell-escape</span> document.tex</span></code></pre></div>
<p>Text documents named <code>helper-script.lua</code>, and
<code>temporary-output.md</code> should be produced in the folder named
<code>output-directory</code>. The document named
@@ -6124,21 +6301,21 @@ Mittelbach. The recognized values of the macro are <code>true</code>
<code>false</code>.</p>
<p>Using a text editor, create a text document named
<code>document.dtx</code> with the following content:</p>
-<div class="sourceCode" id="cb369"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb369-1"><a href="#cb369-1" aria-hidden="true" tabindex="-1"></a><span class="co">% \iffalse</span></span>
-<span id="cb369-2"><a href="#cb369-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">ltxdoc</span>}</span>
-<span id="cb369-3"><a href="#cb369-3" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[stripPercentSigns]{<span class="ex">markdown</span>}</span>
-<span id="cb369-4"><a href="#cb369-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb369-5"><a href="#cb369-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\DocInput</span>{document.dtx}</span>
-<span id="cb369-6"><a href="#cb369-6" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span>
-<span id="cb369-7"><a href="#cb369-7" aria-hidden="true" tabindex="-1"></a><span class="co">% \fi</span></span>
-<span id="cb369-8"><a href="#cb369-8" aria-hidden="true" tabindex="-1"></a><span class="co">%</span></span>
-<span id="cb369-9"><a href="#cb369-9" aria-hidden="true" tabindex="-1"></a><span class="co">% \begin{markdown}</span></span>
-<span id="cb369-10"><a href="#cb369-10" aria-hidden="true" tabindex="-1"></a><span class="co">% Hello *world*!</span></span>
-<span id="cb369-11"><a href="#cb369-11" aria-hidden="true" tabindex="-1"></a><span class="co">% \end{markdown}</span></span></code></pre></div>
+<div class="sourceCode" id="cb377"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb377-1"><a href="#cb377-1" aria-hidden="true" tabindex="-1"></a><span class="co">% \iffalse</span></span>
+<span id="cb377-2"><a href="#cb377-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">ltxdoc</span>}</span>
+<span id="cb377-3"><a href="#cb377-3" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[stripPercentSigns]{<span class="ex">markdown</span>}</span>
+<span id="cb377-4"><a href="#cb377-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb377-5"><a href="#cb377-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\DocInput</span>{document.dtx}</span>
+<span id="cb377-6"><a href="#cb377-6" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span>
+<span id="cb377-7"><a href="#cb377-7" aria-hidden="true" tabindex="-1"></a><span class="co">% \fi</span></span>
+<span id="cb377-8"><a href="#cb377-8" aria-hidden="true" tabindex="-1"></a><span class="co">%</span></span>
+<span id="cb377-9"><a href="#cb377-9" aria-hidden="true" tabindex="-1"></a><span class="co">% \begin{markdown}</span></span>
+<span id="cb377-10"><a href="#cb377-10" aria-hidden="true" tabindex="-1"></a><span class="co">% Hello *world*!</span></span>
+<span id="cb377-11"><a href="#cb377-11" aria-hidden="true" tabindex="-1"></a><span class="co">% \end{markdown}</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb370"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb370-1"><a href="#cb370-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.dtx</span></code></pre></div>
+<div class="sourceCode" id="cb378"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb378-1"><a href="#cb378-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.dtx</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the text “Hello <em>world</em>!”</p>
<h3 data-number="2.2.3" id="latex-1"><span
@@ -6158,10 +6335,10 @@ class="latex">L<sup>a</sup>T<sub>e</sub>X</span>. For example, to set
the <strong><code>taskLists</code></strong> Lua option to
<code>true</code>, we would include the following code in our <span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> document:</p>
-<div class="sourceCode" id="cb371"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb371-1"><a href="#cb371-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
-<span id="cb371-2"><a href="#cb371-2" aria-hidden="true" tabindex="-1"></a> taskLists = true,</span>
-<span id="cb371-3"><a href="#cb371-3" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div>
+<div class="sourceCode" id="cb379"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb379-1"><a href="#cb379-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
+<span id="cb379-2"><a href="#cb379-2" aria-hidden="true" tabindex="-1"></a> taskLists = true,</span>
+<span id="cb379-3"><a href="#cb379-3" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div>
<p>We can also set all plain <span class="tex">T<sub>e</sub>X</span>
options directly from <span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span>. For example, to set
@@ -6169,10 +6346,10 @@ the <code>\markdownOptionHelperScriptFileName</code> plain <span
class="tex">T<sub>e</sub>X</span> option to
<code>helper-script.lua</code>, we would inclde the following code in
our <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> document:</p>
-<div class="sourceCode" id="cb372"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb372-1"><a href="#cb372-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
-<span id="cb372-2"><a href="#cb372-2" aria-hidden="true" tabindex="-1"></a> helperScriptFileName = helper-script.lua,</span>
-<span id="cb372-3"><a href="#cb372-3" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div>
+<div class="sourceCode" id="cb380"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb380-1"><a href="#cb380-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
+<span id="cb380-2"><a href="#cb380-2" aria-hidden="true" tabindex="-1"></a> helperScriptFileName = helper-script.lua,</span>
+<span id="cb380-3"><a href="#cb380-3" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div>
<h4 data-number="2.2.3.2" id="latexplain"><span
class="header-section-number">2.2.3.2</span> No default token renderer
prototypes</h4>
@@ -6187,8 +6364,8 @@ class="tex">T<sub>e</sub>X</span> implementation and prevent the soft
from being loaded: The plain option must be set before or when loading
the package. Setting the option after loading the package will have no
effect.</p>
-<div class="sourceCode" id="cb373"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb373-1"><a href="#cb373-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[plain]{<span class="ex">markdown</span>}</span></code></pre></div>
+<div class="sourceCode" id="cb381"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb381-1"><a href="#cb381-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[plain]{<span class="ex">markdown</span>}</span></code></pre></div>
<h4 data-number="2.2.3.3" id="latexthemes"><span
class="header-section-number">2.2.3.3</span> <span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> themes</h4>
@@ -6201,11 +6378,11 @@ without low-level programming.</p>
<p>For example, to load themes named <code>witiko/beamer/MU</code> and
<code>witiko/dot</code>, you would use the following code in the
preamble of your document:</p>
-<div class="sourceCode" id="cb374"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb374-1"><a href="#cb374-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[</span>
-<span id="cb374-2"><a href="#cb374-2" aria-hidden="true" tabindex="-1"></a> theme = witiko/beamer/MU,</span>
-<span id="cb374-3"><a href="#cb374-3" aria-hidden="true" tabindex="-1"></a> theme = witiko/dot,</span>
-<span id="cb374-4"><a href="#cb374-4" aria-hidden="true" tabindex="-1"></a>]{<span class="ex">markdown</span>}</span></code></pre></div>
+<div class="sourceCode" id="cb382"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb382-1"><a href="#cb382-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[</span>
+<span id="cb382-2"><a href="#cb382-2" aria-hidden="true" tabindex="-1"></a> theme = witiko/beamer/MU,</span>
+<span id="cb382-3"><a href="#cb382-3" aria-hidden="true" tabindex="-1"></a> theme = witiko/dot,</span>
+<span id="cb382-4"><a href="#cb382-4" aria-hidden="true" tabindex="-1"></a>]{<span class="ex">markdown</span>}</span></code></pre></div>
<p>Due to limitations of <span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span>, themes may not be
loaded after the beginning of a <span
@@ -6219,52 +6396,52 @@ infostring as images of directed graphs rendered by the Graphviz tools.
The right tail of the infostring is used as the image title. The theme
requires a Unix-like operating system with GNU Diffutils and Graphviz
installed. The theme also requires shell access unless the
-<code>\markdownOptionFrozenCache</code> plain <span
+<strong><code>frozenCache</code></strong> plain <span
class="tex">T<sub>e</sub>X</span> option is enabled.</p>
</dd>
</dl>
-<h5 class="unnumbered" id="latex-example-41"><span
+<h5 class="unnumbered" id="latex-example-44"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb375"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb375-1"><a href="#cb375-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb375-2"><a href="#cb375-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[theme=witiko/dot]{<span class="ex">markdown</span>}</span>
-<span id="cb375-3"><a href="#cb375-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\setkeys</span>{Gin}{</span>
-<span id="cb375-4"><a href="#cb375-4" aria-hidden="true" tabindex="-1"></a> width=<span class="fu">\columnwidth</span>,</span>
-<span id="cb375-5"><a href="#cb375-5" aria-hidden="true" tabindex="-1"></a> height=0.65<span class="fu">\paperheight</span>,</span>
-<span id="cb375-6"><a href="#cb375-6" aria-hidden="true" tabindex="-1"></a> keepaspectratio}</span>
-<span id="cb375-7"><a href="#cb375-7" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb375-8"><a href="#cb375-8" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb375-9"><a href="#cb375-9" aria-hidden="true" tabindex="-1"></a>``` dot Various formats of mathemathical formulae</span>
-<span id="cb375-10"><a href="#cb375-10" aria-hidden="true" tabindex="-1"></a>digraph tree {</span>
-<span id="cb375-11"><a href="#cb375-11" aria-hidden="true" tabindex="-1"></a> margin = 0;</span>
-<span id="cb375-12"><a href="#cb375-12" aria-hidden="true" tabindex="-1"></a> rankdir = &quot;LR&quot;;</span>
-<span id="cb375-13"><a href="#cb375-13" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb375-14"><a href="#cb375-14" aria-hidden="true" tabindex="-1"></a> latex -&gt; pmml;</span>
-<span id="cb375-15"><a href="#cb375-15" aria-hidden="true" tabindex="-1"></a> latex -&gt; cmml;</span>
-<span id="cb375-16"><a href="#cb375-16" aria-hidden="true" tabindex="-1"></a> pmml -&gt; slt;</span>
-<span id="cb375-17"><a href="#cb375-17" aria-hidden="true" tabindex="-1"></a> cmml -&gt; opt;</span>
-<span id="cb375-18"><a href="#cb375-18" aria-hidden="true" tabindex="-1"></a> cmml -&gt; prefix;</span>
-<span id="cb375-19"><a href="#cb375-19" aria-hidden="true" tabindex="-1"></a> cmml -&gt; infix;</span>
-<span id="cb375-20"><a href="#cb375-20" aria-hidden="true" tabindex="-1"></a> pmml -&gt; mterms [style=dashed];</span>
-<span id="cb375-21"><a href="#cb375-21" aria-hidden="true" tabindex="-1"></a> cmml -&gt; mterms;</span>
-<span id="cb375-22"><a href="#cb375-22" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb375-23"><a href="#cb375-23" aria-hidden="true" tabindex="-1"></a> latex [label = &quot;LaTeX&quot;];</span>
-<span id="cb375-24"><a href="#cb375-24" aria-hidden="true" tabindex="-1"></a> pmml [label = &quot;Presentation MathML&quot;];</span>
-<span id="cb375-25"><a href="#cb375-25" aria-hidden="true" tabindex="-1"></a> cmml [label = &quot;Content MathML&quot;];</span>
-<span id="cb375-26"><a href="#cb375-26" aria-hidden="true" tabindex="-1"></a> slt [label = &quot;Symbol Layout Tree&quot;];</span>
-<span id="cb375-27"><a href="#cb375-27" aria-hidden="true" tabindex="-1"></a> opt [label = &quot;Operator Tree&quot;];</span>
-<span id="cb375-28"><a href="#cb375-28" aria-hidden="true" tabindex="-1"></a> prefix [label = &quot;Prefix&quot;];</span>
-<span id="cb375-29"><a href="#cb375-29" aria-hidden="true" tabindex="-1"></a> infix [label = &quot;Infix&quot;];</span>
-<span id="cb375-30"><a href="#cb375-30" aria-hidden="true" tabindex="-1"></a> mterms [label = &quot;M-Terms&quot;];</span>
-<span id="cb375-31"><a href="#cb375-31" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb375-32"><a href="#cb375-32" aria-hidden="true" tabindex="-1"></a>```</span>
-<span id="cb375-33"><a href="#cb375-33" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb375-34"><a href="#cb375-34" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<div class="sourceCode" id="cb383"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb383-1"><a href="#cb383-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb383-2"><a href="#cb383-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[theme=witiko/dot]{<span class="ex">markdown</span>}</span>
+<span id="cb383-3"><a href="#cb383-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\setkeys</span>{Gin}{</span>
+<span id="cb383-4"><a href="#cb383-4" aria-hidden="true" tabindex="-1"></a> width=<span class="fu">\columnwidth</span>,</span>
+<span id="cb383-5"><a href="#cb383-5" aria-hidden="true" tabindex="-1"></a> height=0.65<span class="fu">\paperheight</span>,</span>
+<span id="cb383-6"><a href="#cb383-6" aria-hidden="true" tabindex="-1"></a> keepaspectratio}</span>
+<span id="cb383-7"><a href="#cb383-7" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb383-8"><a href="#cb383-8" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb383-9"><a href="#cb383-9" aria-hidden="true" tabindex="-1"></a>``` dot Various formats of mathemathical formulae</span>
+<span id="cb383-10"><a href="#cb383-10" aria-hidden="true" tabindex="-1"></a>digraph tree {</span>
+<span id="cb383-11"><a href="#cb383-11" aria-hidden="true" tabindex="-1"></a> margin = 0;</span>
+<span id="cb383-12"><a href="#cb383-12" aria-hidden="true" tabindex="-1"></a> rankdir = &quot;LR&quot;;</span>
+<span id="cb383-13"><a href="#cb383-13" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb383-14"><a href="#cb383-14" aria-hidden="true" tabindex="-1"></a> latex -&gt; pmml;</span>
+<span id="cb383-15"><a href="#cb383-15" aria-hidden="true" tabindex="-1"></a> latex -&gt; cmml;</span>
+<span id="cb383-16"><a href="#cb383-16" aria-hidden="true" tabindex="-1"></a> pmml -&gt; slt;</span>
+<span id="cb383-17"><a href="#cb383-17" aria-hidden="true" tabindex="-1"></a> cmml -&gt; opt;</span>
+<span id="cb383-18"><a href="#cb383-18" aria-hidden="true" tabindex="-1"></a> cmml -&gt; prefix;</span>
+<span id="cb383-19"><a href="#cb383-19" aria-hidden="true" tabindex="-1"></a> cmml -&gt; infix;</span>
+<span id="cb383-20"><a href="#cb383-20" aria-hidden="true" tabindex="-1"></a> pmml -&gt; mterms [style=dashed];</span>
+<span id="cb383-21"><a href="#cb383-21" aria-hidden="true" tabindex="-1"></a> cmml -&gt; mterms;</span>
+<span id="cb383-22"><a href="#cb383-22" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb383-23"><a href="#cb383-23" aria-hidden="true" tabindex="-1"></a> latex [label = &quot;LaTeX&quot;];</span>
+<span id="cb383-24"><a href="#cb383-24" aria-hidden="true" tabindex="-1"></a> pmml [label = &quot;Presentation MathML&quot;];</span>
+<span id="cb383-25"><a href="#cb383-25" aria-hidden="true" tabindex="-1"></a> cmml [label = &quot;Content MathML&quot;];</span>
+<span id="cb383-26"><a href="#cb383-26" aria-hidden="true" tabindex="-1"></a> slt [label = &quot;Symbol Layout Tree&quot;];</span>
+<span id="cb383-27"><a href="#cb383-27" aria-hidden="true" tabindex="-1"></a> opt [label = &quot;Operator Tree&quot;];</span>
+<span id="cb383-28"><a href="#cb383-28" aria-hidden="true" tabindex="-1"></a> prefix [label = &quot;Prefix&quot;];</span>
+<span id="cb383-29"><a href="#cb383-29" aria-hidden="true" tabindex="-1"></a> infix [label = &quot;Infix&quot;];</span>
+<span id="cb383-30"><a href="#cb383-30" aria-hidden="true" tabindex="-1"></a> mterms [label = &quot;M-Terms&quot;];</span>
+<span id="cb383-31"><a href="#cb383-31" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb383-32"><a href="#cb383-32" aria-hidden="true" tabindex="-1"></a>```</span>
+<span id="cb383-33"><a href="#cb383-33" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb383-34"><a href="#cb383-34" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb376"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb376-1"><a href="#cb376-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb384"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb384-1"><a href="#cb384-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain a drawing of a directed graph similar to Figure 1 from the
following conference article:</p>
@@ -6286,26 +6463,26 @@ http or https protocol. The theme requires the
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> package and a Unix-like
operating system with GNU Coreutils <code>md5sum</code> and either GNU
Wget or cURL installed. The theme also requires shell access unless the
-<code>\markdownOptionFrozenCache</code> plain <span
+<strong><code>frozenCache</code></strong> plain <span
class="tex">T<sub>e</sub>X</span> option is enabled.</p>
</dd>
</dl>
-<h5 class="unnumbered" id="latex-example-42"><span
+<h5 class="unnumbered" id="latex-example-45"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb377"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb377-1"><a href="#cb377-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb377-2"><a href="#cb377-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[theme=witiko/graphicx/http]{<span class="ex">markdown</span>}</span>
-<span id="cb377-3"><a href="#cb377-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb377-4"><a href="#cb377-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb377-5"><a href="#cb377-5" aria-hidden="true" tabindex="-1"></a>![img](https://github.com/witiko/markdown/raw/main/markdown.png</span>
-<span id="cb377-6"><a href="#cb377-6" aria-hidden="true" tabindex="-1"></a> &quot;The banner of the Markdown package&quot;)</span>
-<span id="cb377-7"><a href="#cb377-7" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb377-8"><a href="#cb377-8" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<div class="sourceCode" id="cb385"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb385-1"><a href="#cb385-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb385-2"><a href="#cb385-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[theme=witiko/graphicx/http]{<span class="ex">markdown</span>}</span>
+<span id="cb385-3"><a href="#cb385-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb385-4"><a href="#cb385-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb385-5"><a href="#cb385-5" aria-hidden="true" tabindex="-1"></a>![img](https://github.com/witiko/markdown/raw/main/markdown.png</span>
+<span id="cb385-6"><a href="#cb385-6" aria-hidden="true" tabindex="-1"></a> &quot;The banner of the Markdown package&quot;)</span>
+<span id="cb385-7"><a href="#cb385-7" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb385-8"><a href="#cb385-8" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb378"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb378-1"><a href="#cb378-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb386"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb386-1"><a href="#cb386-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following image:</p>
<blockquote>
@@ -6324,21 +6501,21 @@ non-breaking space even when the <strong><code>hybrid</code></strong>
Lua option is disabled.</p>
</dd>
</dl>
-<h5 class="unnumbered" id="latex-example-43"><span
+<h5 class="unnumbered" id="latex-example-46"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb379"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb379-1"><a href="#cb379-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb379-2"><a href="#cb379-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[theme=witiko/tilde]{<span class="ex">markdown</span>}</span>
-<span id="cb379-3"><a href="#cb379-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb379-4"><a href="#cb379-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb379-5"><a href="#cb379-5" aria-hidden="true" tabindex="-1"></a>Bartel~Leendert van~der~Waerden</span>
-<span id="cb379-6"><a href="#cb379-6" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb379-7"><a href="#cb379-7" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<div class="sourceCode" id="cb387"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb387-1"><a href="#cb387-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb387-2"><a href="#cb387-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[theme=witiko/tilde]{<span class="ex">markdown</span>}</span>
+<span id="cb387-3"><a href="#cb387-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb387-4"><a href="#cb387-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb387-5"><a href="#cb387-5" aria-hidden="true" tabindex="-1"></a>Bartel~Leendert van~der~Waerden</span>
+<span id="cb387-6"><a href="#cb387-6" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb387-7"><a href="#cb387-7" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb380"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb380-1"><a href="#cb380-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb388"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb388-1"><a href="#cb388-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text, where the middot (<code>·</code>) denotes a
non-breaking space:</p>
@@ -6355,30 +6532,30 @@ class="latex">L<sup>a</sup>T<sub>e</sub>X</span> setup snippets provide
syntactic sugar for defining and invoking various options locally.</p>
<p>Here is how we can use setup snippets to store options and invoke
them later:</p>
-<div class="sourceCode" id="cb381"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb381-1"><a href="#cb381-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetupSnippet</span>{romanNumerals}{</span>
-<span id="cb381-2"><a href="#cb381-2" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
-<span id="cb381-3"><a href="#cb381-3" aria-hidden="true" tabindex="-1"></a> olItemWithNumber = {<span class="co">%</span></span>
-<span id="cb381-4"><a href="#cb381-4" aria-hidden="true" tabindex="-1"></a> <span class="fu">\item</span>[<span class="fu">\romannumeral</span>#1<span class="fu">\relax</span>.]<span class="co">%</span></span>
-<span id="cb381-5"><a href="#cb381-5" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb381-6"><a href="#cb381-6" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb381-7"><a href="#cb381-7" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb381-8"><a href="#cb381-8" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb381-9"><a href="#cb381-9" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb381-10"><a href="#cb381-10" aria-hidden="true" tabindex="-1"></a>The following ordered list will be preceded by arabic numerals:</span>
-<span id="cb381-11"><a href="#cb381-11" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb381-12"><a href="#cb381-12" aria-hidden="true" tabindex="-1"></a>1. wahid</span>
-<span id="cb381-13"><a href="#cb381-13" aria-hidden="true" tabindex="-1"></a>2. aithnayn</span>
-<span id="cb381-14"><a href="#cb381-14" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb381-15"><a href="#cb381-15" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb381-16"><a href="#cb381-16" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{snippet=romanNumerals}</span>
-<span id="cb381-17"><a href="#cb381-17" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb381-18"><a href="#cb381-18" aria-hidden="true" tabindex="-1"></a>The following ordered list will be preceded by roman numerals:</span>
-<span id="cb381-19"><a href="#cb381-19" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb381-20"><a href="#cb381-20" aria-hidden="true" tabindex="-1"></a>3. tres</span>
-<span id="cb381-21"><a href="#cb381-21" aria-hidden="true" tabindex="-1"></a>4. quattuor</span>
-<span id="cb381-22"><a href="#cb381-22" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb381-23"><a href="#cb381-23" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span></code></pre></div>
+<div class="sourceCode" id="cb389"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb389-1"><a href="#cb389-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetupSnippet</span>{romanNumerals}{</span>
+<span id="cb389-2"><a href="#cb389-2" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
+<span id="cb389-3"><a href="#cb389-3" aria-hidden="true" tabindex="-1"></a> olItemWithNumber = {<span class="co">%</span></span>
+<span id="cb389-4"><a href="#cb389-4" aria-hidden="true" tabindex="-1"></a> <span class="fu">\item</span>[<span class="fu">\romannumeral</span>#1<span class="fu">\relax</span>.]<span class="co">%</span></span>
+<span id="cb389-5"><a href="#cb389-5" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb389-6"><a href="#cb389-6" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb389-7"><a href="#cb389-7" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb389-8"><a href="#cb389-8" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb389-9"><a href="#cb389-9" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb389-10"><a href="#cb389-10" aria-hidden="true" tabindex="-1"></a>The following ordered list will be preceded by arabic numerals:</span>
+<span id="cb389-11"><a href="#cb389-11" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb389-12"><a href="#cb389-12" aria-hidden="true" tabindex="-1"></a>1. wahid</span>
+<span id="cb389-13"><a href="#cb389-13" aria-hidden="true" tabindex="-1"></a>2. aithnayn</span>
+<span id="cb389-14"><a href="#cb389-14" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb389-15"><a href="#cb389-15" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb389-16"><a href="#cb389-16" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{snippet=romanNumerals}</span>
+<span id="cb389-17"><a href="#cb389-17" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb389-18"><a href="#cb389-18" aria-hidden="true" tabindex="-1"></a>The following ordered list will be preceded by roman numerals:</span>
+<span id="cb389-19"><a href="#cb389-19" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb389-20"><a href="#cb389-20" aria-hidden="true" tabindex="-1"></a>3. tres</span>
+<span id="cb389-21"><a href="#cb389-21" aria-hidden="true" tabindex="-1"></a>4. quattuor</span>
+<span id="cb389-22"><a href="#cb389-22" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb389-23"><a href="#cb389-23" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span></code></pre></div>
<h2 data-number="2.3" id="markdown-tokens"><span
class="header-section-number">2.3</span> Markdown Tokens</h2>
<p>A key feature of the Markdown package is the support for manipulating
@@ -6392,700 +6569,627 @@ class="header-section-number">2.3.1</span> Token Renderers</h3>
<p>Token renderers are user-defined <span
class="tex">T<sub>e</sub>X</span> macros, which render markdown tokens.
In this section, I will describe the individual token renderers.</p>
-<h4 data-number="2.3.1.1" id="tickbox-renderers"><span
-class="header-section-number">2.3.1.1</span> Tickbox Renderers</h4>
-<p>The macros named <code>\markdownRendererTickedBox</code>,
-<code>\markdownRendererHalfTickedBox</code>, and
-<code>\markdownRendererUntickedBox</code> represent ticked and unticked
-boxes, respectively. These macros will either be produced, when the
-<strong><code>taskLists</code></strong> option is enabled, or when the
-Ballot Box with X (☒, U+2612), Hourglass (⌛, U+231B) or Ballot Box (☐,
-U+2610) Unicode characters are encountered in the markdown input,
-respectively.</p>
-<h5 class="unnumbered" id="latex-example-44"><span
-class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
-<p>Using a text editor, create a text document named
-<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb382"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb382-1"><a href="#cb382-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb382-2"><a href="#cb382-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[taskLists]{<span class="ex">markdown</span>}</span>
-<span id="cb382-3"><a href="#cb382-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
-<span id="cb382-4"><a href="#cb382-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
-<span id="cb382-5"><a href="#cb382-5" aria-hidden="true" tabindex="-1"></a> untickedBox = No,</span>
-<span id="cb382-6"><a href="#cb382-6" aria-hidden="true" tabindex="-1"></a> tickedBox = Yes,</span>
-<span id="cb382-7"><a href="#cb382-7" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb382-8"><a href="#cb382-8" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb382-9"><a href="#cb382-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb382-10"><a href="#cb382-10" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb382-11"><a href="#cb382-11" aria-hidden="true" tabindex="-1"></a>- [ ] you can&#39;t.</span>
-<span id="cb382-12"><a href="#cb382-12" aria-hidden="true" tabindex="-1"></a>- [x] I can!</span>
-<span id="cb382-13"><a href="#cb382-13" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb382-14"><a href="#cb382-14" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
-<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb383"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb383-1"><a href="#cb383-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
-<p>A PDF document named <code>document.pdf</code> should be produced and
-contain the following text:</p>
-<blockquote>
-<ul>
-<li>No you can’t.</li>
-<li>Yes I can!</li>
-</ul>
-</blockquote>
-<h5 class="unnumbered" id="context-example-32">Con<span
-class="tex">T<sub>e</sub>X</span>t Example</h5>
-<p>Using a text editor, create a text document named
-<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb384"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb384-1"><a href="#cb384-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
-<span id="cb384-2"><a href="#cb384-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[taskLists = yes]</span>
-<span id="cb384-3"><a href="#cb384-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererUntickedBox</span>{No}</span>
-<span id="cb384-4"><a href="#cb384-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererTickedBox</span>{Yes}</span>
-<span id="cb384-5"><a href="#cb384-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
-<span id="cb384-6"><a href="#cb384-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb384-7"><a href="#cb384-7" aria-hidden="true" tabindex="-1"></a>- [ ] you can&#39;t.</span>
-<span id="cb384-8"><a href="#cb384-8" aria-hidden="true" tabindex="-1"></a>- [x] I can!</span>
-<span id="cb384-9"><a href="#cb384-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb384-10"><a href="#cb384-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
-<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb385"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb385-1"><a href="#cb385-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
-<p>A PDF document named <code>document.pdf</code> should be produced and
-contain the following text:</p>
-<blockquote>
-<ul>
-<li>No you can’t.</li>
-<li>Yes I can!</li>
-</ul>
-</blockquote>
-<h4 data-number="2.3.1.2" id="markdown-document-renderers"><span
-class="header-section-number">2.3.1.2</span> Markdown Document
-Renderers</h4>
-<p>The <code>\markdownRendererDocumentBegin</code> and
-<code>\markdownRendererDocumentEnd</code> macros represent the beginning
-and the end of a <em>markdown</em> document. The macros receive no
-arguments.</p>
-<p>A <span class="tex">T<sub>e</sub>X</span> document may contain any
-number of markdown documents. Additionally, markdown documents may
-appear not only in a sequence, but several markdown documents may also
-be <em>nested</em>. Redefinitions of the macros should take this into
-account.</p>
-<h5 class="unnumbered" id="latex-example-45"><span
+<h4 data-number="2.3.1.1" id="attribute-renderers"><span
+class="header-section-number">2.3.1.1</span> Attribute Renderers</h4>
+<p>The following macros are only produced, when the
+<strong><code>headerAttributes</code></strong> option is enabled.</p>
+<p><code>\markdownRendererAttributeIdentifier</code> represents the
+⟨<em>identifier</em>⟩ of a markdown element
+(<code>id="</code>⟨<em>identifier</em>⟩<code>"</code> in HTML and
+<code>#</code>⟨<em>identifier</em>⟩ in Markdown’s
+<strong><code>headerAttributes</code></strong> syntax extension). The
+macro receives a single attribute that corresponds to the
+⟨<em>identifier</em>⟩.</p>
+<p><code>\markdownRendererAttributeClassName</code> represents the
+⟨<em>class name</em>⟩ of a markdown element
+(<code>class="</code>⟨<em>class name</em>⟩ …<code>"</code> in HTML and
+<code>.</code>⟨<em>class name</em>⟩ in Markdown’s
+<strong><code>headerAttributes</code></strong> syntax extension). The
+macro receives a single attribute that corresponds to the .</p>
+<p><code>\markdownRendererAttributeKeyValue</code> represents a HTML
+attribute in the form ⟨<em>key</em>⟩<code>=</code>⟨<em>value</em>⟩ that
+is neither an identifier nor a class name. The macro receives two
+attributes that correspond to the ⟨<em>key</em>⟩ and the
+⟨<em>value</em>⟩, respectively.</p>
+<h5 class="unnumbered" id="latex-example-47"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
-<code>nested.md</code> with the following content:</p>
-<div class="sourceCode" id="cb386"><pre
-class="sourceCode md"><code class="sourceCode markdown"><span id="cb386-1"><a href="#cb386-1" aria-hidden="true" tabindex="-1"></a>This is a *nested* markdown document.</span></code></pre></div>
-<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb387"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb387-1"><a href="#cb387-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb387-2"><a href="#cb387-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[contentBlocks]{<span class="ex">markdown</span>}</span>
-<span id="cb387-3"><a href="#cb387-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
-<span id="cb387-4"><a href="#cb387-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
-<span id="cb387-5"><a href="#cb387-5" aria-hidden="true" tabindex="-1"></a> contentBlock = {<span class="co">%</span></span>
-<span id="cb387-6"><a href="#cb387-6" aria-hidden="true" tabindex="-1"></a> <span class="fu">\markdownInput</span>{#3}<span class="co">%</span></span>
-<span id="cb387-7"><a href="#cb387-7" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb387-8"><a href="#cb387-8" aria-hidden="true" tabindex="-1"></a> documentBegin = {<span class="co">%</span></span>
-<span id="cb387-9"><a href="#cb387-9" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
-<span id="cb387-10"><a href="#cb387-10" aria-hidden="true" tabindex="-1"></a> <span class="fu">\emph</span>{(The beginning of a document)}</span>
-<span id="cb387-11"><a href="#cb387-11" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
-<span id="cb387-12"><a href="#cb387-12" aria-hidden="true" tabindex="-1"></a> <span class="fu">\begingroup</span></span>
-<span id="cb387-13"><a href="#cb387-13" aria-hidden="true" tabindex="-1"></a> <span class="fu">\markdownSetup</span>{snippet=first-nesting-level}<span class="co">%</span></span>
-<span id="cb387-14"><a href="#cb387-14" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb387-15"><a href="#cb387-15" aria-hidden="true" tabindex="-1"></a> documentEnd = {<span class="co">%</span></span>
-<span id="cb387-16"><a href="#cb387-16" aria-hidden="true" tabindex="-1"></a> <span class="fu">\endgroup</span></span>
-<span id="cb387-17"><a href="#cb387-17" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
-<span id="cb387-18"><a href="#cb387-18" aria-hidden="true" tabindex="-1"></a> <span class="fu">\emph</span>{(The end of a document)}</span>
-<span id="cb387-19"><a href="#cb387-19" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
-<span id="cb387-20"><a href="#cb387-20" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb387-21"><a href="#cb387-21" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb387-22"><a href="#cb387-22" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb387-23"><a href="#cb387-23" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetupSnippet</span>{first-nesting-level}{</span>
-<span id="cb387-24"><a href="#cb387-24" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
-<span id="cb387-25"><a href="#cb387-25" aria-hidden="true" tabindex="-1"></a> documentBegin = {</span>
-<span id="cb387-26"><a href="#cb387-26" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
-<span id="cb387-27"><a href="#cb387-27" aria-hidden="true" tabindex="-1"></a> <span class="fu">\emph</span>{(The beginning of a nested document)}</span>
-<span id="cb387-28"><a href="#cb387-28" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
-<span id="cb387-29"><a href="#cb387-29" aria-hidden="true" tabindex="-1"></a> <span class="fu">\begingroup</span></span>
-<span id="cb387-30"><a href="#cb387-30" aria-hidden="true" tabindex="-1"></a> <span class="fu">\markdownSetup</span>{snippet=second-nesting-level-and-below}</span>
-<span id="cb387-31"><a href="#cb387-31" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb387-32"><a href="#cb387-32" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb387-33"><a href="#cb387-33" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb387-34"><a href="#cb387-34" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetupSnippet</span>{second-nesting-level-and-below}{</span>
-<span id="cb387-35"><a href="#cb387-35" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
-<span id="cb387-36"><a href="#cb387-36" aria-hidden="true" tabindex="-1"></a> documentBegin = {</span>
-<span id="cb387-37"><a href="#cb387-37" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
-<span id="cb387-38"><a href="#cb387-38" aria-hidden="true" tabindex="-1"></a> <span class="fu">\emph</span>{(The beginning of a nested document)}</span>
-<span id="cb387-39"><a href="#cb387-39" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
-<span id="cb387-40"><a href="#cb387-40" aria-hidden="true" tabindex="-1"></a> <span class="fu">\begingroup</span></span>
-<span id="cb387-41"><a href="#cb387-41" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb387-42"><a href="#cb387-42" aria-hidden="true" tabindex="-1"></a> documentEnd = {</span>
-<span id="cb387-43"><a href="#cb387-43" aria-hidden="true" tabindex="-1"></a> <span class="fu">\endgroup</span></span>
-<span id="cb387-44"><a href="#cb387-44" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
-<span id="cb387-45"><a href="#cb387-45" aria-hidden="true" tabindex="-1"></a> <span class="fu">\emph</span>{(The end of a nested document)}</span>
-<span id="cb387-46"><a href="#cb387-46" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
-<span id="cb387-47"><a href="#cb387-47" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb387-48"><a href="#cb387-48" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb387-49"><a href="#cb387-49" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb387-50"><a href="#cb387-50" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb387-51"><a href="#cb387-51" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb387-52"><a href="#cb387-52" aria-hidden="true" tabindex="-1"></a>Hello *world*!</span>
-<span id="cb387-53"><a href="#cb387-53" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb387-54"><a href="#cb387-54" aria-hidden="true" tabindex="-1"></a>/nested.md</span>
-<span id="cb387-55"><a href="#cb387-55" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb387-56"><a href="#cb387-56" aria-hidden="true" tabindex="-1"></a>_Foo_ bar!</span>
-<span id="cb387-57"><a href="#cb387-57" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb387-58"><a href="#cb387-58" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb387-59"><a href="#cb387-59" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb387-60"><a href="#cb387-60" aria-hidden="true" tabindex="-1"></a>Bar baz!</span>
-<span id="cb387-61"><a href="#cb387-61" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb387-62"><a href="#cb387-62" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb387-63"><a href="#cb387-63" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<div class="sourceCode" id="cb390"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb390-1"><a href="#cb390-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb390-2"><a href="#cb390-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[headerAttributes, underscores=false]{<span class="ex">markdown</span>}</span>
+<span id="cb390-3"><a href="#cb390-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
+<span id="cb390-4"><a href="#cb390-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
+<span id="cb390-5"><a href="#cb390-5" aria-hidden="true" tabindex="-1"></a> attributeIdentifier = {<span class="co">%</span></span>
+<span id="cb390-6"><a href="#cb390-6" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
+<span id="cb390-7"><a href="#cb390-7" aria-hidden="true" tabindex="-1"></a> <span class="fu">\emph</span>{(Identifier: #1)}</span>
+<span id="cb390-8"><a href="#cb390-8" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
+<span id="cb390-9"><a href="#cb390-9" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb390-10"><a href="#cb390-10" aria-hidden="true" tabindex="-1"></a> attributeClassName = {<span class="co">%</span></span>
+<span id="cb390-11"><a href="#cb390-11" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
+<span id="cb390-12"><a href="#cb390-12" aria-hidden="true" tabindex="-1"></a> <span class="fu">\emph</span>{(Class name: #1)}</span>
+<span id="cb390-13"><a href="#cb390-13" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
+<span id="cb390-14"><a href="#cb390-14" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb390-15"><a href="#cb390-15" aria-hidden="true" tabindex="-1"></a> attributeKeyValue = {<span class="co">%</span></span>
+<span id="cb390-16"><a href="#cb390-16" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
+<span id="cb390-17"><a href="#cb390-17" aria-hidden="true" tabindex="-1"></a> <span class="fu">\emph</span>{(Key: #1, Value: #2)}</span>
+<span id="cb390-18"><a href="#cb390-18" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
+<span id="cb390-19"><a href="#cb390-19" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb390-20"><a href="#cb390-20" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb390-21"><a href="#cb390-21" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb390-22"><a href="#cb390-22" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb390-23"><a href="#cb390-23" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb390-24"><a href="#cb390-24" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb390-25"><a href="#cb390-25" aria-hidden="true" tabindex="-1"></a># First top-level heading {jane=doe}</span>
+<span id="cb390-26"><a href="#cb390-26" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb390-27"><a href="#cb390-27" aria-hidden="true" tabindex="-1"></a>## A subheading {#identifier}</span>
+<span id="cb390-28"><a href="#cb390-28" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb390-29"><a href="#cb390-29" aria-hidden="true" tabindex="-1"></a># Second top-level heading {.class_name}</span>
+<span id="cb390-30"><a href="#cb390-30" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb390-31"><a href="#cb390-31" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb390-32"><a href="#cb390-32" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb388"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb388-1"><a href="#cb388-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb391"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb391-1"><a href="#cb391-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
-<p><em>(The beginning of a document)</em></p>
-<p>Hello <em>world</em>!</p>
-<p><em>(The beginning of a nested document)</em></p>
-<p>This is a <em>nested</em> markdown document.</p>
-<p><em>(The end of a nested document)</em></p>
-<p><em>Foo</em> bar!</p>
-<p><em>(The end of a document)</em></p>
-<p><em>(The beginning of a document)</em></p>
-<p>Bar baz!</p>
-<p><em>(The end of a document)</em></p>
+<h1 id="first-top-level-heading">First top-level heading</h1>
+<p><em>(Key: Jane, Value: Doe)</em></p>
+<h2 id="a-subheading">A subheading</h2>
+<p><em>(Identifier: identifier)</em></p>
+<h1 id="second-top-level-heading">Second top-level heading</h1>
+<p><em>(Class name: class_name)</em></p>
</blockquote>
-<h4 data-number="2.3.1.3" id="interblock-separator-renderer"><span
-class="header-section-number">2.3.1.3</span> Interblock Separator
-Renderer</h4>
-<p>The <code>\markdownRendererInterblockSeparator</code> macro
-represents a separator between two markdown block elements. The macro
-receives no arguments.</p>
+<h4 data-number="2.3.1.2" id="block-quote-renderers"><span
+class="header-section-number">2.3.1.2</span> Block Quote Renderers</h4>
+<p>The <code>\markdownRendererBlockQuoteBegin</code> macro represents
+the beginning of a block quote. The macro receives no arguments.</p>
+<p>The <code>\markdownRendererBlockQuoteEnd</code> macro represents the
+end of a block quote. The macro receives no arguments.</p>
<h5 class="unnumbered" id="plain-tex-example-18">Plain <span
class="tex">T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb389"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb389-1"><a href="#cb389-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
-<span id="cb389-2"><a href="#cb389-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span>
-<span id="cb389-3"><a href="#cb389-3" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
-<span id="cb389-4"><a href="#cb389-4" aria-hidden="true" tabindex="-1"></a> {<span class="fu">\it</span>(The end of a block)}<span class="co">%</span></span>
-<span id="cb389-5"><a href="#cb389-5" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
-<span id="cb389-6"><a href="#cb389-6" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb389-7"><a href="#cb389-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
-<span id="cb389-8"><a href="#cb389-8" aria-hidden="true" tabindex="-1"></a>Hello *world*!</span>
-<span id="cb389-9"><a href="#cb389-9" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb389-10"><a href="#cb389-10" aria-hidden="true" tabindex="-1"></a>_Foo_ bar!</span>
-<span id="cb389-11"><a href="#cb389-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
-<span id="cb389-12"><a href="#cb389-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
+<div class="sourceCode" id="cb392"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb392-1"><a href="#cb392-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
+<span id="cb392-2"><a href="#cb392-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererBlockQuoteBegin</span>{<span class="co">%</span></span>
+<span id="cb392-3"><a href="#cb392-3" aria-hidden="true" tabindex="-1"></a> <span class="fu">\begingroup</span></span>
+<span id="cb392-4"><a href="#cb392-4" aria-hidden="true" tabindex="-1"></a> <span class="fu">\vskip\parindent</span></span>
+<span id="cb392-5"><a href="#cb392-5" aria-hidden="true" tabindex="-1"></a> <span class="fu">\leftskip</span>=2<span class="fu">\parindent</span></span>
+<span id="cb392-6"><a href="#cb392-6" aria-hidden="true" tabindex="-1"></a> <span class="fu">\parindent</span>=0pt</span>
+<span id="cb392-7"><a href="#cb392-7" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb392-8"><a href="#cb392-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererBlockQuoteEnd</span>{<span class="co">%</span></span>
+<span id="cb392-9"><a href="#cb392-9" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
+<span id="cb392-10"><a href="#cb392-10" aria-hidden="true" tabindex="-1"></a> <span class="fu">\vskip\parindent</span></span>
+<span id="cb392-11"><a href="#cb392-11" aria-hidden="true" tabindex="-1"></a> <span class="fu">\endgroup</span></span>
+<span id="cb392-12"><a href="#cb392-12" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb392-13"><a href="#cb392-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
+<span id="cb392-14"><a href="#cb392-14" aria-hidden="true" tabindex="-1"></a>A quote from William Shakespeare&#39;s King Lear:</span>
+<span id="cb392-15"><a href="#cb392-15" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb392-16"><a href="#cb392-16" aria-hidden="true" tabindex="-1"></a>&gt; This is the excellent foppery of the world that when we are</span>
+<span id="cb392-17"><a href="#cb392-17" aria-hidden="true" tabindex="-1"></a>&gt; sick in fortune---often the surfeit of our own behavior---we</span>
+<span id="cb392-18"><a href="#cb392-18" aria-hidden="true" tabindex="-1"></a>&gt; make guilty of our disasters the sun, the moon, and the</span>
+<span id="cb392-19"><a href="#cb392-19" aria-hidden="true" tabindex="-1"></a>&gt; stars [...]</span>
+<span id="cb392-20"><a href="#cb392-20" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
+<span id="cb392-21"><a href="#cb392-21" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb390"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb390-1"><a href="#cb390-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb393"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb393-1"><a href="#cb393-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
-<p>Hello <em>world</em>!</p>
-<p><em>(The end of a block)</em></p>
-<p><em>Foo</em> bar!</p>
+<p>A quote from William Shakespeare’s King Lear:</p>
+<blockquote>
+<p>This is the excellent foppery of the world that when we are sick in
+fortune—often the surfeit of our own behavior—we make guilty of our
+disasters the sun, the moon, and the stars […]</p>
</blockquote>
-<h5 class="unnumbered" id="latex-example-46"><span
+</blockquote>
+<h5 class="unnumbered" id="latex-example-48"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb391"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb391-1"><a href="#cb391-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb391-2"><a href="#cb391-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span>
-<span id="cb391-3"><a href="#cb391-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
-<span id="cb391-4"><a href="#cb391-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
-<span id="cb391-5"><a href="#cb391-5" aria-hidden="true" tabindex="-1"></a> interblockSeparator = {<span class="co">%</span></span>
-<span id="cb391-6"><a href="#cb391-6" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
-<span id="cb391-7"><a href="#cb391-7" aria-hidden="true" tabindex="-1"></a> <span class="fu">\emph</span>{(The end of a block)}<span class="co">%</span></span>
-<span id="cb391-8"><a href="#cb391-8" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
-<span id="cb391-9"><a href="#cb391-9" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb391-10"><a href="#cb391-10" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb391-11"><a href="#cb391-11" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb391-12"><a href="#cb391-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb391-13"><a href="#cb391-13" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb391-14"><a href="#cb391-14" aria-hidden="true" tabindex="-1"></a>Hello *world*!</span>
-<span id="cb391-15"><a href="#cb391-15" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb391-16"><a href="#cb391-16" aria-hidden="true" tabindex="-1"></a>_Foo_ bar!</span>
-<span id="cb391-17"><a href="#cb391-17" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb391-18"><a href="#cb391-18" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<div class="sourceCode" id="cb394"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb394-1"><a href="#cb394-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb394-2"><a href="#cb394-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span>
+<span id="cb394-3"><a href="#cb394-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
+<span id="cb394-4"><a href="#cb394-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
+<span id="cb394-5"><a href="#cb394-5" aria-hidden="true" tabindex="-1"></a> blockQuoteBegin = {<span class="kw">\begin</span>{<span class="ex">quote</span>}},</span>
+<span id="cb394-6"><a href="#cb394-6" aria-hidden="true" tabindex="-1"></a> blockQuoteEnd = {<span class="kw">\end</span>{<span class="ex">quote</span>}},</span>
+<span id="cb394-7"><a href="#cb394-7" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb394-8"><a href="#cb394-8" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb394-9"><a href="#cb394-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb394-10"><a href="#cb394-10" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb394-11"><a href="#cb394-11" aria-hidden="true" tabindex="-1"></a>A quote from William Shakespeare&#39;s King Lear:</span>
+<span id="cb394-12"><a href="#cb394-12" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb394-13"><a href="#cb394-13" aria-hidden="true" tabindex="-1"></a>&gt; This is the excellent foppery of the world that when we are</span>
+<span id="cb394-14"><a href="#cb394-14" aria-hidden="true" tabindex="-1"></a>&gt; sick in fortune---often the surfeit of our own behavior---we</span>
+<span id="cb394-15"><a href="#cb394-15" aria-hidden="true" tabindex="-1"></a>&gt; make guilty of our disasters the sun, the moon, and the</span>
+<span id="cb394-16"><a href="#cb394-16" aria-hidden="true" tabindex="-1"></a>&gt; stars [...]</span>
+<span id="cb394-17"><a href="#cb394-17" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb394-18"><a href="#cb394-18" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb392"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb392-1"><a href="#cb392-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb395"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb395-1"><a href="#cb395-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
-<p>Hello <em>world</em>!</p>
-<p><em>(The end of a block)</em></p>
-<p><em>Foo</em> bar!</p>
+<p>A quote from William Shakespeare’s King Lear:</p>
+<blockquote>
+<p>This is the excellent foppery of the world that when we are sick in
+fortune—often the surfeit of our own behavior—we make guilty of our
+disasters the sun, the moon, and the stars […]</p>
</blockquote>
-<h5 class="unnumbered" id="context-example-33">Con<span
+</blockquote>
+<h5 class="unnumbered" id="context-example-32">Con<span
class="tex">T<sub>e</sub>X</span>t Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb393"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb393-1"><a href="#cb393-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
-<span id="cb393-2"><a href="#cb393-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span>
-<span id="cb393-3"><a href="#cb393-3" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
-<span id="cb393-4"><a href="#cb393-4" aria-hidden="true" tabindex="-1"></a> <span class="fu">\emph</span>{(The end of a block)}<span class="co">%</span></span>
-<span id="cb393-5"><a href="#cb393-5" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
-<span id="cb393-6"><a href="#cb393-6" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb393-7"><a href="#cb393-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
-<span id="cb393-8"><a href="#cb393-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb393-9"><a href="#cb393-9" aria-hidden="true" tabindex="-1"></a>Hello *world*!</span>
-<span id="cb393-10"><a href="#cb393-10" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb393-11"><a href="#cb393-11" aria-hidden="true" tabindex="-1"></a>_Foo_ bar!</span>
-<span id="cb393-12"><a href="#cb393-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb393-13"><a href="#cb393-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
+<div class="sourceCode" id="cb396"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb396-1"><a href="#cb396-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
+<span id="cb396-2"><a href="#cb396-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererBlockQuoteBegin</span>{<span class="fu">\startquotation</span>}</span>
+<span id="cb396-3"><a href="#cb396-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererBlockQuoteEnd</span>{<span class="fu">\stopquotation</span>}</span>
+<span id="cb396-4"><a href="#cb396-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
+<span id="cb396-5"><a href="#cb396-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb396-6"><a href="#cb396-6" aria-hidden="true" tabindex="-1"></a>A quote from William Shakespeare&#39;s King Lear:</span>
+<span id="cb396-7"><a href="#cb396-7" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb396-8"><a href="#cb396-8" aria-hidden="true" tabindex="-1"></a>&gt; This is the excellent foppery of the world that when we are</span>
+<span id="cb396-9"><a href="#cb396-9" aria-hidden="true" tabindex="-1"></a>&gt; sick in fortune---often the surfeit of our own behavior---we</span>
+<span id="cb396-10"><a href="#cb396-10" aria-hidden="true" tabindex="-1"></a>&gt; make guilty of our disasters the sun, the moon, and the</span>
+<span id="cb396-11"><a href="#cb396-11" aria-hidden="true" tabindex="-1"></a>&gt; stars [...]</span>
+<span id="cb396-12"><a href="#cb396-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb396-13"><a href="#cb396-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb394"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb394-1"><a href="#cb394-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb397"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb397-1"><a href="#cb397-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
-<p>Hello <em>world</em>!</p>
-<p><em>(The end of a block)</em></p>
-<p><em>Foo</em> bar!</p>
-</blockquote>
-<h4 data-number="2.3.1.4" id="line-break-renderer"><span
-class="header-section-number">2.3.1.4</span> Line Break Renderer</h4>
-<p>The <code>\markdownRendererLineBreak</code> macro represents a forced
-line break. The macro receives no arguments.</p>
-<h5 class="unnumbered" id="plain-tex-example-19">Plain <span
-class="tex">T<sub>e</sub>X</span> Example</h5>
-<p>Using a text editor, create a text document named
-<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb395"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb395-1"><a href="#cb395-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
-<span id="cb395-2"><a href="#cb395-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererLineBreak</span>{<span class="co">%</span></span>
-<span id="cb395-3"><a href="#cb395-3" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
-<span id="cb395-4"><a href="#cb395-4" aria-hidden="true" tabindex="-1"></a> {<span class="fu">\it</span>(A forced linebreak)}<span class="co">%</span></span>
-<span id="cb395-5"><a href="#cb395-5" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
-<span id="cb395-6"><a href="#cb395-6" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb395-7"><a href="#cb395-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownInput</span>{example.md}</span>
-<span id="cb395-8"><a href="#cb395-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
-<p>Using a text editor, create a text document named
-<code>example.md</code> with the following content. Note the two spaces
-at the end of the first line, which specify a hard linebreak. Due to the
-limitations of the <span class="tex">T<sub>e</sub>X</span> input
-processor, hard linebreaks would be ignored if we typed them directly
-into the <code>document.tex</code> document.</p>
-<pre><code>Hello world! <br/>_Foo_ bar!</code></pre>
-<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb396"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb396-1"><a href="#cb396-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
-<p>A PDF document named <code>document.pdf</code> should be produced and
-contain the following text:</p>
+<p>A quote from William Shakespeare’s King Lear:</p>
<blockquote>
-<p>Hello <em>world</em>!</p>
-<p><em>(A forced linebreak)</em></p>
-<p><em>Foo</em> bar!</p>
+<p>This is the excellent foppery of the world that when we are sick in
+fortune—often the surfeit of our own behavior—we make guilty of our
+disasters the sun, the moon, and the stars […]</p>
</blockquote>
-<h5 class="unnumbered" id="latex-example-47"><span
+</blockquote>
+<h4 data-number="2.3.1.3" id="bracketed-spans-context-renderers"><span
+class="header-section-number">2.3.1.3</span> Bracketed Spans Context
+Renderers</h4>
+<p>The following macros are only produced, when the
+<strong><code>bracketedSpans</code></strong> option is enabled.</p>
+<p>The <code>\markdownRendererBracketedSpanAttributeContextBegin</code>
+and <code>\markdownRendererBracketedSpanAttributeContextEnd</code>
+macros represent the beginning and the end of an inline bracketed span
+in which the attributes of the span apply. The macros receive no
+arguments.</p>
+<h5 class="unnumbered" id="latex-example-49"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb397"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb397-1"><a href="#cb397-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb397-2"><a href="#cb397-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span>
-<span id="cb397-3"><a href="#cb397-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
-<span id="cb397-4"><a href="#cb397-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
-<span id="cb397-5"><a href="#cb397-5" aria-hidden="true" tabindex="-1"></a> lineBreak = {<span class="co">%</span></span>
-<span id="cb397-6"><a href="#cb397-6" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
-<span id="cb397-7"><a href="#cb397-7" aria-hidden="true" tabindex="-1"></a> <span class="fu">\emph</span>{(A forced linebreak)}<span class="co">%</span></span>
-<span id="cb397-8"><a href="#cb397-8" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
-<span id="cb397-9"><a href="#cb397-9" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb397-10"><a href="#cb397-10" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb397-11"><a href="#cb397-11" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb397-12"><a href="#cb397-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb397-13"><a href="#cb397-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownInput</span>{example.md}</span>
-<span id="cb397-14"><a href="#cb397-14" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
-<p>Using a text editor, create a text document named
-<code>example.md</code> with the following content. Note the two spaces
-at the end of the first line, which specify a hard linebreak. Due to the
-limitations of the <span class="tex">T<sub>e</sub>X</span> input
-processor, hard linebreaks would be ignored if we typed them directly
-into the <code>document.tex</code> document.</p>
-<pre><code>Hello world! <br/>_Foo_ bar!</code></pre>
-<p>Next, invoke LuaTeX from the terminal:</p>
<div class="sourceCode" id="cb398"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb398-1"><a href="#cb398-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
-<p>A PDF document named <code>document.pdf</code> should be produced and
-contain the following text:</p>
-<blockquote>
-<p>Hello <em>world</em>!</p>
-<p><em>(A forced linebreak)</em></p>
-<p><em>Foo</em> bar!</p>
-</blockquote>
-<h5 class="unnumbered" id="context-example-34">Con<span
-class="tex">T<sub>e</sub>X</span>t Example</h5>
-<p>Using a text editor, create a text document named
-<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb399"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb399-1"><a href="#cb399-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
-<span id="cb399-2"><a href="#cb399-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererLineBreak</span>{<span class="co">%</span></span>
-<span id="cb399-3"><a href="#cb399-3" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
-<span id="cb399-4"><a href="#cb399-4" aria-hidden="true" tabindex="-1"></a> <span class="fu">\emph</span>{(A forced linebreak)}<span class="co">%</span></span>
-<span id="cb399-5"><a href="#cb399-5" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
-<span id="cb399-6"><a href="#cb399-6" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb399-7"><a href="#cb399-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
-<span id="cb399-8"><a href="#cb399-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownInput</span>{example.md}</span>
-<span id="cb399-9"><a href="#cb399-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
-<p>Using a text editor, create a text document named
-<code>example.md</code> with the following content. Note the two spaces
-at the end of the first line, which specify a hard linebreak. Due to the
-limitations of the <span class="tex">T<sub>e</sub>X</span> input
-processor, hard linebreaks would be ignored if we typed them directly
-into the <code>document.tex</code> document.</p>
-<pre><code>Hello world! <br/>_Foo_ bar!</code></pre>
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb398-1"><a href="#cb398-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb398-2"><a href="#cb398-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[bracketedSpans]{<span class="ex">markdown</span>}</span>
+<span id="cb398-3"><a href="#cb398-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
+<span id="cb398-4"><a href="#cb398-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
+<span id="cb398-5"><a href="#cb398-5" aria-hidden="true" tabindex="-1"></a> fencedDivAttributeContextBegin = {(},</span>
+<span id="cb398-6"><a href="#cb398-6" aria-hidden="true" tabindex="-1"></a> fencedDivAttributeContextEnd = {)},</span>
+<span id="cb398-7"><a href="#cb398-7" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb398-8"><a href="#cb398-8" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb398-9"><a href="#cb398-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb398-10"><a href="#cb398-10" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb398-11"><a href="#cb398-11" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb398-12"><a href="#cb398-12" aria-hidden="true" tabindex="-1"></a>[foo [bar]{#identifier}]{key=value} [baz]{.class_name}</span>
+<span id="cb398-13"><a href="#cb398-13" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb398-14"><a href="#cb398-14" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb398-15"><a href="#cb398-15" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb400"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb400-1"><a href="#cb400-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb399"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb399-1"><a href="#cb399-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
-<p>Hello <em>world</em>!</p>
-<p><em>(A forced linebreak)</em></p>
-<p><em>Foo</em> bar!</p>
+<p>(foo (bar)) (baz)</p>
</blockquote>
-<h4 data-number="2.3.1.5" id="ellipsis-renderer"><span
-class="header-section-number">2.3.1.5</span> Ellipsis Renderer</h4>
-<p>The <code>\markdownRendererEllipsis</code> macro replaces any
-occurance of ASCII ellipses in the input text. This macro will only be
-produced, when the <strong><code>smartEllipses</code></strong> option is
-enabled. The macro receives no arguments.</p>
-<h5 class="unnumbered" id="plain-tex-example-20">Plain <span
+<h4 data-number="2.3.1.4" id="bullet-list-renderers"><span
+class="header-section-number">2.3.1.4</span> Bullet List Renderers</h4>
+<p>The <code>\markdownRendererUlBegin</code> macro represents the
+beginning of a bulleted list that contains an item with several
+paragraphs of text (the list is not tight). The macro receives no
+arguments.</p>
+<p>The <code>\markdownRendererUlBeginTight</code> macro represents the
+beginning of a bulleted list that contains no item with several
+paragraphs of text (the list is tight). This macro will only be
+produced, when the <strong><code>tightLists</code></strong> option is
+disabled. The macro receives no arguments.</p>
+<p>The <code>\markdownRendererUlItem</code> macro represents an item in
+a bulleted list. The macro receives no arguments.</p>
+<p>The <code>\markdownRendererUlItemEnd</code> macro represents the end
+of an item in a bulleted list. The macro receives no arguments.</p>
+<p>The <code>\markdownRendererUlEnd</code> macro represents the end of a
+bulleted list that contains an item with several paragraphs of text (the
+list is not tight). The macro receives no arguments.</p>
+<p>The <code>\markdownRendererUlEndTight</code> macro represents the end
+of a bulleted list that contains no item with several paragraphs of text
+(the list is tight). This macro will only be produced, when the
+<strong><code>tightLists</code></strong> option is disabled. The macro
+receives no arguments.</p>
+<h5 class="unnumbered" id="plain-tex-example-19">Plain <span
class="tex">T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb401"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb401-1"><a href="#cb401-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
-<span id="cb401-2"><a href="#cb401-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionSmartEllipses</span>{true}</span>
-<span id="cb401-3"><a href="#cb401-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererEllipsis</span>{{<span class="fu">\it</span> SHAZAM}!}</span>
-<span id="cb401-4"><a href="#cb401-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
-<span id="cb401-5"><a href="#cb401-5" aria-hidden="true" tabindex="-1"></a>The secret word is ...</span>
-<span id="cb401-6"><a href="#cb401-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
-<span id="cb401-7"><a href="#cb401-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
+<div class="sourceCode" id="cb400"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb400-1"><a href="#cb400-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
+<span id="cb400-2"><a href="#cb400-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionTightLists</span>{true}</span>
+<span id="cb400-3"><a href="#cb400-3" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb400-4"><a href="#cb400-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{}</span>
+<span id="cb400-5"><a href="#cb400-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererUlBeginTight</span>{ (}</span>
+<span id="cb400-6"><a href="#cb400-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererUlItem</span>{<span class="co">%</span></span>
+<span id="cb400-7"><a href="#cb400-7" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererUlItem</span>{<span class="co">%</span></span>
+<span id="cb400-8"><a href="#cb400-8" aria-hidden="true" tabindex="-1"></a> ,</span>
+<span id="cb400-9"><a href="#cb400-9" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererUlItem</span>{, and }<span class="co">%</span></span>
+<span id="cb400-10"><a href="#cb400-10" aria-hidden="true" tabindex="-1"></a> }<span class="co">%</span></span>
+<span id="cb400-11"><a href="#cb400-11" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb400-12"><a href="#cb400-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererUlItemEnd</span>{}</span>
+<span id="cb400-13"><a href="#cb400-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererUlEndTight</span>{).}</span>
+<span id="cb400-14"><a href="#cb400-14" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb400-15"><a href="#cb400-15" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
+<span id="cb400-16"><a href="#cb400-16" aria-hidden="true" tabindex="-1"></a>This is a tight list</span>
+<span id="cb400-17"><a href="#cb400-17" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb400-18"><a href="#cb400-18" aria-hidden="true" tabindex="-1"></a>- the first item</span>
+<span id="cb400-19"><a href="#cb400-19" aria-hidden="true" tabindex="-1"></a>- the second item</span>
+<span id="cb400-20"><a href="#cb400-20" aria-hidden="true" tabindex="-1"></a>- the third item</span>
+<span id="cb400-21"><a href="#cb400-21" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
+<span id="cb400-22"><a href="#cb400-22" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb400-23"><a href="#cb400-23" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span>
+<span id="cb400-24"><a href="#cb400-24" aria-hidden="true" tabindex="-1"></a> :<span class="fu">\par</span></span>
+<span id="cb400-25"><a href="#cb400-25" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span>
+<span id="cb400-26"><a href="#cb400-26" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb400-27"><a href="#cb400-27" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererUlBegin</span>{}</span>
+<span id="cb400-28"><a href="#cb400-28" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererUlItem</span>{--<span class="fu">\kern</span> 0.5em}</span>
+<span id="cb400-29"><a href="#cb400-29" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererUlItemEnd</span>{.<span class="fu">\par</span>}</span>
+<span id="cb400-30"><a href="#cb400-30" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererUlEnd</span>{}</span>
+<span id="cb400-31"><a href="#cb400-31" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb400-32"><a href="#cb400-32" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
+<span id="cb400-33"><a href="#cb400-33" aria-hidden="true" tabindex="-1"></a>This is a loose list</span>
+<span id="cb400-34"><a href="#cb400-34" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb400-35"><a href="#cb400-35" aria-hidden="true" tabindex="-1"></a>- This is the first item</span>
+<span id="cb400-36"><a href="#cb400-36" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb400-37"><a href="#cb400-37" aria-hidden="true" tabindex="-1"></a>- This is the second item</span>
+<span id="cb400-38"><a href="#cb400-38" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb400-39"><a href="#cb400-39" aria-hidden="true" tabindex="-1"></a>- This is the third item</span>
+<span id="cb400-40"><a href="#cb400-40" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
+<span id="cb400-41"><a href="#cb400-41" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb400-42"><a href="#cb400-42" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb402"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb402-1"><a href="#cb402-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb401"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb401-1"><a href="#cb401-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
-<p>The secret word is <em>SHAZAM</em>!</p>
+<p>This is a tight list (the first item, the second item, and the third
+item).</p>
+<p>This is a loose list:</p>
+<ul>
+<li><p>This is the first item.</p></li>
+<li><p>This is the second item.</p></li>
+<li><p>This is the third item.</p></li>
+</ul>
</blockquote>
-<h5 class="unnumbered" id="latex-example-48"><span
+<h5 class="unnumbered" id="latex-example-50"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb403"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb403-1"><a href="#cb403-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb403-2"><a href="#cb403-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[smartEllipses]{<span class="ex">markdown</span>}</span>
-<span id="cb403-3"><a href="#cb403-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
-<span id="cb403-4"><a href="#cb403-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
-<span id="cb403-5"><a href="#cb403-5" aria-hidden="true" tabindex="-1"></a> ellipsis = <span class="fu">\emph</span>{SHAZAM}!,</span>
-<span id="cb403-6"><a href="#cb403-6" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb403-7"><a href="#cb403-7" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb403-8"><a href="#cb403-8" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb403-9"><a href="#cb403-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb403-10"><a href="#cb403-10" aria-hidden="true" tabindex="-1"></a>The secret word is ...</span>
-<span id="cb403-11"><a href="#cb403-11" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb403-12"><a href="#cb403-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<div class="sourceCode" id="cb402"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb402-1"><a href="#cb402-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb402-2"><a href="#cb402-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[tightLists]{<span class="ex">markdown</span>}</span>
+<span id="cb402-3"><a href="#cb402-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb402-4"><a href="#cb402-4" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb402-5"><a href="#cb402-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span>
+<span id="cb402-6"><a href="#cb402-6" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
+<span id="cb402-7"><a href="#cb402-7" aria-hidden="true" tabindex="-1"></a> interblockSeparator = {},</span>
+<span id="cb402-8"><a href="#cb402-8" aria-hidden="true" tabindex="-1"></a> ulBeginTight = { (},</span>
+<span id="cb402-9"><a href="#cb402-9" aria-hidden="true" tabindex="-1"></a> ulItem = {<span class="co">%</span></span>
+<span id="cb402-10"><a href="#cb402-10" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererUlItem</span>{<span class="co">%</span></span>
+<span id="cb402-11"><a href="#cb402-11" aria-hidden="true" tabindex="-1"></a> ,</span>
+<span id="cb402-12"><a href="#cb402-12" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererUlItem</span>{, and }<span class="co">%</span></span>
+<span id="cb402-13"><a href="#cb402-13" aria-hidden="true" tabindex="-1"></a> }<span class="co">%</span></span>
+<span id="cb402-14"><a href="#cb402-14" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb402-15"><a href="#cb402-15" aria-hidden="true" tabindex="-1"></a> ulItemEnd = {},</span>
+<span id="cb402-16"><a href="#cb402-16" aria-hidden="true" tabindex="-1"></a> ulEndTight = {).},</span>
+<span id="cb402-17"><a href="#cb402-17" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb402-18"><a href="#cb402-18" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb402-19"><a href="#cb402-19" aria-hidden="true" tabindex="-1"></a>This is a tight list</span>
+<span id="cb402-20"><a href="#cb402-20" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb402-21"><a href="#cb402-21" aria-hidden="true" tabindex="-1"></a>- the first item</span>
+<span id="cb402-22"><a href="#cb402-22" aria-hidden="true" tabindex="-1"></a>- the second item</span>
+<span id="cb402-23"><a href="#cb402-23" aria-hidden="true" tabindex="-1"></a>- the third item</span>
+<span id="cb402-24"><a href="#cb402-24" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span>
+<span id="cb402-25"><a href="#cb402-25" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb402-26"><a href="#cb402-26" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span>
+<span id="cb402-27"><a href="#cb402-27" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
+<span id="cb402-28"><a href="#cb402-28" aria-hidden="true" tabindex="-1"></a> interblockSeparator = {<span class="co">%</span></span>
+<span id="cb402-29"><a href="#cb402-29" aria-hidden="true" tabindex="-1"></a> :<span class="fu">\par</span></span>
+<span id="cb402-30"><a href="#cb402-30" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span>
+<span id="cb402-31"><a href="#cb402-31" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb402-32"><a href="#cb402-32" aria-hidden="true" tabindex="-1"></a> ulBeginTight = {<span class="kw">\begin</span>{<span class="ex">itemize</span>}},</span>
+<span id="cb402-33"><a href="#cb402-33" aria-hidden="true" tabindex="-1"></a> ulItem = {<span class="fu">\item</span>},</span>
+<span id="cb402-34"><a href="#cb402-34" aria-hidden="true" tabindex="-1"></a> ulItemEnd = {.},</span>
+<span id="cb402-35"><a href="#cb402-35" aria-hidden="true" tabindex="-1"></a> ulEnd = {<span class="kw">\end</span>{<span class="ex">itemize</span>}},</span>
+<span id="cb402-36"><a href="#cb402-36" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb402-37"><a href="#cb402-37" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb402-38"><a href="#cb402-38" aria-hidden="true" tabindex="-1"></a>This is a loose list</span>
+<span id="cb402-39"><a href="#cb402-39" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb402-40"><a href="#cb402-40" aria-hidden="true" tabindex="-1"></a>- This is the first item</span>
+<span id="cb402-41"><a href="#cb402-41" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb402-42"><a href="#cb402-42" aria-hidden="true" tabindex="-1"></a>- This is the second item</span>
+<span id="cb402-43"><a href="#cb402-43" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb402-44"><a href="#cb402-44" aria-hidden="true" tabindex="-1"></a>- This is the third item</span>
+<span id="cb402-45"><a href="#cb402-45" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span>
+<span id="cb402-46"><a href="#cb402-46" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb402-47"><a href="#cb402-47" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb404"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb404-1"><a href="#cb404-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb403"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb403-1"><a href="#cb403-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
-<p>The secret word is <em>SHAZAM</em>!</p>
+<p>This is a tight list (the first item, the second item, and the third
+item).</p>
+<p>This is a loose list:</p>
+<ul>
+<li><p>This is the first item.</p></li>
+<li><p>This is the second item.</p></li>
+<li><p>This is the third item.</p></li>
+</ul>
</blockquote>
-<h5 class="unnumbered" id="context-example-35">Con<span
+<h5 class="unnumbered" id="context-example-33">Con<span
class="tex">T<sub>e</sub>X</span>t Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb405"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb405-1"><a href="#cb405-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
-<span id="cb405-2"><a href="#cb405-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[smartEllipses = yes]</span>
-<span id="cb405-3"><a href="#cb405-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererEllipsis</span>{<span class="fu">\emph</span>{SHAZAM}!}</span>
-<span id="cb405-4"><a href="#cb405-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
-<span id="cb405-5"><a href="#cb405-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb405-6"><a href="#cb405-6" aria-hidden="true" tabindex="-1"></a>The secret word is ...</span>
-<span id="cb405-7"><a href="#cb405-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb405-8"><a href="#cb405-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
+<div class="sourceCode" id="cb404"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb404-1"><a href="#cb404-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
+<span id="cb404-2"><a href="#cb404-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[tightLists = yes]</span>
+<span id="cb404-3"><a href="#cb404-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
+<span id="cb404-4"><a href="#cb404-4" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb404-5"><a href="#cb404-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{}</span>
+<span id="cb404-6"><a href="#cb404-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererUlBeginTight</span>{ (}</span>
+<span id="cb404-7"><a href="#cb404-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererUlItem</span>{<span class="co">%</span></span>
+<span id="cb404-8"><a href="#cb404-8" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererUlItem</span>{<span class="co">%</span></span>
+<span id="cb404-9"><a href="#cb404-9" aria-hidden="true" tabindex="-1"></a> ,</span>
+<span id="cb404-10"><a href="#cb404-10" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererUlItem</span>{, and }<span class="co">%</span></span>
+<span id="cb404-11"><a href="#cb404-11" aria-hidden="true" tabindex="-1"></a> }<span class="co">%</span></span>
+<span id="cb404-12"><a href="#cb404-12" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb404-13"><a href="#cb404-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererUlItemEnd</span>{}</span>
+<span id="cb404-14"><a href="#cb404-14" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererUlEndTight</span>{).}</span>
+<span id="cb404-15"><a href="#cb404-15" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb404-16"><a href="#cb404-16" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb404-17"><a href="#cb404-17" aria-hidden="true" tabindex="-1"></a>This is a tight list</span>
+<span id="cb404-18"><a href="#cb404-18" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb404-19"><a href="#cb404-19" aria-hidden="true" tabindex="-1"></a>- the first item</span>
+<span id="cb404-20"><a href="#cb404-20" aria-hidden="true" tabindex="-1"></a>- the second item</span>
+<span id="cb404-21"><a href="#cb404-21" aria-hidden="true" tabindex="-1"></a>- the third item</span>
+<span id="cb404-22"><a href="#cb404-22" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb404-23"><a href="#cb404-23" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb404-24"><a href="#cb404-24" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span>
+<span id="cb404-25"><a href="#cb404-25" aria-hidden="true" tabindex="-1"></a> :<span class="fu">\par</span></span>
+<span id="cb404-26"><a href="#cb404-26" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span>
+<span id="cb404-27"><a href="#cb404-27" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb404-28"><a href="#cb404-28" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererUlBegin</span>{<span class="fu">\startitemize</span>}</span>
+<span id="cb404-29"><a href="#cb404-29" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererUlItem</span>{<span class="fu">\item</span>}</span>
+<span id="cb404-30"><a href="#cb404-30" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererUlItemEnd</span>{.}</span>
+<span id="cb404-31"><a href="#cb404-31" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererUlEnd</span>{<span class="fu">\stopitemize</span>}</span>
+<span id="cb404-32"><a href="#cb404-32" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb404-33"><a href="#cb404-33" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb404-34"><a href="#cb404-34" aria-hidden="true" tabindex="-1"></a>This is a loose list</span>
+<span id="cb404-35"><a href="#cb404-35" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb404-36"><a href="#cb404-36" aria-hidden="true" tabindex="-1"></a>- This is the first item</span>
+<span id="cb404-37"><a href="#cb404-37" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb404-38"><a href="#cb404-38" aria-hidden="true" tabindex="-1"></a>- This is the second item</span>
+<span id="cb404-39"><a href="#cb404-39" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb404-40"><a href="#cb404-40" aria-hidden="true" tabindex="-1"></a>- This is the third item</span>
+<span id="cb404-41"><a href="#cb404-41" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb404-42"><a href="#cb404-42" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb404-43"><a href="#cb404-43" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb406"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb406-1"><a href="#cb406-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb405"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb405-1"><a href="#cb405-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
-<p>Hello <em>world</em>!</p>
-<p><em>(The end of a block)</em></p>
-<p><em>Foo</em> bar!</p>
+<p>This is a tight list (the first item, the second item, and the third
+item).</p>
+<p>This is a loose list:</p>
+<ul>
+<li><p>This is the first item.</p></li>
+<li><p>This is the second item.</p></li>
+<li><p>This is the third item.</p></li>
+</ul>
</blockquote>
-<h4 data-number="2.3.1.6" id="non-breaking-space-renderer"><span
-class="header-section-number">2.3.1.6</span> Non-Breaking Space
-Renderer</h4>
-<p>The <code>\markdownRendererNbsp</code> macro represents a
-non-breaking space.</p>
-<h5 class="unnumbered" id="latex-example-49"><span
+<h4 data-number="2.3.1.5" id="code-block-renderers"><span
+class="header-section-number">2.3.1.5</span> Code Block Renderers</h4>
+<p>The <code>\markdownRendererInputVerbatim</code> macro represents a
+code block. The macro receives a single argument that corresponds to the
+filename of a file contaning the code block contents.</p>
+<p>The <code>\markdownRendererInputFencedCode</code> macro represents a
+fenced code block. This macro will only be produced, when the
+<strong><code>fencedCode</code></strong> option is enabled. The macro
+receives two arguments that correspond to the filename of a file
+contaning the code block contents and to the code fence infostring.</p>
+<h5 class="unnumbered" id="latex-example-51"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
-<code>document.bib</code> with the following content:</p>
-<div class="sourceCode" id="cb407"><pre
-class="sourceCode bib"><code class="sourceCode bibtex"><span id="cb407-1"><a href="#cb407-1" aria-hidden="true" tabindex="-1"></a><span class="va">@book</span>{<span class="ot">knuth:tex</span>,</span>
-<span id="cb407-2"><a href="#cb407-2" aria-hidden="true" tabindex="-1"></a> <span class="dt">author</span> = &quot;<span class="st">Knuth, Donald Ervin</span>&quot;,</span>
-<span id="cb407-3"><a href="#cb407-3" aria-hidden="true" tabindex="-1"></a> <span class="dt">title</span> = &quot;<span class="st">The </span><span class="ch">\TeX</span><span class="st"> book, volume A of Computers and typesetting</span>&quot;,</span>
-<span id="cb407-4"><a href="#cb407-4" aria-hidden="true" tabindex="-1"></a> <span class="dt">publisher</span> = &quot;<span class="st">Addison-Wesley</span>&quot;,</span>
-<span id="cb407-5"><a href="#cb407-5" aria-hidden="true" tabindex="-1"></a> <span class="dt">year</span> = &quot;<span class="st">1984</span>&quot;</span>
-<span id="cb407-6"><a href="#cb407-6" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div>
-<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb408"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb408-1"><a href="#cb408-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb408-2"><a href="#cb408-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[</span>
-<span id="cb408-3"><a href="#cb408-3" aria-hidden="true" tabindex="-1"></a> citations,</span>
-<span id="cb408-4"><a href="#cb408-4" aria-hidden="true" tabindex="-1"></a> citationNbsps,</span>
-<span id="cb408-5"><a href="#cb408-5" aria-hidden="true" tabindex="-1"></a>]{<span class="ex">markdown</span>}</span>
-<span id="cb408-6"><a href="#cb408-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
-<span id="cb408-7"><a href="#cb408-7" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
-<span id="cb408-8"><a href="#cb408-8" aria-hidden="true" tabindex="-1"></a> nbsp = {<span class="ss">$</span><span class="sc">\cdot</span><span class="ss">$</span>},</span>
-<span id="cb408-9"><a href="#cb408-9" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb408-10"><a href="#cb408-10" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb408-11"><a href="#cb408-11" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb408-12"><a href="#cb408-12" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb408-13"><a href="#cb408-13" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb408-14"><a href="#cb408-14" aria-hidden="true" tabindex="-1"></a>The TeXbook [@knuth:tex, p. 123 and 130] is good.</span>
-<span id="cb408-15"><a href="#cb408-15" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb408-16"><a href="#cb408-16" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb408-17"><a href="#cb408-17" aria-hidden="true" tabindex="-1"></a><span class="bu">\bibliographystyle</span>{<span class="ex">plain</span>}</span>
-<span id="cb408-18"><a href="#cb408-18" aria-hidden="true" tabindex="-1"></a><span class="bu">\bibliography</span>{<span class="ex">document.bib</span>}</span>
-<span id="cb408-19"><a href="#cb408-19" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb408-20"><a href="#cb408-20" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
-<p>Next, invoke LuaTeX and BibTeX from the terminal:</p>
-<div class="sourceCode" id="cb409"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb409-1"><a href="#cb409-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span>
-<span id="cb409-2"><a href="#cb409-2" aria-hidden="true" tabindex="-1"></a><span class="ex">bibtex</span> document.aux</span>
-<span id="cb409-3"><a href="#cb409-3" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span>
-<span id="cb409-4"><a href="#cb409-4" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb406"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb406-1"><a href="#cb406-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb406-2"><a href="#cb406-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">verbatim</span>}</span>
+<span id="cb406-3"><a href="#cb406-3" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[hyphens]{<span class="ex">url</span>}</span>
+<span id="cb406-4"><a href="#cb406-4" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[fencedCode]{<span class="ex">markdown</span>}</span>
+<span id="cb406-5"><a href="#cb406-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
+<span id="cb406-6"><a href="#cb406-6" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
+<span id="cb406-7"><a href="#cb406-7" aria-hidden="true" tabindex="-1"></a> interblockSeparator = {</span>
+<span id="cb406-8"><a href="#cb406-8" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span>
+<span id="cb406-9"><a href="#cb406-9" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
+<span id="cb406-10"><a href="#cb406-10" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span>
+<span id="cb406-11"><a href="#cb406-11" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span>
+<span id="cb406-12"><a href="#cb406-12" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
+<span id="cb406-13"><a href="#cb406-13" aria-hidden="true" tabindex="-1"></a> }<span class="co">%</span></span>
+<span id="cb406-14"><a href="#cb406-14" aria-hidden="true" tabindex="-1"></a> }<span class="co">%</span></span>
+<span id="cb406-15"><a href="#cb406-15" aria-hidden="true" tabindex="-1"></a> }<span class="co">%</span></span>
+<span id="cb406-16"><a href="#cb406-16" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb406-17"><a href="#cb406-17" aria-hidden="true" tabindex="-1"></a> inputVerbatim = {</span>
+<span id="cb406-18"><a href="#cb406-18" aria-hidden="true" tabindex="-1"></a> is contained in file <span class="fu">\url</span>{#1}:<span class="co">%</span></span>
+<span id="cb406-19"><a href="#cb406-19" aria-hidden="true" tabindex="-1"></a> <span class="fu">\verbatiminput</span>{#1}<span class="co">%</span></span>
+<span id="cb406-20"><a href="#cb406-20" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb406-21"><a href="#cb406-21" aria-hidden="true" tabindex="-1"></a> inputFencedCode = {</span>
+<span id="cb406-22"><a href="#cb406-22" aria-hidden="true" tabindex="-1"></a> in #2 <span class="fu">\markdownRendererInputVerbatim</span>{#1}<span class="co">%</span></span>
+<span id="cb406-23"><a href="#cb406-23" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb406-24"><a href="#cb406-24" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb406-25"><a href="#cb406-25" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb406-26"><a href="#cb406-26" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb406-27"><a href="#cb406-27" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb406-28"><a href="#cb406-28" aria-hidden="true" tabindex="-1"></a>The following code</span>
+<span id="cb406-29"><a href="#cb406-29" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb406-30"><a href="#cb406-30" aria-hidden="true" tabindex="-1"></a> def foo(bar):</span>
+<span id="cb406-31"><a href="#cb406-31" aria-hidden="true" tabindex="-1"></a> if len(bar) &lt;= 1:</span>
+<span id="cb406-32"><a href="#cb406-32" aria-hidden="true" tabindex="-1"></a> return bar[0]</span>
+<span id="cb406-33"><a href="#cb406-33" aria-hidden="true" tabindex="-1"></a> elif len(bar) == 2:</span>
+<span id="cb406-34"><a href="#cb406-34" aria-hidden="true" tabindex="-1"></a> return sorted(bar)</span>
+<span id="cb406-35"><a href="#cb406-35" aria-hidden="true" tabindex="-1"></a> else:</span>
+<span id="cb406-36"><a href="#cb406-36" aria-hidden="true" tabindex="-1"></a> baz = len(bar) // 2</span>
+<span id="cb406-37"><a href="#cb406-37" aria-hidden="true" tabindex="-1"></a> return foo(bar[baz:], bar[:baz])</span>
+<span id="cb406-38"><a href="#cb406-38" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb406-39"><a href="#cb406-39" aria-hidden="true" tabindex="-1"></a>The following code</span>
+<span id="cb406-40"><a href="#cb406-40" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb406-41"><a href="#cb406-41" aria-hidden="true" tabindex="-1"></a>~~~ Python</span>
+<span id="cb406-42"><a href="#cb406-42" aria-hidden="true" tabindex="-1"></a>&gt;&gt;&gt; foo([4, 2, 1, 3])</span>
+<span id="cb406-43"><a href="#cb406-43" aria-hidden="true" tabindex="-1"></a>[1, 2, 3, 4]</span>
+<span id="cb406-44"><a href="#cb406-44" aria-hidden="true" tabindex="-1"></a>~~~~~~~~~~</span>
+<span id="cb406-45"><a href="#cb406-45" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb406-46"><a href="#cb406-46" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<p>Next, invoke LuaTeX from the terminal:</p>
+<div class="sourceCode" id="cb407"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb407-1"><a href="#cb407-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
-contain the following text:</p>
+contain the following text except for the filename, which may
+differ:</p>
<blockquote>
-<p>The TeXbook [1, p.·123·and·130] is good.</p>
-<h3 id="references-2">References</h3>
-<p><a
-href="https://datatracker.ietf.org/doc/html/rfc3986#section-4.2">1</a>
-Donald Ervin Knuth. <em>The TeXbook, volume A of Computers and
-typesetting.</em> Addison-Wesley, 1984.</p>
+<p>The following code is contained in file
+<code>./_markdown_document/882453149edcf288976647f6fe147ada.verbatim</code>:</p>
+<div class="sourceCode" id="cb408"><pre
+class="sourceCode py"><code class="sourceCode python"><span id="cb408-1"><a href="#cb408-1" aria-hidden="true" tabindex="-1"></a><span class="kw">def</span> foo(bar):</span>
+<span id="cb408-2"><a href="#cb408-2" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> <span class="bu">len</span>(bar) <span class="op">&lt;=</span> <span class="dv">1</span>:</span>
+<span id="cb408-3"><a href="#cb408-3" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> bar[:<span class="dv">1</span>]</span>
+<span id="cb408-4"><a href="#cb408-4" aria-hidden="true" tabindex="-1"></a> <span class="cf">elif</span> <span class="bu">len</span>(bar) <span class="op">==</span> <span class="dv">2</span>:</span>
+<span id="cb408-5"><a href="#cb408-5" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> <span class="bu">sorted</span>(bar)</span>
+<span id="cb408-6"><a href="#cb408-6" aria-hidden="true" tabindex="-1"></a> <span class="cf">else</span>:</span>
+<span id="cb408-7"><a href="#cb408-7" aria-hidden="true" tabindex="-1"></a> baz <span class="op">=</span> bar[<span class="bu">len</span>(bar) <span class="op">//</span> <span class="dv">2</span>]</span>
+<span id="cb408-8"><a href="#cb408-8" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> (</span>
+<span id="cb408-9"><a href="#cb408-9" aria-hidden="true" tabindex="-1"></a> foo([qux <span class="cf">for</span> qux <span class="kw">in</span> bar <span class="cf">if</span> qux <span class="op">&lt;</span> baz]) <span class="op">+</span> [baz] <span class="op">+</span></span>
+<span id="cb408-10"><a href="#cb408-10" aria-hidden="true" tabindex="-1"></a> foo([qux <span class="cf">for</span> qux <span class="kw">in</span> bar <span class="cf">if</span> qux <span class="op">&gt;</span> baz])</span>
+<span id="cb408-11"><a href="#cb408-11" aria-hidden="true" tabindex="-1"></a> )</span></code></pre></div>
+<p>The following code in Python contained in file
+<code>./_markdown_document/cf2a96e2120cef5b1fae5fea36fcc27b.verbatim</code>:</p>
+<div class="sourceCode" id="cb409"><pre
+class="sourceCode py"><code class="sourceCode python"><span id="cb409-1"><a href="#cb409-1" aria-hidden="true" tabindex="-1"></a><span class="op">&gt;&gt;&gt;</span> foo([<span class="dv">4</span>, <span class="dv">2</span>, <span class="dv">1</span>, <span class="dv">3</span>])</span>
+<span id="cb409-2"><a href="#cb409-2" aria-hidden="true" tabindex="-1"></a>[<span class="dv">1</span>, <span class="dv">2</span>, <span class="dv">3</span>, <span class="dv">4</span>]</span></code></pre></div>
</blockquote>
-<h4 data-number="2.3.1.7" id="special-character-renderers"><span
-class="header-section-number">2.3.1.7</span> Special Character
-Renderers</h4>
-<p>The following macros replace any special plain <span
-class="tex">T<sub>e</sub>X</span> characters, including the active pipe
-character (<code>|</code>) of Con<span
-class="tex">T<sub>e</sub>X</span>t, in the input text:</p>
-<ul>
-<li><code>\markdownRendererAmpersand</code> replaces the ampersand
-(<code>&amp;</code>).</li>
-<li><code>\markdownRendererBackslash</code> replaces the backslash
-(<code>\</code>).</li>
-<li><code>\markdownRendererCircumflex</code> replaces the circumflex
-(<code>^</code>).</li>
-<li><code>\markdownRendererDollarSign</code> replaces the dollar sign
-(<code>$</code>).</li>
-<li><code>\markdownRendererHash</code> replaces the hash sign
-(<code>#</code>).</li>
-<li><code>\markdownRendererLeftBrace</code> replaces the left brace
-(<code>{</code>).</li>
-<li><code>\markdownRendererPercentSign</code> replaces the percent sign
-(<code>%</code>).</li>
-<li><code>\markdownRendererPipe</code> replaces the pipe character
-(<code>|</code>).</li>
-<li><code>\markdownRendererRightBrace</code> replaces the right brace
-(<code>}</code>).</li>
-<li><code>\markdownRendererTilde</code> replaces the tilde
-(<code>~</code>).</li>
-<li><code>\markdownRendererUnderscore</code> replaces the underscore
-(<code>_</code>).</li>
-</ul>
-<h5 class="unnumbered" id="plain-tex-example-21">Plain <span
+<h4 data-number="2.3.1.6" id="code-span-renderer"><span
+class="header-section-number">2.3.1.6</span> Code Span Renderer</h4>
+<p>The <code>\markdownRendererCodeSpan</code> macro represents inline
+code span in the input text. It receives a single argument that
+corresponds to the inline code span.</p>
+<h5 class="unnumbered" id="plain-tex-example-20">Plain <span
class="tex">T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
-<code>document.tex</code> with the following content. We will make the
-tilde behave as if it were written in <span
-class="tex">T<sub>e</sub>X</span>, where it represents a non-breaking
-space.</p>
+<code>document.tex</code> with the following content:</p>
<div class="sourceCode" id="cb410"><pre
class="sourceCode tex"><code class="sourceCode latex"><span id="cb410-1"><a href="#cb410-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
-<span id="cb410-2"><a href="#cb410-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererTilde</span>{~}</span>
-<span id="cb410-3"><a href="#cb410-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
-<span id="cb410-4"><a href="#cb410-4" aria-hidden="true" tabindex="-1"></a>Bartel~Leendert van~der~Waerden</span>
-<span id="cb410-5"><a href="#cb410-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
-<span id="cb410-6"><a href="#cb410-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
+<span id="cb410-2"><a href="#cb410-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span>
+<span id="cb410-3"><a href="#cb410-3" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb410-4"><a href="#cb410-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererCodeSpan</span>#1{#1}</span>
+<span id="cb410-5"><a href="#cb410-5" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb410-6"><a href="#cb410-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
+<span id="cb410-7"><a href="#cb410-7" aria-hidden="true" tabindex="-1"></a>`<span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>`</span>
+<span id="cb410-8"><a href="#cb410-8" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb410-9"><a href="#cb410-9" aria-hidden="true" tabindex="-1"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span></span>
+<span id="cb410-10"><a href="#cb410-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
+<span id="cb410-11"><a href="#cb410-11" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb410-12"><a href="#cb410-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionHybrid</span>{true}</span>
+<span id="cb410-13"><a href="#cb410-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
+<span id="cb410-14"><a href="#cb410-14" aria-hidden="true" tabindex="-1"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span></span>
+<span id="cb410-15"><a href="#cb410-15" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
+<span id="cb410-16"><a href="#cb410-16" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb410-17"><a href="#cb410-17" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
<div class="sourceCode" id="cb411"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb411-1"><a href="#cb411-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
-contain the following text, where the middot (<code>·</code>) denotes a
-non-breaking space:</p>
+contain the following text:</p>
<blockquote>
-<p>Bartel·Leendert van·der·Waerden</p>
+<p>$\sqrt{-1}$ *equals* $i$.</p>
+<p>$\sqrt{-1}$ <em>equals</em> $i$.</p>
+<p>√-̅1̅ <em>equals</em> <span class="math inline"><em>i</em></span>.</p>
</blockquote>
-<h5 class="unnumbered" id="latex-example-50"><span
+<h5 class="unnumbered" id="latex-example-52"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
-<code>document.tex</code> with the following content. We will make the
-tilde behave as if it were written in <span
-class="tex">T<sub>e</sub>X</span>, where it represents a non-breaking
-space.</p>
+<code>document.tex</code> with the following content:</p>
<div class="sourceCode" id="cb412"><pre
class="sourceCode tex"><code class="sourceCode latex"><span id="cb412-1"><a href="#cb412-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb412-2"><a href="#cb412-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span>
+<span id="cb412-2"><a href="#cb412-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[smartEllipses]{<span class="ex">markdown</span>}</span>
<span id="cb412-3"><a href="#cb412-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
<span id="cb412-4"><a href="#cb412-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
-<span id="cb412-5"><a href="#cb412-5" aria-hidden="true" tabindex="-1"></a> tilde = ~,</span>
+<span id="cb412-5"><a href="#cb412-5" aria-hidden="true" tabindex="-1"></a> codeSpan = {#1},</span>
<span id="cb412-6"><a href="#cb412-6" aria-hidden="true" tabindex="-1"></a> },</span>
<span id="cb412-7"><a href="#cb412-7" aria-hidden="true" tabindex="-1"></a>}</span>
<span id="cb412-8"><a href="#cb412-8" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb412-9"><a href="#cb412-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb412-10"><a href="#cb412-10" aria-hidden="true" tabindex="-1"></a>Bartel~Leendert van~der~Waerden</span>
-<span id="cb412-11"><a href="#cb412-11" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb412-12"><a href="#cb412-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<span id="cb412-9"><a href="#cb412-9" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb412-10"><a href="#cb412-10" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb412-11"><a href="#cb412-11" aria-hidden="true" tabindex="-1"></a>`<span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>`</span>
+<span id="cb412-12"><a href="#cb412-12" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb412-13"><a href="#cb412-13" aria-hidden="true" tabindex="-1"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span></span>
+<span id="cb412-14"><a href="#cb412-14" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb412-15"><a href="#cb412-15" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb412-16"><a href="#cb412-16" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{hybrid}</span>
+<span id="cb412-17"><a href="#cb412-17" aria-hidden="true" tabindex="-1"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span></span>
+<span id="cb412-18"><a href="#cb412-18" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span>
+<span id="cb412-19"><a href="#cb412-19" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb412-20"><a href="#cb412-20" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
<div class="sourceCode" id="cb413"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb413-1"><a href="#cb413-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
-contain the following text, where the middot (<code>·</code>) denotes a
-non-breaking space:</p>
-<blockquote>
-<p>Bartel·Leendert van·der·Waerden</p>
-</blockquote>
-<h5 class="unnumbered" id="context-example-36">Con<span
-class="tex">T<sub>e</sub>X</span>t Example</h5>
-<p>Using a text editor, create a text document named
-<code>document.tex</code> with the following content. We will make the
-tilde behave as if it were written in <span
-class="tex">T<sub>e</sub>X</span>, where it represents a non-breaking
-space.</p>
-<div class="sourceCode" id="cb414"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb414-1"><a href="#cb414-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
-<span id="cb414-2"><a href="#cb414-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererTilde</span>{~}</span>
-<span id="cb414-3"><a href="#cb414-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
-<span id="cb414-4"><a href="#cb414-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb414-5"><a href="#cb414-5" aria-hidden="true" tabindex="-1"></a>Bartel~Leendert van~der~Waerden</span>
-<span id="cb414-6"><a href="#cb414-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb414-7"><a href="#cb414-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
-<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb415"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb415-1"><a href="#cb415-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
-<p>A PDF document named <code>document.pdf</code> should be produced and
-contain the following text, where the middot (<code>·</code>) denotes a
-non-breaking space:</p>
-<blockquote>
-<p>Bartel·Leendert van·der·Waerden</p>
-</blockquote>
-<h4 data-number="2.3.1.8" id="code-span-renderer"><span
-class="header-section-number">2.3.1.8</span> Code Span Renderer</h4>
-<p>The <code>\markdownRendererCodeSpan</code> macro represents inline
-code span in the input text. It receives a single argument that
-corresponds to the inline code span.</p>
-<h5 class="unnumbered" id="plain-tex-example-22">Plain <span
-class="tex">T<sub>e</sub>X</span> Example</h5>
-<p>Using a text editor, create a text document named
-<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb416"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb416-1"><a href="#cb416-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
-<span id="cb416-2"><a href="#cb416-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span>
-<span id="cb416-3"><a href="#cb416-3" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb416-4"><a href="#cb416-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererCodeSpan</span>#1{#1}</span>
-<span id="cb416-5"><a href="#cb416-5" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb416-6"><a href="#cb416-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
-<span id="cb416-7"><a href="#cb416-7" aria-hidden="true" tabindex="-1"></a>`<span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>`</span>
-<span id="cb416-8"><a href="#cb416-8" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb416-9"><a href="#cb416-9" aria-hidden="true" tabindex="-1"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span></span>
-<span id="cb416-10"><a href="#cb416-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
-<span id="cb416-11"><a href="#cb416-11" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb416-12"><a href="#cb416-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionHybrid</span>{true}</span>
-<span id="cb416-13"><a href="#cb416-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
-<span id="cb416-14"><a href="#cb416-14" aria-hidden="true" tabindex="-1"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span></span>
-<span id="cb416-15"><a href="#cb416-15" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
-<span id="cb416-16"><a href="#cb416-16" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb416-17"><a href="#cb416-17" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
-<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb417"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb417-1"><a href="#cb417-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
-<p>A PDF document named <code>document.pdf</code> should be produced and
-contain the following text:</p>
-<blockquote>
-<p>$\sqrt{-1}$ *equals* $i$.</p>
-<p>$\sqrt{-1}$ <em>equals</em> $i$.</p>
-<p>√-̅1̅ <em>equals</em> <span class="math inline"><em>i</em></span>.</p>
-</blockquote>
-<h5 class="unnumbered" id="latex-example-51"><span
-class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
-<p>Using a text editor, create a text document named
-<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb418"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb418-1"><a href="#cb418-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb418-2"><a href="#cb418-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[smartEllipses]{<span class="ex">markdown</span>}</span>
-<span id="cb418-3"><a href="#cb418-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
-<span id="cb418-4"><a href="#cb418-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
-<span id="cb418-5"><a href="#cb418-5" aria-hidden="true" tabindex="-1"></a> codeSpan = {#1},</span>
-<span id="cb418-6"><a href="#cb418-6" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb418-7"><a href="#cb418-7" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb418-8"><a href="#cb418-8" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb418-9"><a href="#cb418-9" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb418-10"><a href="#cb418-10" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb418-11"><a href="#cb418-11" aria-hidden="true" tabindex="-1"></a>`<span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>`</span>
-<span id="cb418-12"><a href="#cb418-12" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb418-13"><a href="#cb418-13" aria-hidden="true" tabindex="-1"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span></span>
-<span id="cb418-14"><a href="#cb418-14" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb418-15"><a href="#cb418-15" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb418-16"><a href="#cb418-16" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{hybrid}</span>
-<span id="cb418-17"><a href="#cb418-17" aria-hidden="true" tabindex="-1"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span></span>
-<span id="cb418-18"><a href="#cb418-18" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span>
-<span id="cb418-19"><a href="#cb418-19" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb418-20"><a href="#cb418-20" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
-<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb419"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb419-1"><a href="#cb419-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
-<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
<p>$\sqrt{-1}$ *equals* $i$.</p>
<p>$\sqrt{-1}$ <em>equals</em> $i$.</p>
<p>√-̅1̅ <em>equals</em> <span class="math inline"><em>i</em></span>.</p>
</blockquote>
-<h5 class="unnumbered" id="context-example-37">Con<span
+<h5 class="unnumbered" id="context-example-34">Con<span
class="tex">T<sub>e</sub>X</span>t Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb420"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb420-1"><a href="#cb420-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
-<span id="cb420-2"><a href="#cb420-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererCodeSpan</span>#1{#1}</span>
-<span id="cb420-3"><a href="#cb420-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
-<span id="cb420-4"><a href="#cb420-4" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb420-5"><a href="#cb420-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb420-6"><a href="#cb420-6" aria-hidden="true" tabindex="-1"></a>`<span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>`</span>
-<span id="cb420-7"><a href="#cb420-7" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb420-8"><a href="#cb420-8" aria-hidden="true" tabindex="-1"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span></span>
-<span id="cb420-9"><a href="#cb420-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb420-10"><a href="#cb420-10" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb420-11"><a href="#cb420-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[hybrid = yes]</span>
-<span id="cb420-12"><a href="#cb420-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb420-13"><a href="#cb420-13" aria-hidden="true" tabindex="-1"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span></span>
-<span id="cb420-14"><a href="#cb420-14" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb420-15"><a href="#cb420-15" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb420-16"><a href="#cb420-16" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
+<div class="sourceCode" id="cb414"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb414-1"><a href="#cb414-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
+<span id="cb414-2"><a href="#cb414-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererCodeSpan</span>#1{#1}</span>
+<span id="cb414-3"><a href="#cb414-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
+<span id="cb414-4"><a href="#cb414-4" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb414-5"><a href="#cb414-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb414-6"><a href="#cb414-6" aria-hidden="true" tabindex="-1"></a>`<span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>`</span>
+<span id="cb414-7"><a href="#cb414-7" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb414-8"><a href="#cb414-8" aria-hidden="true" tabindex="-1"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span></span>
+<span id="cb414-9"><a href="#cb414-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb414-10"><a href="#cb414-10" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb414-11"><a href="#cb414-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[hybrid = yes]</span>
+<span id="cb414-12"><a href="#cb414-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb414-13"><a href="#cb414-13" aria-hidden="true" tabindex="-1"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span></span>
+<span id="cb414-14"><a href="#cb414-14" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb414-15"><a href="#cb414-15" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb414-16"><a href="#cb414-16" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb421"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb421-1"><a href="#cb421-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb415"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb415-1"><a href="#cb415-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -7093,161 +7197,8 @@ contain the following text:</p>
<p>$\sqrt{-1}$ <em>equals</em> $i$.</p>
<p>√-̅1̅ <em>equals</em> <span class="math inline"><em>i</em></span>.</p>
</blockquote>
-<h4 data-number="2.3.1.9" id="link-renderer"><span
-class="header-section-number">2.3.1.9</span> Link Renderer</h4>
-<p>The <code>\markdownRendererLink</code> macro represents a hyperlink.
-It receives four arguments: the label, the fully escaped
-<abbr>uri</abbr> that can be directly typeset, the raw <abbr>uri</abbr>
-that can be used outside typesetting, and the title of the link.</p>
-<h5 class="unnumbered" id="plain-tex-example-23">Plain <span
-class="tex">T<sub>e</sub>X</span> Example</h5>
-<p>Using a text editor, create a text document named
-<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb422"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb422-1"><a href="#cb422-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
-<span id="cb422-2"><a href="#cb422-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererLink</span>#1#2#3#4{<span class="co">%</span></span>
-<span id="cb422-3"><a href="#cb422-3" aria-hidden="true" tabindex="-1"></a> #1 {<span class="fu">\tt</span>#2} titled {<span class="fu">\it</span>#4}<span class="co">%</span></span>
-<span id="cb422-4"><a href="#cb422-4" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb422-5"><a href="#cb422-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
-<span id="cb422-6"><a href="#cb422-6" aria-hidden="true" tabindex="-1"></a>Please visit [the link][ctan].</span>
-<span id="cb422-7"><a href="#cb422-7" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb422-8"><a href="#cb422-8" aria-hidden="true" tabindex="-1"></a> [ctan]: https://ctan.org/</span>
-<span id="cb422-9"><a href="#cb422-9" aria-hidden="true" tabindex="-1"></a> (the Comprehensive TeX Archive Network)</span>
-<span id="cb422-10"><a href="#cb422-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
-<span id="cb422-11"><a href="#cb422-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
-<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb423"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb423-1"><a href="#cb423-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
-<p>A PDF document named <code>document.pdf</code> should be produced and
-contain the following text:</p>
-<blockquote>
-<p>Please visit the link <a href="https://ctan.org/"
-class="uri">https://ctan.org/</a> titled <em>the Comprehensive TeX
-Archive Network</em>.</p>
-</blockquote>
-<h5 class="unnumbered" id="latex-example-52"><span
-class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
-<p>Using a text editor, create a text document named
-<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb424"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb424-1"><a href="#cb424-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb424-2"><a href="#cb424-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span>
-<span id="cb424-3"><a href="#cb424-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
-<span id="cb424-4"><a href="#cb424-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
-<span id="cb424-5"><a href="#cb424-5" aria-hidden="true" tabindex="-1"></a> link = {<span class="co">%</span></span>
-<span id="cb424-6"><a href="#cb424-6" aria-hidden="true" tabindex="-1"></a> #1 <span class="fu">\texttt</span>{#2} titled <span class="fu">\emph</span>{#4}<span class="co">%</span></span>
-<span id="cb424-7"><a href="#cb424-7" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb424-8"><a href="#cb424-8" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb424-9"><a href="#cb424-9" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb424-10"><a href="#cb424-10" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb424-11"><a href="#cb424-11" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb424-12"><a href="#cb424-12" aria-hidden="true" tabindex="-1"></a>Please visit [the link][ctan].</span>
-<span id="cb424-13"><a href="#cb424-13" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb424-14"><a href="#cb424-14" aria-hidden="true" tabindex="-1"></a> [ctan]: https://ctan.org/</span>
-<span id="cb424-15"><a href="#cb424-15" aria-hidden="true" tabindex="-1"></a> (the Comprehensive TeX Archive Network)</span>
-<span id="cb424-16"><a href="#cb424-16" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb424-17"><a href="#cb424-17" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
-<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb425"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb425-1"><a href="#cb425-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
-<p>A PDF document named <code>document.pdf</code> should be produced and
-contain the following text:</p>
-<blockquote>
-<p>Please visit the link <a href="https://ctan.org/"
-class="uri">https://ctan.org/</a> titled <em>the Comprehensive TeX
-Archive Network</em>.</p>
-</blockquote>
-<h5 class="unnumbered" id="context-example-38">Con<span
-class="tex">T<sub>e</sub>X</span>t Example</h5>
-<p>Using a text editor, create a text document named
-<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb426"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb426-1"><a href="#cb426-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
-<span id="cb426-2"><a href="#cb426-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererLink</span>#1#2#3#4{<span class="co">%</span></span>
-<span id="cb426-3"><a href="#cb426-3" aria-hidden="true" tabindex="-1"></a> #1 {<span class="fu">\tt</span>#2} titled <span class="fu">\emph</span>{#4}<span class="co">%</span></span>
-<span id="cb426-4"><a href="#cb426-4" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb426-5"><a href="#cb426-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
-<span id="cb426-6"><a href="#cb426-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb426-7"><a href="#cb426-7" aria-hidden="true" tabindex="-1"></a>Please visit [the link][ctan].</span>
-<span id="cb426-8"><a href="#cb426-8" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb426-9"><a href="#cb426-9" aria-hidden="true" tabindex="-1"></a> [ctan]: https://ctan.org/</span>
-<span id="cb426-10"><a href="#cb426-10" aria-hidden="true" tabindex="-1"></a> (the Comprehensive TeX Archive Network)</span>
-<span id="cb426-11"><a href="#cb426-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb426-12"><a href="#cb426-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
-<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb427"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb427-1"><a href="#cb427-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
-<p>A PDF document named <code>document.pdf</code> should be produced and
-contain the following text:</p>
-<blockquote>
-<p>Please visit the link <a href="https://ctan.org/"
-class="uri">https://ctan.org/</a> titled <em>the Comprehensive TeX
-Archive Network</em>.</p>
-</blockquote>
-<h4 data-number="2.3.1.10" id="image-renderer"><span
-class="header-section-number">2.3.1.10</span> Image Renderer</h4>
-<p>The <code>\markdownRendererImage</code> macro represents an image. It
-receives four arguments: the label, the fully escaped <abbr>uri</abbr>
-that can be directly typeset, the raw <abbr>uri</abbr> that can be used
-outside typesetting, and the title of the link.</p>
-<h5 class="unnumbered" id="latex-example-53"><span
-class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
-<p>Using a text editor, create a text document named
-<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb428"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb428-1"><a href="#cb428-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb428-2"><a href="#cb428-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span>
-<span id="cb428-3"><a href="#cb428-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\begingroup</span></span>
-<span id="cb428-4"><a href="#cb428-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\catcode</span>`<span class="fu">\@</span>=11</span>
-<span id="cb428-5"><a href="#cb428-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\catcode</span>`<span class="fu">\%</span>=12</span>
-<span id="cb428-6"><a href="#cb428-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\catcode</span>`<span class="fu">\^</span>^A=14</span>
-<span id="cb428-7"><a href="#cb428-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\global\def\markdownRendererImage</span>#1#2#3#4{^^A</span>
-<span id="cb428-8"><a href="#cb428-8" aria-hidden="true" tabindex="-1"></a> <span class="fu">\immediate\write</span>18{^^A</span></code></pre></div>
-<div class="sourceCode" id="cb429"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb429-1"><a href="#cb429-1" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> <span class="bu">printf</span> <span class="st">&#39;%s&#39;</span> <span class="st">&quot;#3&quot;</span> <span class="kw">|</span> <span class="fu">grep</span> <span class="at">-q</span> ^http<span class="kw">;</span> <span class="cf">then</span></span>
-<span id="cb429-2"><a href="#cb429-2" aria-hidden="true" tabindex="-1"></a> <span class="va">OUTPUT</span><span class="op">=</span><span class="st">&quot;</span><span class="va">$(</span><span class="bu">printf</span> <span class="st">&#39;%s&#39;</span> <span class="st">&quot;#3&quot;</span> <span class="kw">|</span> <span class="fu">md5sum</span> <span class="kw">|</span> <span class="fu">cut</span> <span class="at">-d</span><span class="st">&#39; &#39;</span> <span class="at">-f1</span><span class="va">)</span><span class="st">.^^A</span></span>
-<span id="cb429-3"><a href="#cb429-3" aria-hidden="true" tabindex="-1"></a><span class="st"> </span><span class="va">$(</span><span class="bu">printf</span> <span class="st">&#39;%s&#39;</span> <span class="st">&quot;#3&quot;</span> <span class="kw">|</span> <span class="fu">sed</span> <span class="st">&#39;s/.*[.]//&#39;</span><span class="va">)</span><span class="st">&quot;</span><span class="kw">;</span></span>
-<span id="cb429-4"><a href="#cb429-4" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> <span class="ot">! </span><span class="bu">[</span> <span class="ot">-e</span> <span class="st">&quot;</span><span class="va">$OUTPUT</span><span class="st">&quot;</span> <span class="bu">]</span><span class="kw">;</span> <span class="cf">then</span></span>
-<span id="cb429-5"><a href="#cb429-5" aria-hidden="true" tabindex="-1"></a> <span class="fu">wget</span> <span class="at">-O</span> <span class="st">&quot;</span><span class="va">$OUTPUT</span><span class="st">&quot;</span> <span class="st">&#39;#3&#39;</span> <span class="kw">||</span> <span class="fu">rm</span> <span class="st">&quot;</span><span class="va">$OUTPUT</span><span class="st">&quot;</span><span class="kw">;</span></span>
-<span id="cb429-6"><a href="#cb429-6" aria-hidden="true" tabindex="-1"></a> <span class="ex">convert</span> <span class="st">&quot;</span><span class="va">$OUTPUT</span><span class="st">&quot;</span> png:<span class="st">&quot;</span><span class="va">$OUTPUT</span><span class="st">&quot;</span><span class="kw">;</span></span>
-<span id="cb429-7"><a href="#cb429-7" aria-hidden="true" tabindex="-1"></a> <span class="cf">fi</span><span class="kw">;</span></span>
-<span id="cb429-8"><a href="#cb429-8" aria-hidden="true" tabindex="-1"></a> <span class="bu">printf</span> <span class="st">&#39;%s%%&#39;</span> <span class="st">&quot;</span><span class="va">$OUTPUT</span><span class="st">&quot;</span> <span class="op">&gt;</span> <span class="dt">\j</span>obname.fetched<span class="kw">;</span></span>
-<span id="cb429-9"><a href="#cb429-9" aria-hidden="true" tabindex="-1"></a> <span class="cf">else</span></span>
-<span id="cb429-10"><a href="#cb429-10" aria-hidden="true" tabindex="-1"></a> <span class="bu">printf</span> <span class="st">&#39;%s%%&#39;</span> <span class="st">&quot;#3&quot;</span> <span class="op">&gt;</span> <span class="dt">\j</span>obname.fetched<span class="kw">;</span></span>
-<span id="cb429-11"><a href="#cb429-11" aria-hidden="true" tabindex="-1"></a> <span class="ex">fi^^A</span></span></code></pre></div>
-<div class="sourceCode" id="cb430"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb430-1"><a href="#cb430-1" aria-hidden="true" tabindex="-1"></a> }^^A</span>
-<span id="cb430-2"><a href="#cb430-2" aria-hidden="true" tabindex="-1"></a> {^^A</span>
-<span id="cb430-3"><a href="#cb430-3" aria-hidden="true" tabindex="-1"></a> <span class="fu">\everyeof</span>={<span class="fu">\noexpand</span>}^^A</span>
-<span id="cb430-4"><a href="#cb430-4" aria-hidden="true" tabindex="-1"></a> <span class="fu">\edef\filename</span>{<span class="fu">\_</span>_markdowninput&quot;<span class="fu">\jobname</span>.fetched&quot; }^^A</span>
-<span id="cb430-5"><a href="#cb430-5" aria-hidden="true" tabindex="-1"></a> <span class="bu">\includegraphics</span>[width=<span class="fu">\textwidth</span>]{<span class="fu">\filename</span>}^^A</span>
-<span id="cb430-6"><a href="#cb430-6" aria-hidden="true" tabindex="-1"></a> }^^A</span>
-<span id="cb430-7"><a href="#cb430-7" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb430-8"><a href="#cb430-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\endgroup</span></span>
-<span id="cb430-9"><a href="#cb430-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb430-10"><a href="#cb430-10" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb430-11"><a href="#cb430-11" aria-hidden="true" tabindex="-1"></a>![TUGboat](https://tug.org/tugboat/noword.jpg)</span>
-<span id="cb430-12"><a href="#cb430-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb430-13"><a href="#cb430-13" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
-<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb431"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb431-1"><a href="#cb431-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> <span class="at">--shell-escape</span> document.tex</span></code></pre></div>
-<p>A PDF document named <code>document.pdf</code> should be produced and
-contain the following content. This assumes that you use a Unix-like
-operating system with Bourne or Bourne again shell as the default shell
-of the current user. It also assumes that the <code>md5sum</code>,
-<code>wget</code>, and <code>convert</code> binaries are installed and
-that the <span class="tex">T<sub>e</sub>X</span> engine has shell
-access.</p>
-<blockquote>
-<figure>
-<img src="https://tug.org/tugboat/noword.jpg"
-title="The Communications of the TeX Users Group" alt="TUGboat" />
-<figcaption aria-hidden="true">TUGboat</figcaption>
-</figure>
-</blockquote>
-<h4 data-number="2.3.1.11" id="texcontentblockrenderers"><span
-class="header-section-number">2.3.1.11</span> Content Block
+<h4 data-number="2.3.1.7" id="texcontentblockrenderers"><span
+class="header-section-number">2.3.1.7</span> Content Block
Renderers</h4>
<p>The <code>\markdownRendererContentBlock</code> macro represents an iA
Writer content block. It receives four arguments: the local file or
@@ -7287,38 +7238,38 @@ highlighting. <a href="https://github.com/iainc/Markdown-Content-Blocks"
title="File transclusion syntax for Markdown">The
<code>Languages.json</code> file provided by Anton Sotkov</a> is a good
starting point.</p>
-<h5 class="unnumbered" id="plain-tex-example-24">Plain <span
+<h5 class="unnumbered" id="plain-tex-example-21">Plain <span
class="tex">T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb432"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb432-1"><a href="#cb432-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
-<span id="cb432-2"><a href="#cb432-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionContentBlocks</span>{true}</span>
-<span id="cb432-3"><a href="#cb432-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererContentBlock</span>#1#2#3#4{<span class="co">%</span></span>
-<span id="cb432-4"><a href="#cb432-4" aria-hidden="true" tabindex="-1"></a> This is {<span class="fu">\tt</span> #2}, #4.</span>
-<span id="cb432-5"><a href="#cb432-5" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb432-6"><a href="#cb432-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererContentBlockOnlineImage</span>#1#2#3#4{<span class="co">%</span></span>
-<span id="cb432-7"><a href="#cb432-7" aria-hidden="true" tabindex="-1"></a> This is the image {<span class="fu">\tt</span> #2}, #4.</span>
-<span id="cb432-8"><a href="#cb432-8" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb432-9"><a href="#cb432-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererContentBlockCode</span>#1#2#3#4#5{<span class="co">%</span></span>
-<span id="cb432-10"><a href="#cb432-10" aria-hidden="true" tabindex="-1"></a> This is the #2 (<span class="fu">\uppercase</span>{#1}) document {<span class="fu">\tt</span> #3}, #5.</span>
-<span id="cb432-11"><a href="#cb432-11" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb432-12"><a href="#cb432-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
-<span id="cb432-13"><a href="#cb432-13" aria-hidden="true" tabindex="-1"></a>/document.tex (the document that we are currently typesetting)</span>
-<span id="cb432-14"><a href="#cb432-14" aria-hidden="true" tabindex="-1"></a>/markdown-languages.json (the mapping between filename extensions</span>
-<span id="cb432-15"><a href="#cb432-15" aria-hidden="true" tabindex="-1"></a> and programming language names)</span>
-<span id="cb432-16"><a href="#cb432-16" aria-hidden="true" tabindex="-1"></a>https://tug.org/tugboat/noword.jpg (the logotype of TUGboat)</span>
-<span id="cb432-17"><a href="#cb432-17" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
-<span id="cb432-18"><a href="#cb432-18" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
+<div class="sourceCode" id="cb416"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb416-1"><a href="#cb416-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
+<span id="cb416-2"><a href="#cb416-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionContentBlocks</span>{true}</span>
+<span id="cb416-3"><a href="#cb416-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererContentBlock</span>#1#2#3#4{<span class="co">%</span></span>
+<span id="cb416-4"><a href="#cb416-4" aria-hidden="true" tabindex="-1"></a> This is {<span class="fu">\tt</span> #2}, #4.</span>
+<span id="cb416-5"><a href="#cb416-5" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb416-6"><a href="#cb416-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererContentBlockOnlineImage</span>#1#2#3#4{<span class="co">%</span></span>
+<span id="cb416-7"><a href="#cb416-7" aria-hidden="true" tabindex="-1"></a> This is the image {<span class="fu">\tt</span> #2}, #4.</span>
+<span id="cb416-8"><a href="#cb416-8" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb416-9"><a href="#cb416-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererContentBlockCode</span>#1#2#3#4#5{<span class="co">%</span></span>
+<span id="cb416-10"><a href="#cb416-10" aria-hidden="true" tabindex="-1"></a> This is the #2 (<span class="fu">\uppercase</span>{#1}) document {<span class="fu">\tt</span> #3}, #5.</span>
+<span id="cb416-11"><a href="#cb416-11" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb416-12"><a href="#cb416-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
+<span id="cb416-13"><a href="#cb416-13" aria-hidden="true" tabindex="-1"></a>/document.tex (the document that we are currently typesetting)</span>
+<span id="cb416-14"><a href="#cb416-14" aria-hidden="true" tabindex="-1"></a>/markdown-languages.json (the mapping between filename extensions</span>
+<span id="cb416-15"><a href="#cb416-15" aria-hidden="true" tabindex="-1"></a> and programming language names)</span>
+<span id="cb416-16"><a href="#cb416-16" aria-hidden="true" tabindex="-1"></a>https://tug.org/tugboat/noword.jpg (the logotype of TUGboat)</span>
+<span id="cb416-17"><a href="#cb416-17" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
+<span id="cb416-18"><a href="#cb416-18" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
<p>Create also a text document named
<code>markdown-languages.json</code> with the following content:</p>
-<div class="sourceCode" id="cb433"><pre
-class="sourceCode js"><code class="sourceCode javascript"><span id="cb433-1"><a href="#cb433-1" aria-hidden="true" tabindex="-1"></a>{</span>
-<span id="cb433-2"><a href="#cb433-2" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;json&quot;</span><span class="op">:</span> <span class="st">&quot;JavaScript Object Notation&quot;</span><span class="op">,</span></span>
-<span id="cb433-3"><a href="#cb433-3" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div>
+<div class="sourceCode" id="cb417"><pre
+class="sourceCode js"><code class="sourceCode javascript"><span id="cb417-1"><a href="#cb417-1" aria-hidden="true" tabindex="-1"></a>{</span>
+<span id="cb417-2"><a href="#cb417-2" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;json&quot;</span><span class="op">:</span> <span class="st">&quot;JavaScript Object Notation&quot;</span><span class="op">,</span></span>
+<span id="cb417-3"><a href="#cb417-3" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb434"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb434-1"><a href="#cb434-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb418"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb418-1"><a href="#cb418-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -7330,38 +7281,38 @@ extensions and programming language names.</p>
<p>This is the image <code>https://tug.org/tugboat/noword.jpg</code>,
the logotype of TUGboat.</p>
</blockquote>
-<h5 class="unnumbered" id="latex-example-54"><span
+<h5 class="unnumbered" id="latex-example-53"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb435"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb435-1"><a href="#cb435-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb435-2"><a href="#cb435-2" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">filecontents</span>}[overwrite,nosearch,noheader]{markdown-languages.json}</span>
-<span id="cb435-3"><a href="#cb435-3" aria-hidden="true" tabindex="-1"></a>{</span>
-<span id="cb435-4"><a href="#cb435-4" aria-hidden="true" tabindex="-1"></a> &quot;json&quot;: &quot;JavaScript Object Notation&quot;,</span>
-<span id="cb435-5"><a href="#cb435-5" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb435-6"><a href="#cb435-6" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">filecontents</span>}</span>
-<span id="cb435-7"><a href="#cb435-7" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[contentBlocks]{<span class="ex">markdown</span>}</span>
-<span id="cb435-8"><a href="#cb435-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
-<span id="cb435-9"><a href="#cb435-9" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
-<span id="cb435-10"><a href="#cb435-10" aria-hidden="true" tabindex="-1"></a> contentBlock = {This is <span class="fu">\texttt</span>{#2}, #4.},</span>
-<span id="cb435-11"><a href="#cb435-11" aria-hidden="true" tabindex="-1"></a> contentBlockOnlineImage = {This is the image <span class="fu">\texttt</span>{#2}, #4.},</span>
-<span id="cb435-12"><a href="#cb435-12" aria-hidden="true" tabindex="-1"></a> contentBlockCode = {<span class="co">%</span></span>
-<span id="cb435-13"><a href="#cb435-13" aria-hidden="true" tabindex="-1"></a> This is the #2 (<span class="fu">\MakeUppercase</span>{#1}) document <span class="fu">\texttt</span>{#3}, #5.</span>
-<span id="cb435-14"><a href="#cb435-14" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb435-15"><a href="#cb435-15" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb435-16"><a href="#cb435-16" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb435-17"><a href="#cb435-17" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb435-18"><a href="#cb435-18" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb435-19"><a href="#cb435-19" aria-hidden="true" tabindex="-1"></a>/document.tex (the document that we are currently typesetting)</span>
-<span id="cb435-20"><a href="#cb435-20" aria-hidden="true" tabindex="-1"></a>/markdown-languages.json (the mapping between filename extensions</span>
-<span id="cb435-21"><a href="#cb435-21" aria-hidden="true" tabindex="-1"></a> and programming language names)</span>
-<span id="cb435-22"><a href="#cb435-22" aria-hidden="true" tabindex="-1"></a>https://tug.org/tugboat/noword.jpg (the logotype of TUGboat)</span>
-<span id="cb435-23"><a href="#cb435-23" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb435-24"><a href="#cb435-24" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<div class="sourceCode" id="cb419"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb419-1"><a href="#cb419-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb419-2"><a href="#cb419-2" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">filecontents</span>}[overwrite,nosearch,noheader]{markdown-languages.json}</span>
+<span id="cb419-3"><a href="#cb419-3" aria-hidden="true" tabindex="-1"></a>{</span>
+<span id="cb419-4"><a href="#cb419-4" aria-hidden="true" tabindex="-1"></a> &quot;json&quot;: &quot;JavaScript Object Notation&quot;,</span>
+<span id="cb419-5"><a href="#cb419-5" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb419-6"><a href="#cb419-6" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">filecontents</span>}</span>
+<span id="cb419-7"><a href="#cb419-7" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[contentBlocks]{<span class="ex">markdown</span>}</span>
+<span id="cb419-8"><a href="#cb419-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
+<span id="cb419-9"><a href="#cb419-9" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
+<span id="cb419-10"><a href="#cb419-10" aria-hidden="true" tabindex="-1"></a> contentBlock = {This is <span class="fu">\texttt</span>{#2}, #4.},</span>
+<span id="cb419-11"><a href="#cb419-11" aria-hidden="true" tabindex="-1"></a> contentBlockOnlineImage = {This is the image <span class="fu">\texttt</span>{#2}, #4.},</span>
+<span id="cb419-12"><a href="#cb419-12" aria-hidden="true" tabindex="-1"></a> contentBlockCode = {<span class="co">%</span></span>
+<span id="cb419-13"><a href="#cb419-13" aria-hidden="true" tabindex="-1"></a> This is the #2 (<span class="fu">\MakeUppercase</span>{#1}) document <span class="fu">\texttt</span>{#3}, #5.</span>
+<span id="cb419-14"><a href="#cb419-14" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb419-15"><a href="#cb419-15" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb419-16"><a href="#cb419-16" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb419-17"><a href="#cb419-17" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb419-18"><a href="#cb419-18" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb419-19"><a href="#cb419-19" aria-hidden="true" tabindex="-1"></a>/document.tex (the document that we are currently typesetting)</span>
+<span id="cb419-20"><a href="#cb419-20" aria-hidden="true" tabindex="-1"></a>/markdown-languages.json (the mapping between filename extensions</span>
+<span id="cb419-21"><a href="#cb419-21" aria-hidden="true" tabindex="-1"></a> and programming language names)</span>
+<span id="cb419-22"><a href="#cb419-22" aria-hidden="true" tabindex="-1"></a>https://tug.org/tugboat/noword.jpg (the logotype of TUGboat)</span>
+<span id="cb419-23"><a href="#cb419-23" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb419-24"><a href="#cb419-24" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb436"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb436-1"><a href="#cb436-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb420"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb420-1"><a href="#cb420-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -7373,39 +7324,39 @@ extensions and programming language names.</p>
<p>This is the image <code>https://tug.org/tugboat/noword.jpg</code>,
the logotype of TUGboat.</p>
</blockquote>
-<h5 class="unnumbered" id="context-example-39">Con<span
+<h5 class="unnumbered" id="context-example-35">Con<span
class="tex">T<sub>e</sub>X</span>t Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb437"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb437-1"><a href="#cb437-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
-<span id="cb437-2"><a href="#cb437-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[contentBlocks = yes]</span>
-<span id="cb437-3"><a href="#cb437-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererContentBlock</span>#1#2#3#4{<span class="co">%</span></span>
-<span id="cb437-4"><a href="#cb437-4" aria-hidden="true" tabindex="-1"></a> This is {<span class="fu">\tt</span> #2}, #4.</span>
-<span id="cb437-5"><a href="#cb437-5" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb437-6"><a href="#cb437-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererContentBlockOnlineImage</span>#1#2#3#4{<span class="co">%</span></span>
-<span id="cb437-7"><a href="#cb437-7" aria-hidden="true" tabindex="-1"></a> This is the image {<span class="fu">\tt</span> #2}, #4.</span>
-<span id="cb437-8"><a href="#cb437-8" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb437-9"><a href="#cb437-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererContentBlockCode</span>#1#2#3#4#5{<span class="co">%</span></span>
-<span id="cb437-10"><a href="#cb437-10" aria-hidden="true" tabindex="-1"></a> This is the #2 (<span class="fu">\uppercase</span>{#1}) document {<span class="fu">\tt</span> #3}, #5.</span>
-<span id="cb437-11"><a href="#cb437-11" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb437-12"><a href="#cb437-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
-<span id="cb437-13"><a href="#cb437-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb437-14"><a href="#cb437-14" aria-hidden="true" tabindex="-1"></a>/document.tex (the document that we are currently typesetting)</span>
-<span id="cb437-15"><a href="#cb437-15" aria-hidden="true" tabindex="-1"></a>/markdown-languages.json (the mapping between filename extensions</span>
-<span id="cb437-16"><a href="#cb437-16" aria-hidden="true" tabindex="-1"></a> and programming language names)</span>
-<span id="cb437-17"><a href="#cb437-17" aria-hidden="true" tabindex="-1"></a>https://tug.org/tugboat/noword.jpg (the logotype of TUGboat)</span>
-<span id="cb437-18"><a href="#cb437-18" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb437-19"><a href="#cb437-19" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
+<div class="sourceCode" id="cb421"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb421-1"><a href="#cb421-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
+<span id="cb421-2"><a href="#cb421-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[contentBlocks = yes]</span>
+<span id="cb421-3"><a href="#cb421-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererContentBlock</span>#1#2#3#4{<span class="co">%</span></span>
+<span id="cb421-4"><a href="#cb421-4" aria-hidden="true" tabindex="-1"></a> This is {<span class="fu">\tt</span> #2}, #4.</span>
+<span id="cb421-5"><a href="#cb421-5" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb421-6"><a href="#cb421-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererContentBlockOnlineImage</span>#1#2#3#4{<span class="co">%</span></span>
+<span id="cb421-7"><a href="#cb421-7" aria-hidden="true" tabindex="-1"></a> This is the image {<span class="fu">\tt</span> #2}, #4.</span>
+<span id="cb421-8"><a href="#cb421-8" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb421-9"><a href="#cb421-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererContentBlockCode</span>#1#2#3#4#5{<span class="co">%</span></span>
+<span id="cb421-10"><a href="#cb421-10" aria-hidden="true" tabindex="-1"></a> This is the #2 (<span class="fu">\uppercase</span>{#1}) document {<span class="fu">\tt</span> #3}, #5.</span>
+<span id="cb421-11"><a href="#cb421-11" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb421-12"><a href="#cb421-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
+<span id="cb421-13"><a href="#cb421-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb421-14"><a href="#cb421-14" aria-hidden="true" tabindex="-1"></a>/document.tex (the document that we are currently typesetting)</span>
+<span id="cb421-15"><a href="#cb421-15" aria-hidden="true" tabindex="-1"></a>/markdown-languages.json (the mapping between filename extensions</span>
+<span id="cb421-16"><a href="#cb421-16" aria-hidden="true" tabindex="-1"></a> and programming language names)</span>
+<span id="cb421-17"><a href="#cb421-17" aria-hidden="true" tabindex="-1"></a>https://tug.org/tugboat/noword.jpg (the logotype of TUGboat)</span>
+<span id="cb421-18"><a href="#cb421-18" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb421-19"><a href="#cb421-19" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
<p>Create also a text document named
<code>markdown-languages.json</code> with the following content:</p>
-<div class="sourceCode" id="cb438"><pre
-class="sourceCode js"><code class="sourceCode javascript"><span id="cb438-1"><a href="#cb438-1" aria-hidden="true" tabindex="-1"></a>{</span>
-<span id="cb438-2"><a href="#cb438-2" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;json&quot;</span><span class="op">:</span> <span class="st">&quot;JavaScript Object Notation&quot;</span><span class="op">,</span></span>
-<span id="cb438-3"><a href="#cb438-3" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div>
+<div class="sourceCode" id="cb422"><pre
+class="sourceCode js"><code class="sourceCode javascript"><span id="cb422-1"><a href="#cb422-1" aria-hidden="true" tabindex="-1"></a>{</span>
+<span id="cb422-2"><a href="#cb422-2" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;json&quot;</span><span class="op">:</span> <span class="st">&quot;JavaScript Object Notation&quot;</span><span class="op">,</span></span>
+<span id="cb422-3"><a href="#cb422-3" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb439"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb439-1"><a href="#cb439-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb423"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb423-1"><a href="#cb423-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -7417,555 +7368,8 @@ extensions and programming language names.</p>
<p>This is the image <code>https://tug.org/tugboat/noword.jpg</code>,
the logotype of TUGboat.</p>
</blockquote>
-<h4 data-number="2.3.1.12" id="bullet-list-renderers"><span
-class="header-section-number">2.3.1.12</span> Bullet List Renderers</h4>
-<p>The <code>\markdownRendererUlBegin</code> macro represents the
-beginning of a bulleted list that contains an item with several
-paragraphs of text (the list is not tight). The macro receives no
-arguments.</p>
-<p>The <code>\markdownRendererUlBeginTight</code> macro represents the
-beginning of a bulleted list that contains no item with several
-paragraphs of text (the list is tight). This macro will only be
-produced, when the <strong><code>tightLists</code></strong> option is
-disabled. The macro receives no arguments.</p>
-<p>The <code>\markdownRendererUlItem</code> macro represents an item in
-a bulleted list. The macro receives no arguments.</p>
-<p>The <code>\markdownRendererUlItemEnd</code> macro represents the end
-of an item in a bulleted list. The macro receives no arguments.</p>
-<p>The <code>\markdownRendererUlEnd</code> macro represents the end of a
-bulleted list that contains an item with several paragraphs of text (the
-list is not tight). The macro receives no arguments.</p>
-<p>The <code>\markdownRendererUlEndTight</code> macro represents the end
-of a bulleted list that contains no item with several paragraphs of text
-(the list is tight). This macro will only be produced, when the
-<strong><code>tightLists</code></strong> option is disabled. The macro
-receives no arguments.</p>
-<h5 class="unnumbered" id="plain-tex-example-25">Plain <span
-class="tex">T<sub>e</sub>X</span> Example</h5>
-<p>Using a text editor, create a text document named
-<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb440"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb440-1"><a href="#cb440-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
-<span id="cb440-2"><a href="#cb440-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionTightLists</span>{true}</span>
-<span id="cb440-3"><a href="#cb440-3" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb440-4"><a href="#cb440-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{}</span>
-<span id="cb440-5"><a href="#cb440-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererUlBeginTight</span>{ (}</span>
-<span id="cb440-6"><a href="#cb440-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererUlItem</span>{<span class="co">%</span></span>
-<span id="cb440-7"><a href="#cb440-7" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererUlItem</span>{<span class="co">%</span></span>
-<span id="cb440-8"><a href="#cb440-8" aria-hidden="true" tabindex="-1"></a> ,</span>
-<span id="cb440-9"><a href="#cb440-9" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererUlItem</span>{, and }<span class="co">%</span></span>
-<span id="cb440-10"><a href="#cb440-10" aria-hidden="true" tabindex="-1"></a> }<span class="co">%</span></span>
-<span id="cb440-11"><a href="#cb440-11" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb440-12"><a href="#cb440-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererUlItemEnd</span>{}</span>
-<span id="cb440-13"><a href="#cb440-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererUlEndTight</span>{).}</span>
-<span id="cb440-14"><a href="#cb440-14" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb440-15"><a href="#cb440-15" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
-<span id="cb440-16"><a href="#cb440-16" aria-hidden="true" tabindex="-1"></a>This is a tight list</span>
-<span id="cb440-17"><a href="#cb440-17" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb440-18"><a href="#cb440-18" aria-hidden="true" tabindex="-1"></a>- the first item</span>
-<span id="cb440-19"><a href="#cb440-19" aria-hidden="true" tabindex="-1"></a>- the second item</span>
-<span id="cb440-20"><a href="#cb440-20" aria-hidden="true" tabindex="-1"></a>- the third item</span>
-<span id="cb440-21"><a href="#cb440-21" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
-<span id="cb440-22"><a href="#cb440-22" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb440-23"><a href="#cb440-23" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span>
-<span id="cb440-24"><a href="#cb440-24" aria-hidden="true" tabindex="-1"></a> :<span class="fu">\par</span></span>
-<span id="cb440-25"><a href="#cb440-25" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span>
-<span id="cb440-26"><a href="#cb440-26" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb440-27"><a href="#cb440-27" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererUlBegin</span>{}</span>
-<span id="cb440-28"><a href="#cb440-28" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererUlItem</span>{--<span class="fu">\kern</span> 0.5em}</span>
-<span id="cb440-29"><a href="#cb440-29" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererUlItemEnd</span>{.<span class="fu">\par</span>}</span>
-<span id="cb440-30"><a href="#cb440-30" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererUlEnd</span>{}</span>
-<span id="cb440-31"><a href="#cb440-31" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb440-32"><a href="#cb440-32" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
-<span id="cb440-33"><a href="#cb440-33" aria-hidden="true" tabindex="-1"></a>This is a loose list</span>
-<span id="cb440-34"><a href="#cb440-34" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb440-35"><a href="#cb440-35" aria-hidden="true" tabindex="-1"></a>- This is the first item</span>
-<span id="cb440-36"><a href="#cb440-36" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb440-37"><a href="#cb440-37" aria-hidden="true" tabindex="-1"></a>- This is the second item</span>
-<span id="cb440-38"><a href="#cb440-38" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb440-39"><a href="#cb440-39" aria-hidden="true" tabindex="-1"></a>- This is the third item</span>
-<span id="cb440-40"><a href="#cb440-40" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
-<span id="cb440-41"><a href="#cb440-41" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb440-42"><a href="#cb440-42" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
-<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb441"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb441-1"><a href="#cb441-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
-<p>A PDF document named <code>document.pdf</code> should be produced and
-contain the following text:</p>
-<blockquote>
-<p>This is a tight list (the first item, the second item, and the third
-item).</p>
-<p>This is a loose list:</p>
-<ul>
-<li><p>This is the first item.</p></li>
-<li><p>This is the second item.</p></li>
-<li><p>This is the third item.</p></li>
-</ul>
-</blockquote>
-<h5 class="unnumbered" id="latex-example-55"><span
-class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
-<p>Using a text editor, create a text document named
-<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb442"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb442-1"><a href="#cb442-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb442-2"><a href="#cb442-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[tightLists]{<span class="ex">markdown</span>}</span>
-<span id="cb442-3"><a href="#cb442-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb442-4"><a href="#cb442-4" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb442-5"><a href="#cb442-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span>
-<span id="cb442-6"><a href="#cb442-6" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
-<span id="cb442-7"><a href="#cb442-7" aria-hidden="true" tabindex="-1"></a> interblockSeparator = {},</span>
-<span id="cb442-8"><a href="#cb442-8" aria-hidden="true" tabindex="-1"></a> ulBeginTight = { (},</span>
-<span id="cb442-9"><a href="#cb442-9" aria-hidden="true" tabindex="-1"></a> ulItem = {<span class="co">%</span></span>
-<span id="cb442-10"><a href="#cb442-10" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererUlItem</span>{<span class="co">%</span></span>
-<span id="cb442-11"><a href="#cb442-11" aria-hidden="true" tabindex="-1"></a> ,</span>
-<span id="cb442-12"><a href="#cb442-12" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererUlItem</span>{, and }<span class="co">%</span></span>
-<span id="cb442-13"><a href="#cb442-13" aria-hidden="true" tabindex="-1"></a> }<span class="co">%</span></span>
-<span id="cb442-14"><a href="#cb442-14" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb442-15"><a href="#cb442-15" aria-hidden="true" tabindex="-1"></a> ulItemEnd = {},</span>
-<span id="cb442-16"><a href="#cb442-16" aria-hidden="true" tabindex="-1"></a> ulEndTight = {).},</span>
-<span id="cb442-17"><a href="#cb442-17" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb442-18"><a href="#cb442-18" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb442-19"><a href="#cb442-19" aria-hidden="true" tabindex="-1"></a>This is a tight list</span>
-<span id="cb442-20"><a href="#cb442-20" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb442-21"><a href="#cb442-21" aria-hidden="true" tabindex="-1"></a>- the first item</span>
-<span id="cb442-22"><a href="#cb442-22" aria-hidden="true" tabindex="-1"></a>- the second item</span>
-<span id="cb442-23"><a href="#cb442-23" aria-hidden="true" tabindex="-1"></a>- the third item</span>
-<span id="cb442-24"><a href="#cb442-24" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span>
-<span id="cb442-25"><a href="#cb442-25" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb442-26"><a href="#cb442-26" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span>
-<span id="cb442-27"><a href="#cb442-27" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
-<span id="cb442-28"><a href="#cb442-28" aria-hidden="true" tabindex="-1"></a> interblockSeparator = {<span class="co">%</span></span>
-<span id="cb442-29"><a href="#cb442-29" aria-hidden="true" tabindex="-1"></a> :<span class="fu">\par</span></span>
-<span id="cb442-30"><a href="#cb442-30" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span>
-<span id="cb442-31"><a href="#cb442-31" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb442-32"><a href="#cb442-32" aria-hidden="true" tabindex="-1"></a> ulBeginTight = {<span class="kw">\begin</span>{<span class="ex">itemize</span>}},</span>
-<span id="cb442-33"><a href="#cb442-33" aria-hidden="true" tabindex="-1"></a> ulItem = {<span class="fu">\item</span>},</span>
-<span id="cb442-34"><a href="#cb442-34" aria-hidden="true" tabindex="-1"></a> ulItemEnd = {.},</span>
-<span id="cb442-35"><a href="#cb442-35" aria-hidden="true" tabindex="-1"></a> ulEnd = {<span class="kw">\end</span>{<span class="ex">itemize</span>}},</span>
-<span id="cb442-36"><a href="#cb442-36" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb442-37"><a href="#cb442-37" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb442-38"><a href="#cb442-38" aria-hidden="true" tabindex="-1"></a>This is a loose list</span>
-<span id="cb442-39"><a href="#cb442-39" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb442-40"><a href="#cb442-40" aria-hidden="true" tabindex="-1"></a>- This is the first item</span>
-<span id="cb442-41"><a href="#cb442-41" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb442-42"><a href="#cb442-42" aria-hidden="true" tabindex="-1"></a>- This is the second item</span>
-<span id="cb442-43"><a href="#cb442-43" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb442-44"><a href="#cb442-44" aria-hidden="true" tabindex="-1"></a>- This is the third item</span>
-<span id="cb442-45"><a href="#cb442-45" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span>
-<span id="cb442-46"><a href="#cb442-46" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb442-47"><a href="#cb442-47" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
-<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb443"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb443-1"><a href="#cb443-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
-<p>A PDF document named <code>document.pdf</code> should be produced and
-contain the following text:</p>
-<blockquote>
-<p>This is a tight list (the first item, the second item, and the third
-item).</p>
-<p>This is a loose list:</p>
-<ul>
-<li><p>This is the first item.</p></li>
-<li><p>This is the second item.</p></li>
-<li><p>This is the third item.</p></li>
-</ul>
-</blockquote>
-<h5 class="unnumbered" id="context-example-40">Con<span
-class="tex">T<sub>e</sub>X</span>t Example</h5>
-<p>Using a text editor, create a text document named
-<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb444"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb444-1"><a href="#cb444-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
-<span id="cb444-2"><a href="#cb444-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[tightLists = yes]</span>
-<span id="cb444-3"><a href="#cb444-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
-<span id="cb444-4"><a href="#cb444-4" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb444-5"><a href="#cb444-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{}</span>
-<span id="cb444-6"><a href="#cb444-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererUlBeginTight</span>{ (}</span>
-<span id="cb444-7"><a href="#cb444-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererUlItem</span>{<span class="co">%</span></span>
-<span id="cb444-8"><a href="#cb444-8" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererUlItem</span>{<span class="co">%</span></span>
-<span id="cb444-9"><a href="#cb444-9" aria-hidden="true" tabindex="-1"></a> ,</span>
-<span id="cb444-10"><a href="#cb444-10" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererUlItem</span>{, and }<span class="co">%</span></span>
-<span id="cb444-11"><a href="#cb444-11" aria-hidden="true" tabindex="-1"></a> }<span class="co">%</span></span>
-<span id="cb444-12"><a href="#cb444-12" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb444-13"><a href="#cb444-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererUlItemEnd</span>{}</span>
-<span id="cb444-14"><a href="#cb444-14" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererUlEndTight</span>{).}</span>
-<span id="cb444-15"><a href="#cb444-15" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb444-16"><a href="#cb444-16" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb444-17"><a href="#cb444-17" aria-hidden="true" tabindex="-1"></a>This is a tight list</span>
-<span id="cb444-18"><a href="#cb444-18" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb444-19"><a href="#cb444-19" aria-hidden="true" tabindex="-1"></a>- the first item</span>
-<span id="cb444-20"><a href="#cb444-20" aria-hidden="true" tabindex="-1"></a>- the second item</span>
-<span id="cb444-21"><a href="#cb444-21" aria-hidden="true" tabindex="-1"></a>- the third item</span>
-<span id="cb444-22"><a href="#cb444-22" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb444-23"><a href="#cb444-23" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb444-24"><a href="#cb444-24" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span>
-<span id="cb444-25"><a href="#cb444-25" aria-hidden="true" tabindex="-1"></a> :<span class="fu">\par</span></span>
-<span id="cb444-26"><a href="#cb444-26" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span>
-<span id="cb444-27"><a href="#cb444-27" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb444-28"><a href="#cb444-28" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererUlBegin</span>{<span class="fu">\startitemize</span>}</span>
-<span id="cb444-29"><a href="#cb444-29" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererUlItem</span>{<span class="fu">\item</span>}</span>
-<span id="cb444-30"><a href="#cb444-30" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererUlItemEnd</span>{.}</span>
-<span id="cb444-31"><a href="#cb444-31" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererUlEnd</span>{<span class="fu">\stopitemize</span>}</span>
-<span id="cb444-32"><a href="#cb444-32" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb444-33"><a href="#cb444-33" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb444-34"><a href="#cb444-34" aria-hidden="true" tabindex="-1"></a>This is a loose list</span>
-<span id="cb444-35"><a href="#cb444-35" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb444-36"><a href="#cb444-36" aria-hidden="true" tabindex="-1"></a>- This is the first item</span>
-<span id="cb444-37"><a href="#cb444-37" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb444-38"><a href="#cb444-38" aria-hidden="true" tabindex="-1"></a>- This is the second item</span>
-<span id="cb444-39"><a href="#cb444-39" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb444-40"><a href="#cb444-40" aria-hidden="true" tabindex="-1"></a>- This is the third item</span>
-<span id="cb444-41"><a href="#cb444-41" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb444-42"><a href="#cb444-42" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb444-43"><a href="#cb444-43" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
-<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb445"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb445-1"><a href="#cb445-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
-<p>A PDF document named <code>document.pdf</code> should be produced and
-contain the following text:</p>
-<blockquote>
-<p>This is a tight list (the first item, the second item, and the third
-item).</p>
-<p>This is a loose list:</p>
-<ul>
-<li><p>This is the first item.</p></li>
-<li><p>This is the second item.</p></li>
-<li><p>This is the third item.</p></li>
-</ul>
-</blockquote>
-<h4 data-number="2.3.1.13" id="ordered-list-renderers"><span
-class="header-section-number">2.3.1.13</span> Ordered List
-Renderers</h4>
-<p>The <code>\markdownRendererOlBegin</code> macro represents the
-beginning of an ordered list that contains an item with several
-paragraphs of text (the list is not tight). This macro will only be
-produced, when the <strong><code>fancyLists</code></strong> option is
-disabled. The macro receives no arguments.</p>
-<p>The <code>\markdownRendererOlBeginTight</code> macro represents the
-beginning of an ordered list that contains no item with several
-paragraphs of text (the list is tight). This macro will only be
-produced, when the <strong><code>tightLists</code></strong> option is
-enabled and the <strong><code>fancyLists</code></strong> option is
-disabled. The macro receives no arguments.</p>
-<p>The <code>\markdownRendererFancyOlBegin</code> macro represents the
-beginning of a fancy ordered list that contains an item with several
-paragraphs of text (the list is not tight). This macro will only be
-produced, when the <strong><code>fancyLists</code></strong> option is
-enabled. The macro receives two arguments: the style of the list item
-labels (<code>Decimal</code>, <code>LowerRoman</code>,
-<code>UpperRoman</code>, <code>LowerAlpha</code>, and
-<code>UpperAlpha</code>), and the style of delimiters between list item
-labels and texts (<code>Default</code>, <code>OneParen</code>, and
-<code>Period</code>).</p>
-<p>The <code>\markdownRendererFancyOlBeginTight</code> macro represents
-the beginning of a fancy ordered list that contains no item with several
-paragraphs of text (the list is tight). This macro will only be
-produced, when the <strong><code>fancyLists</code></strong> and
-<strong><code>tightLists</code></strong> options are enabled. The macro
-receives two arguments: the style of the list item labels, and the style
-of delimiters between list item labels and texts. See the
-<code>\markdownRendererFancyOlBegin</code> macro for the valid style
-values.</p>
-<p>The <code>\markdownRendererOlItem</code> macro represents an item in
-an ordered list. This macro will only be produced, when the
-<strong><code>startNumber</code></strong> option is disabled and the
-<strong><code>fancyLists</code></strong> option is disabled. The macro
-receives no arguments.</p>
-<p>The <code>\markdownRendererOlItemEnd</code> macro represents the end
-of an item in an ordered list. This macro will only be produced, when
-the <strong><code>fancyLists</code></strong> option is disabled. The
-macro receives no arguments.</p>
-<p>The <code>\markdownRendererOlItemWithNumber</code> macro represents
-an item in an ordered list. This macro will only be produced, when the
-<strong><code>startNumber</code></strong> option is enabled and the
-<strong><code>fancyLists</code></strong> option is disabled. The macro
-receives a single numeric argument that corresponds to the item
-number.</p>
-<p>The <code>\markdownRendererFancyOlItem</code> macro represents an
-item in a fancy ordered list. This macro will only be produced, when the
-<strong><code>startNumber</code></strong> option is disabled and the
-<strong><code>fancyLists</code></strong> option is enabled. The macro
-receives no arguments.</p>
-<p>The <code>\markdownRendererFancyOlItemEnd</code> macro represents the
-end of an item in a fancy ordered list. This macro will only be
-produced, when the <strong><code>fancyLists</code></strong> option is
-enabled. The macro receives no arguments.</p>
-<p>The <code>\markdownRendererFancyOlItemWithNumber</code> macro
-represents an item in a fancy ordered list. This macro will only be
-produced, when the <strong><code>startNumber</code></strong> and
-<strong><code>fancyLists</code></strong> options are enabled. The macro
-receives a single numeric argument that corresponds to the item
-number.</p>
-<p>The <code>\markdownRendererOlEnd</code> macro represents the end of
-an ordered list that contains an item with several paragraphs of text
-(the list is not tight). This macro will only be produced, when the
-<strong><code>fancyLists</code></strong> option is disabled. The macro
-receives no arguments.</p>
-<p>The <code>\markdownRendererOlEndTight</code> macro represents the end
-of an ordered list that contains no item with several paragraphs of text
-(the list is tight). This macro will only be produced, when the
-<strong><code>tightLists</code></strong> option is enabled and the
-<strong><code>fancyLists</code></strong> option is disabled. The macro
-receives no arguments.</p>
-<p>The <code>\markdownRendererFancyOlEnd</code> macro represents the end
-of a fancy ordered list that contains an item with several paragraphs of
-text (the list is not tight). This macro will only be produced, when the
-<strong><code>fancyLists</code></strong> option is enabled. The macro
-receives no arguments.</p>
-<p>The <code>\markdownRendererFancyOlEndTight</code> macro represents
-the end of a fancy ordered list that contains no item with several
-paragraphs of text (the list is tight). This macro will only be
-produced, when the <strong><code>fancyLists</code></strong> and
-<strong><code>tightLists</code></strong> options are enabled. The macro
-receives no arguments.</p>
-<h5 class="unnumbered" id="plain-tex-example-26">Plain <span
-class="tex">T<sub>e</sub>X</span> Example</h5>
-<p>Using a text editor, create a text document named
-<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb446"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb446-1"><a href="#cb446-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
-<span id="cb446-2"><a href="#cb446-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionTightLists</span>{true}</span>
-<span id="cb446-3"><a href="#cb446-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionStartNumber</span>{true}</span>
-<span id="cb446-4"><a href="#cb446-4" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb446-5"><a href="#cb446-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{}</span>
-<span id="cb446-6"><a href="#cb446-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererOlBeginTight</span>{ (}</span>
-<span id="cb446-7"><a href="#cb446-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererOlItemWithNumber</span>#1{<span class="co">%</span></span>
-<span id="cb446-8"><a href="#cb446-8" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></span>
-<span id="cb446-9"><a href="#cb446-9" aria-hidden="true" tabindex="-1"></a> the first</span>
-<span id="cb446-10"><a href="#cb446-10" aria-hidden="true" tabindex="-1"></a> <span class="fu">\else</span></span>
-<span id="cb446-11"><a href="#cb446-11" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></span>
-<span id="cb446-12"><a href="#cb446-12" aria-hidden="true" tabindex="-1"></a> , the second</span>
-<span id="cb446-13"><a href="#cb446-13" aria-hidden="true" tabindex="-1"></a> <span class="fu">\else</span></span>
-<span id="cb446-14"><a href="#cb446-14" aria-hidden="true" tabindex="-1"></a> , and the third</span>
-<span id="cb446-15"><a href="#cb446-15" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi</span></span>
-<span id="cb446-16"><a href="#cb446-16" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi</span></span>
-<span id="cb446-17"><a href="#cb446-17" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb446-18"><a href="#cb446-18" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererOlItemEnd</span>{}</span>
-<span id="cb446-19"><a href="#cb446-19" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererOlEndTight</span>{).}</span>
-<span id="cb446-20"><a href="#cb446-20" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb446-21"><a href="#cb446-21" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
-<span id="cb446-22"><a href="#cb446-22" aria-hidden="true" tabindex="-1"></a>This is a tight list</span>
-<span id="cb446-23"><a href="#cb446-23" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb446-24"><a href="#cb446-24" aria-hidden="true" tabindex="-1"></a>1. item</span>
-<span id="cb446-25"><a href="#cb446-25" aria-hidden="true" tabindex="-1"></a>2. item</span>
-<span id="cb446-26"><a href="#cb446-26" aria-hidden="true" tabindex="-1"></a>3. item</span>
-<span id="cb446-27"><a href="#cb446-27" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
-<span id="cb446-28"><a href="#cb446-28" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb446-29"><a href="#cb446-29" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span>
-<span id="cb446-30"><a href="#cb446-30" aria-hidden="true" tabindex="-1"></a> :<span class="fu">\par</span></span>
-<span id="cb446-31"><a href="#cb446-31" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span>
-<span id="cb446-32"><a href="#cb446-32" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb446-33"><a href="#cb446-33" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererOlBegin</span>{}</span>
-<span id="cb446-34"><a href="#cb446-34" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererOlItemWithNumber</span>#1{<span class="co">%</span></span>
-<span id="cb446-35"><a href="#cb446-35" aria-hidden="true" tabindex="-1"></a> #1.<span class="fu">\kern</span> 0.5em<span class="co">%</span></span>
-<span id="cb446-36"><a href="#cb446-36" aria-hidden="true" tabindex="-1"></a> This is the</span>
-<span id="cb446-37"><a href="#cb446-37" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></span>
-<span id="cb446-38"><a href="#cb446-38" aria-hidden="true" tabindex="-1"></a> first</span>
-<span id="cb446-39"><a href="#cb446-39" aria-hidden="true" tabindex="-1"></a> <span class="fu">\else</span></span>
-<span id="cb446-40"><a href="#cb446-40" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></span>
-<span id="cb446-41"><a href="#cb446-41" aria-hidden="true" tabindex="-1"></a> second</span>
-<span id="cb446-42"><a href="#cb446-42" aria-hidden="true" tabindex="-1"></a> <span class="fu">\else</span></span>
-<span id="cb446-43"><a href="#cb446-43" aria-hidden="true" tabindex="-1"></a> third</span>
-<span id="cb446-44"><a href="#cb446-44" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi</span></span>
-<span id="cb446-45"><a href="#cb446-45" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi</span></span>
-<span id="cb446-46"><a href="#cb446-46" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb446-47"><a href="#cb446-47" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererOlItemEnd</span>{.<span class="fu">\par</span>}</span>
-<span id="cb446-48"><a href="#cb446-48" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererOlEnd</span>{}</span>
-<span id="cb446-49"><a href="#cb446-49" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb446-50"><a href="#cb446-50" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
-<span id="cb446-51"><a href="#cb446-51" aria-hidden="true" tabindex="-1"></a>This is a loose list</span>
-<span id="cb446-52"><a href="#cb446-52" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb446-53"><a href="#cb446-53" aria-hidden="true" tabindex="-1"></a>1. item</span>
-<span id="cb446-54"><a href="#cb446-54" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb446-55"><a href="#cb446-55" aria-hidden="true" tabindex="-1"></a>2. item</span>
-<span id="cb446-56"><a href="#cb446-56" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb446-57"><a href="#cb446-57" aria-hidden="true" tabindex="-1"></a>3. item</span>
-<span id="cb446-58"><a href="#cb446-58" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
-<span id="cb446-59"><a href="#cb446-59" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb446-60"><a href="#cb446-60" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
-<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb447"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb447-1"><a href="#cb447-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
-<p>A PDF document named <code>document.pdf</code> should be produced and
-contain the following text:</p>
-<blockquote>
-<p>This is a tight list (the first item, the second item, and the third
-item).</p>
-<p>This is a loose list:</p>
-<ol type="1">
-<li><p>This is the first item.</p></li>
-<li><p>This is the second item.</p></li>
-<li><p>This is the third item.</p></li>
-</ol>
-</blockquote>
-<h5 class="unnumbered" id="latex-example-56"><span
-class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
-<p>Using a text editor, create a text document named
-<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb448"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb448-1"><a href="#cb448-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb448-2"><a href="#cb448-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[tightLists, startNumber]{<span class="ex">markdown</span>}</span>
-<span id="cb448-3"><a href="#cb448-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb448-4"><a href="#cb448-4" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb448-5"><a href="#cb448-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span>
-<span id="cb448-6"><a href="#cb448-6" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
-<span id="cb448-7"><a href="#cb448-7" aria-hidden="true" tabindex="-1"></a> interblockSeparator = {},</span>
-<span id="cb448-8"><a href="#cb448-8" aria-hidden="true" tabindex="-1"></a> olBeginTight = { (},</span>
-<span id="cb448-9"><a href="#cb448-9" aria-hidden="true" tabindex="-1"></a> olItemWithNumber = {<span class="co">%</span></span>
-<span id="cb448-10"><a href="#cb448-10" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></span>
-<span id="cb448-11"><a href="#cb448-11" aria-hidden="true" tabindex="-1"></a> the first</span>
-<span id="cb448-12"><a href="#cb448-12" aria-hidden="true" tabindex="-1"></a> <span class="fu">\else</span></span>
-<span id="cb448-13"><a href="#cb448-13" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></span>
-<span id="cb448-14"><a href="#cb448-14" aria-hidden="true" tabindex="-1"></a> , the second</span>
-<span id="cb448-15"><a href="#cb448-15" aria-hidden="true" tabindex="-1"></a> <span class="fu">\else</span></span>
-<span id="cb448-16"><a href="#cb448-16" aria-hidden="true" tabindex="-1"></a> , and the third</span>
-<span id="cb448-17"><a href="#cb448-17" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi</span></span>
-<span id="cb448-18"><a href="#cb448-18" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi</span></span>
-<span id="cb448-19"><a href="#cb448-19" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb448-20"><a href="#cb448-20" aria-hidden="true" tabindex="-1"></a> olItemEnd = {},</span>
-<span id="cb448-21"><a href="#cb448-21" aria-hidden="true" tabindex="-1"></a> olEndTight = {).},</span>
-<span id="cb448-22"><a href="#cb448-22" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb448-23"><a href="#cb448-23" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb448-24"><a href="#cb448-24" aria-hidden="true" tabindex="-1"></a>This is a tight list</span>
-<span id="cb448-25"><a href="#cb448-25" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb448-26"><a href="#cb448-26" aria-hidden="true" tabindex="-1"></a>1. item</span>
-<span id="cb448-27"><a href="#cb448-27" aria-hidden="true" tabindex="-1"></a>2. item</span>
-<span id="cb448-28"><a href="#cb448-28" aria-hidden="true" tabindex="-1"></a>3. item</span>
-<span id="cb448-29"><a href="#cb448-29" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span>
-<span id="cb448-30"><a href="#cb448-30" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb448-31"><a href="#cb448-31" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span>
-<span id="cb448-32"><a href="#cb448-32" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
-<span id="cb448-33"><a href="#cb448-33" aria-hidden="true" tabindex="-1"></a> interblockSeparator = {<span class="co">%</span></span>
-<span id="cb448-34"><a href="#cb448-34" aria-hidden="true" tabindex="-1"></a> :<span class="fu">\par</span></span>
-<span id="cb448-35"><a href="#cb448-35" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span>
-<span id="cb448-36"><a href="#cb448-36" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb448-37"><a href="#cb448-37" aria-hidden="true" tabindex="-1"></a> olBeginTight = {<span class="kw">\begin</span>{<span class="ex">enumerate</span>}},</span>
-<span id="cb448-38"><a href="#cb448-38" aria-hidden="true" tabindex="-1"></a> olItemWithNumber = {<span class="co">%</span></span>
-<span id="cb448-39"><a href="#cb448-39" aria-hidden="true" tabindex="-1"></a> <span class="fu">\item</span> This is the</span>
-<span id="cb448-40"><a href="#cb448-40" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></span>
-<span id="cb448-41"><a href="#cb448-41" aria-hidden="true" tabindex="-1"></a> first</span>
-<span id="cb448-42"><a href="#cb448-42" aria-hidden="true" tabindex="-1"></a> <span class="fu">\else</span></span>
-<span id="cb448-43"><a href="#cb448-43" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></span>
-<span id="cb448-44"><a href="#cb448-44" aria-hidden="true" tabindex="-1"></a> second</span>
-<span id="cb448-45"><a href="#cb448-45" aria-hidden="true" tabindex="-1"></a> <span class="fu">\else</span></span>
-<span id="cb448-46"><a href="#cb448-46" aria-hidden="true" tabindex="-1"></a> third</span>
-<span id="cb448-47"><a href="#cb448-47" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi</span></span>
-<span id="cb448-48"><a href="#cb448-48" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi</span></span>
-<span id="cb448-49"><a href="#cb448-49" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb448-50"><a href="#cb448-50" aria-hidden="true" tabindex="-1"></a> olItemEnd = {.},</span>
-<span id="cb448-51"><a href="#cb448-51" aria-hidden="true" tabindex="-1"></a> olEnd = {<span class="kw">\end</span>{<span class="ex">enumerate</span>}},</span>
-<span id="cb448-52"><a href="#cb448-52" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb448-53"><a href="#cb448-53" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb448-54"><a href="#cb448-54" aria-hidden="true" tabindex="-1"></a>This is a loose list</span>
-<span id="cb448-55"><a href="#cb448-55" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb448-56"><a href="#cb448-56" aria-hidden="true" tabindex="-1"></a>1. item</span>
-<span id="cb448-57"><a href="#cb448-57" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb448-58"><a href="#cb448-58" aria-hidden="true" tabindex="-1"></a>2. item</span>
-<span id="cb448-59"><a href="#cb448-59" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb448-60"><a href="#cb448-60" aria-hidden="true" tabindex="-1"></a>3. item</span>
-<span id="cb448-61"><a href="#cb448-61" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span>
-<span id="cb448-62"><a href="#cb448-62" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb448-63"><a href="#cb448-63" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
-<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb449"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb449-1"><a href="#cb449-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
-<p>A PDF document named <code>document.pdf</code> should be produced and
-contain the following text:</p>
-<blockquote>
-<p>This is a tight list (the first item, the second item, and the third
-item).</p>
-<p>This is a loose list:</p>
-<ol type="1">
-<li><p>This is the first item.</p></li>
-<li><p>This is the second item.</p></li>
-<li><p>This is the third item.</p></li>
-</ol>
-</blockquote>
-<h5 class="unnumbered" id="context-example-41">Con<span
-class="tex">T<sub>e</sub>X</span>t Example</h5>
-<p>Using a text editor, create a text document named
-<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb450"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb450-1"><a href="#cb450-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
-<span id="cb450-2"><a href="#cb450-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span></span>
-<span id="cb450-3"><a href="#cb450-3" aria-hidden="true" tabindex="-1"></a> [</span>
-<span id="cb450-4"><a href="#cb450-4" aria-hidden="true" tabindex="-1"></a> tightLists = yes,</span>
-<span id="cb450-5"><a href="#cb450-5" aria-hidden="true" tabindex="-1"></a> startNumber = yes,</span>
-<span id="cb450-6"><a href="#cb450-6" aria-hidden="true" tabindex="-1"></a> ]</span>
-<span id="cb450-7"><a href="#cb450-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
-<span id="cb450-8"><a href="#cb450-8" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb450-9"><a href="#cb450-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{}</span>
-<span id="cb450-10"><a href="#cb450-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererOlBeginTight</span>{ (}</span>
-<span id="cb450-11"><a href="#cb450-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererOlItemWithNumber</span>#1{<span class="co">%</span></span>
-<span id="cb450-12"><a href="#cb450-12" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></span>
-<span id="cb450-13"><a href="#cb450-13" aria-hidden="true" tabindex="-1"></a> the first</span>
-<span id="cb450-14"><a href="#cb450-14" aria-hidden="true" tabindex="-1"></a> <span class="fu">\else</span></span>
-<span id="cb450-15"><a href="#cb450-15" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></span>
-<span id="cb450-16"><a href="#cb450-16" aria-hidden="true" tabindex="-1"></a> , the second</span>
-<span id="cb450-17"><a href="#cb450-17" aria-hidden="true" tabindex="-1"></a> <span class="fu">\else</span></span>
-<span id="cb450-18"><a href="#cb450-18" aria-hidden="true" tabindex="-1"></a> , and the third</span>
-<span id="cb450-19"><a href="#cb450-19" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi</span></span>
-<span id="cb450-20"><a href="#cb450-20" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi</span></span>
-<span id="cb450-21"><a href="#cb450-21" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb450-22"><a href="#cb450-22" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererOlItemEnd</span>{}</span>
-<span id="cb450-23"><a href="#cb450-23" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererOlEndTight</span>{).}</span>
-<span id="cb450-24"><a href="#cb450-24" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb450-25"><a href="#cb450-25" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb450-26"><a href="#cb450-26" aria-hidden="true" tabindex="-1"></a>This is a tight list</span>
-<span id="cb450-27"><a href="#cb450-27" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb450-28"><a href="#cb450-28" aria-hidden="true" tabindex="-1"></a>1. item</span>
-<span id="cb450-29"><a href="#cb450-29" aria-hidden="true" tabindex="-1"></a>2. item</span>
-<span id="cb450-30"><a href="#cb450-30" aria-hidden="true" tabindex="-1"></a>3. item</span>
-<span id="cb450-31"><a href="#cb450-31" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb450-32"><a href="#cb450-32" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb450-33"><a href="#cb450-33" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span>
-<span id="cb450-34"><a href="#cb450-34" aria-hidden="true" tabindex="-1"></a> :<span class="fu">\par</span></span>
-<span id="cb450-35"><a href="#cb450-35" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span>
-<span id="cb450-36"><a href="#cb450-36" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb450-37"><a href="#cb450-37" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererOlBegin</span>{<span class="fu">\startitemize</span>}</span>
-<span id="cb450-38"><a href="#cb450-38" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererOlItemWithNumber</span>#1{<span class="co">%</span></span>
-<span id="cb450-39"><a href="#cb450-39" aria-hidden="true" tabindex="-1"></a> <span class="fu">\sym</span>{#1.}</span>
-<span id="cb450-40"><a href="#cb450-40" aria-hidden="true" tabindex="-1"></a> This is the</span>
-<span id="cb450-41"><a href="#cb450-41" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></span>
-<span id="cb450-42"><a href="#cb450-42" aria-hidden="true" tabindex="-1"></a> first</span>
-<span id="cb450-43"><a href="#cb450-43" aria-hidden="true" tabindex="-1"></a> <span class="fu">\else</span></span>
-<span id="cb450-44"><a href="#cb450-44" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></span>
-<span id="cb450-45"><a href="#cb450-45" aria-hidden="true" tabindex="-1"></a> second</span>
-<span id="cb450-46"><a href="#cb450-46" aria-hidden="true" tabindex="-1"></a> <span class="fu">\else</span></span>
-<span id="cb450-47"><a href="#cb450-47" aria-hidden="true" tabindex="-1"></a> third</span>
-<span id="cb450-48"><a href="#cb450-48" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi</span></span>
-<span id="cb450-49"><a href="#cb450-49" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi</span></span>
-<span id="cb450-50"><a href="#cb450-50" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb450-51"><a href="#cb450-51" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererOlItemEnd</span>{.<span class="fu">\par</span>}</span>
-<span id="cb450-52"><a href="#cb450-52" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererOlEnd</span>{<span class="fu">\stopitemize</span>}</span>
-<span id="cb450-53"><a href="#cb450-53" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb450-54"><a href="#cb450-54" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb450-55"><a href="#cb450-55" aria-hidden="true" tabindex="-1"></a>This is a loose list</span>
-<span id="cb450-56"><a href="#cb450-56" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb450-57"><a href="#cb450-57" aria-hidden="true" tabindex="-1"></a>1. item</span>
-<span id="cb450-58"><a href="#cb450-58" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb450-59"><a href="#cb450-59" aria-hidden="true" tabindex="-1"></a>2. item</span>
-<span id="cb450-60"><a href="#cb450-60" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb450-61"><a href="#cb450-61" aria-hidden="true" tabindex="-1"></a>3. item</span>
-<span id="cb450-62"><a href="#cb450-62" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb450-63"><a href="#cb450-63" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb450-64"><a href="#cb450-64" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
-<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb451"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb451-1"><a href="#cb451-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
-<p>A PDF document named <code>document.pdf</code> should be produced and
-contain the following text:</p>
-<blockquote>
-<p>This is a tight list (the first item, the second item, and the third
-item).</p>
-<p>This is a loose list:</p>
-<ol type="1">
-<li><p>This is the first item.</p></li>
-<li><p>This is the second item.</p></li>
-<li><p>This is the third item.</p></li>
-</ol>
-</blockquote>
-<h4 data-number="2.3.1.14" id="definition-list-renderers"><span
-class="header-section-number">2.3.1.14</span> Definition List
+<h4 data-number="2.3.1.8" id="definition-list-renderers"><span
+class="header-section-number">2.3.1.8</span> Definition List
Renderers</h4>
<p>The following macros are only produced, when the
<strong><code>definitionLists</code></strong> option is enabled.</p>
@@ -7997,92 +7401,92 @@ of a definition list that contains no item with several paragraphs of
text (the list is tight). This macro will only be produced, when the
<strong><code>tightLists</code></strong> option is disabled. The macro
receives no arguments.</p>
-<h5 class="unnumbered" id="plain-tex-example-27">Plain <span
+<h5 class="unnumbered" id="plain-tex-example-22">Plain <span
class="tex">T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb452"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb452-1"><a href="#cb452-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
-<span id="cb452-2"><a href="#cb452-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionDefinitionLists</span>{true}</span>
-<span id="cb452-3"><a href="#cb452-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionTightLists</span>{true}</span>
-<span id="cb452-4"><a href="#cb452-4" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb452-5"><a href="#cb452-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span>
-<span id="cb452-6"><a href="#cb452-6" aria-hidden="true" tabindex="-1"></a> :<span class="co">%</span></span>
-<span id="cb452-7"><a href="#cb452-7" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span>
-<span id="cb452-8"><a href="#cb452-8" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb452-9"><a href="#cb452-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlBeginTight</span>{<span class="co">%</span></span>
-<span id="cb452-10"><a href="#cb452-10" aria-hidden="true" tabindex="-1"></a> <span class="fu">\begingroup</span></span>
-<span id="cb452-11"><a href="#cb452-11" aria-hidden="true" tabindex="-1"></a> <span class="fu">\parindent</span>=0pt</span>
-<span id="cb452-12"><a href="#cb452-12" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb452-13"><a href="#cb452-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlItem</span>#1{<span class="co">%</span></span>
-<span id="cb452-14"><a href="#cb452-14" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span>{<span class="fu">\bf</span>#1}<span class="co">%</span></span>
-<span id="cb452-15"><a href="#cb452-15" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{<span class="co">%</span></span>
-<span id="cb452-16"><a href="#cb452-16" aria-hidden="true" tabindex="-1"></a> ,</span>
-<span id="cb452-17"><a href="#cb452-17" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{<span class="co">%</span></span>
-<span id="cb452-18"><a href="#cb452-18" aria-hidden="true" tabindex="-1"></a> , and</span>
-<span id="cb452-19"><a href="#cb452-19" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{.}<span class="co">%</span></span>
-<span id="cb452-20"><a href="#cb452-20" aria-hidden="true" tabindex="-1"></a> }<span class="co">%</span></span>
-<span id="cb452-21"><a href="#cb452-21" aria-hidden="true" tabindex="-1"></a> }<span class="co">%</span></span>
-<span id="cb452-22"><a href="#cb452-22" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb452-23"><a href="#cb452-23" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlItemEnd</span>{}</span>
-<span id="cb452-24"><a href="#cb452-24" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="fu">\par</span>--<span class="fu">\kern</span> 0.5em}</span>
-<span id="cb452-25"><a href="#cb452-25" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlEndTight</span>{<span class="fu">\endgroup</span>}</span>
-<span id="cb452-26"><a href="#cb452-26" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb452-27"><a href="#cb452-27" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
-<span id="cb452-28"><a href="#cb452-28" aria-hidden="true" tabindex="-1"></a>This is a tight definition list</span>
-<span id="cb452-29"><a href="#cb452-29" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb452-30"><a href="#cb452-30" aria-hidden="true" tabindex="-1"></a>Coffee</span>
-<span id="cb452-31"><a href="#cb452-31" aria-hidden="true" tabindex="-1"></a>: black hot drink</span>
-<span id="cb452-32"><a href="#cb452-32" aria-hidden="true" tabindex="-1"></a>: prepared from roasted coffee beans</span>
-<span id="cb452-33"><a href="#cb452-33" aria-hidden="true" tabindex="-1"></a>: one of the most traded agricultural commodities in the world</span>
-<span id="cb452-34"><a href="#cb452-34" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb452-35"><a href="#cb452-35" aria-hidden="true" tabindex="-1"></a>Milk</span>
-<span id="cb452-36"><a href="#cb452-36" aria-hidden="true" tabindex="-1"></a>: white cold drink</span>
-<span id="cb452-37"><a href="#cb452-37" aria-hidden="true" tabindex="-1"></a>: nutrient-rich</span>
-<span id="cb452-38"><a href="#cb452-38" aria-hidden="true" tabindex="-1"></a>: produced on an industrial scale</span>
-<span id="cb452-39"><a href="#cb452-39" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
-<span id="cb452-40"><a href="#cb452-40" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb452-41"><a href="#cb452-41" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span>
-<span id="cb452-42"><a href="#cb452-42" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span>
-<span id="cb452-43"><a href="#cb452-43" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb452-44"><a href="#cb452-44" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlBegin</span>{}</span>
-<span id="cb452-45"><a href="#cb452-45" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlItem</span>#1{<span class="co">%</span></span>
-<span id="cb452-46"><a href="#cb452-46" aria-hidden="true" tabindex="-1"></a> . #1 is a</span>
-<span id="cb452-47"><a href="#cb452-47" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="co">%</span></span>
-<span id="cb452-48"><a href="#cb452-48" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="co">%</span></span>
-<span id="cb452-49"><a href="#cb452-49" aria-hidden="true" tabindex="-1"></a> ,</span>
-<span id="cb452-50"><a href="#cb452-50" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{, and }<span class="co">%</span></span>
-<span id="cb452-51"><a href="#cb452-51" aria-hidden="true" tabindex="-1"></a> }<span class="co">%</span></span>
-<span id="cb452-52"><a href="#cb452-52" aria-hidden="true" tabindex="-1"></a> }<span class="co">%</span></span>
-<span id="cb452-53"><a href="#cb452-53" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb452-54"><a href="#cb452-54" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlItemEnd</span>{}</span>
-<span id="cb452-55"><a href="#cb452-55" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlDefinitionEnd</span>{}</span>
-<span id="cb452-56"><a href="#cb452-56" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlEnd</span>{.}</span>
-<span id="cb452-57"><a href="#cb452-57" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb452-58"><a href="#cb452-58" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
-<span id="cb452-59"><a href="#cb452-59" aria-hidden="true" tabindex="-1"></a>This is a loose definition list</span>
-<span id="cb452-60"><a href="#cb452-60" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb452-61"><a href="#cb452-61" aria-hidden="true" tabindex="-1"></a>Coffee</span>
-<span id="cb452-62"><a href="#cb452-62" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb452-63"><a href="#cb452-63" aria-hidden="true" tabindex="-1"></a>: black hot drink</span>
-<span id="cb452-64"><a href="#cb452-64" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb452-65"><a href="#cb452-65" aria-hidden="true" tabindex="-1"></a>: prepared from roasted coffee beans</span>
-<span id="cb452-66"><a href="#cb452-66" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb452-67"><a href="#cb452-67" aria-hidden="true" tabindex="-1"></a>: one of the most traded agricultural commodities in the world</span>
-<span id="cb452-68"><a href="#cb452-68" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb452-69"><a href="#cb452-69" aria-hidden="true" tabindex="-1"></a>Milk</span>
-<span id="cb452-70"><a href="#cb452-70" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb452-71"><a href="#cb452-71" aria-hidden="true" tabindex="-1"></a>: white cold drink</span>
-<span id="cb452-72"><a href="#cb452-72" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb452-73"><a href="#cb452-73" aria-hidden="true" tabindex="-1"></a>: nutrient-rich</span>
-<span id="cb452-74"><a href="#cb452-74" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb452-75"><a href="#cb452-75" aria-hidden="true" tabindex="-1"></a>: produced on an industrial scale</span>
-<span id="cb452-76"><a href="#cb452-76" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
-<span id="cb452-77"><a href="#cb452-77" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb452-78"><a href="#cb452-78" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
+<div class="sourceCode" id="cb424"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb424-1"><a href="#cb424-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
+<span id="cb424-2"><a href="#cb424-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionDefinitionLists</span>{true}</span>
+<span id="cb424-3"><a href="#cb424-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionTightLists</span>{true}</span>
+<span id="cb424-4"><a href="#cb424-4" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb424-5"><a href="#cb424-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span>
+<span id="cb424-6"><a href="#cb424-6" aria-hidden="true" tabindex="-1"></a> :<span class="co">%</span></span>
+<span id="cb424-7"><a href="#cb424-7" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span>
+<span id="cb424-8"><a href="#cb424-8" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb424-9"><a href="#cb424-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlBeginTight</span>{<span class="co">%</span></span>
+<span id="cb424-10"><a href="#cb424-10" aria-hidden="true" tabindex="-1"></a> <span class="fu">\begingroup</span></span>
+<span id="cb424-11"><a href="#cb424-11" aria-hidden="true" tabindex="-1"></a> <span class="fu">\parindent</span>=0pt</span>
+<span id="cb424-12"><a href="#cb424-12" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb424-13"><a href="#cb424-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlItem</span>#1{<span class="co">%</span></span>
+<span id="cb424-14"><a href="#cb424-14" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span>{<span class="fu">\bf</span>#1}<span class="co">%</span></span>
+<span id="cb424-15"><a href="#cb424-15" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{<span class="co">%</span></span>
+<span id="cb424-16"><a href="#cb424-16" aria-hidden="true" tabindex="-1"></a> ,</span>
+<span id="cb424-17"><a href="#cb424-17" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{<span class="co">%</span></span>
+<span id="cb424-18"><a href="#cb424-18" aria-hidden="true" tabindex="-1"></a> , and</span>
+<span id="cb424-19"><a href="#cb424-19" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{.}<span class="co">%</span></span>
+<span id="cb424-20"><a href="#cb424-20" aria-hidden="true" tabindex="-1"></a> }<span class="co">%</span></span>
+<span id="cb424-21"><a href="#cb424-21" aria-hidden="true" tabindex="-1"></a> }<span class="co">%</span></span>
+<span id="cb424-22"><a href="#cb424-22" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb424-23"><a href="#cb424-23" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlItemEnd</span>{}</span>
+<span id="cb424-24"><a href="#cb424-24" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="fu">\par</span>--<span class="fu">\kern</span> 0.5em}</span>
+<span id="cb424-25"><a href="#cb424-25" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlEndTight</span>{<span class="fu">\endgroup</span>}</span>
+<span id="cb424-26"><a href="#cb424-26" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb424-27"><a href="#cb424-27" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
+<span id="cb424-28"><a href="#cb424-28" aria-hidden="true" tabindex="-1"></a>This is a tight definition list</span>
+<span id="cb424-29"><a href="#cb424-29" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb424-30"><a href="#cb424-30" aria-hidden="true" tabindex="-1"></a>Coffee</span>
+<span id="cb424-31"><a href="#cb424-31" aria-hidden="true" tabindex="-1"></a>: black hot drink</span>
+<span id="cb424-32"><a href="#cb424-32" aria-hidden="true" tabindex="-1"></a>: prepared from roasted coffee beans</span>
+<span id="cb424-33"><a href="#cb424-33" aria-hidden="true" tabindex="-1"></a>: one of the most traded agricultural commodities in the world</span>
+<span id="cb424-34"><a href="#cb424-34" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb424-35"><a href="#cb424-35" aria-hidden="true" tabindex="-1"></a>Milk</span>
+<span id="cb424-36"><a href="#cb424-36" aria-hidden="true" tabindex="-1"></a>: white cold drink</span>
+<span id="cb424-37"><a href="#cb424-37" aria-hidden="true" tabindex="-1"></a>: nutrient-rich</span>
+<span id="cb424-38"><a href="#cb424-38" aria-hidden="true" tabindex="-1"></a>: produced on an industrial scale</span>
+<span id="cb424-39"><a href="#cb424-39" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
+<span id="cb424-40"><a href="#cb424-40" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb424-41"><a href="#cb424-41" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span>
+<span id="cb424-42"><a href="#cb424-42" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span>
+<span id="cb424-43"><a href="#cb424-43" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb424-44"><a href="#cb424-44" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlBegin</span>{}</span>
+<span id="cb424-45"><a href="#cb424-45" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlItem</span>#1{<span class="co">%</span></span>
+<span id="cb424-46"><a href="#cb424-46" aria-hidden="true" tabindex="-1"></a> . #1 is a</span>
+<span id="cb424-47"><a href="#cb424-47" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="co">%</span></span>
+<span id="cb424-48"><a href="#cb424-48" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="co">%</span></span>
+<span id="cb424-49"><a href="#cb424-49" aria-hidden="true" tabindex="-1"></a> ,</span>
+<span id="cb424-50"><a href="#cb424-50" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{, and }<span class="co">%</span></span>
+<span id="cb424-51"><a href="#cb424-51" aria-hidden="true" tabindex="-1"></a> }<span class="co">%</span></span>
+<span id="cb424-52"><a href="#cb424-52" aria-hidden="true" tabindex="-1"></a> }<span class="co">%</span></span>
+<span id="cb424-53"><a href="#cb424-53" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb424-54"><a href="#cb424-54" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlItemEnd</span>{}</span>
+<span id="cb424-55"><a href="#cb424-55" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlDefinitionEnd</span>{}</span>
+<span id="cb424-56"><a href="#cb424-56" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlEnd</span>{.}</span>
+<span id="cb424-57"><a href="#cb424-57" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb424-58"><a href="#cb424-58" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
+<span id="cb424-59"><a href="#cb424-59" aria-hidden="true" tabindex="-1"></a>This is a loose definition list</span>
+<span id="cb424-60"><a href="#cb424-60" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb424-61"><a href="#cb424-61" aria-hidden="true" tabindex="-1"></a>Coffee</span>
+<span id="cb424-62"><a href="#cb424-62" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb424-63"><a href="#cb424-63" aria-hidden="true" tabindex="-1"></a>: black hot drink</span>
+<span id="cb424-64"><a href="#cb424-64" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb424-65"><a href="#cb424-65" aria-hidden="true" tabindex="-1"></a>: prepared from roasted coffee beans</span>
+<span id="cb424-66"><a href="#cb424-66" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb424-67"><a href="#cb424-67" aria-hidden="true" tabindex="-1"></a>: one of the most traded agricultural commodities in the world</span>
+<span id="cb424-68"><a href="#cb424-68" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb424-69"><a href="#cb424-69" aria-hidden="true" tabindex="-1"></a>Milk</span>
+<span id="cb424-70"><a href="#cb424-70" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb424-71"><a href="#cb424-71" aria-hidden="true" tabindex="-1"></a>: white cold drink</span>
+<span id="cb424-72"><a href="#cb424-72" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb424-73"><a href="#cb424-73" aria-hidden="true" tabindex="-1"></a>: nutrient-rich</span>
+<span id="cb424-74"><a href="#cb424-74" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb424-75"><a href="#cb424-75" aria-hidden="true" tabindex="-1"></a>: produced on an industrial scale</span>
+<span id="cb424-76"><a href="#cb424-76" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
+<span id="cb424-77"><a href="#cb424-77" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb424-78"><a href="#cb424-78" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb453"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb453-1"><a href="#cb453-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb425"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb425-1"><a href="#cb425-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -8104,94 +7508,94 @@ prepared from roasted coffee beans, and one of the most traded
agricultural commodities in the world. Milk is a white cold drink,
nutrient-rich, and produced on an industrial scale.</p>
</blockquote>
-<h5 class="unnumbered" id="latex-example-57"><span
+<h5 class="unnumbered" id="latex-example-54"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb454"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb454-1"><a href="#cb454-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb454-2"><a href="#cb454-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[definitionLists, tightLists]{<span class="ex">markdown</span>}</span>
-<span id="cb454-3"><a href="#cb454-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb454-4"><a href="#cb454-4" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb454-5"><a href="#cb454-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span>
-<span id="cb454-6"><a href="#cb454-6" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
-<span id="cb454-7"><a href="#cb454-7" aria-hidden="true" tabindex="-1"></a> interblockSeparator = {<span class="co">%</span></span>
-<span id="cb454-8"><a href="#cb454-8" aria-hidden="true" tabindex="-1"></a> :<span class="co">%</span></span>
-<span id="cb454-9"><a href="#cb454-9" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span>
-<span id="cb454-10"><a href="#cb454-10" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb454-11"><a href="#cb454-11" aria-hidden="true" tabindex="-1"></a> dlBeginTight = {<span class="kw">\begin</span>{<span class="ex">description</span>}},</span>
-<span id="cb454-12"><a href="#cb454-12" aria-hidden="true" tabindex="-1"></a> dlItem = {<span class="co">%</span></span>
-<span id="cb454-13"><a href="#cb454-13" aria-hidden="true" tabindex="-1"></a> <span class="fu">\item</span>[#1]</span>
-<span id="cb454-14"><a href="#cb454-14" aria-hidden="true" tabindex="-1"></a> <span class="kw">\begin</span>{<span class="ex">itemize</span>}</span>
-<span id="cb454-15"><a href="#cb454-15" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{<span class="co">%</span></span>
-<span id="cb454-16"><a href="#cb454-16" aria-hidden="true" tabindex="-1"></a> ,</span>
-<span id="cb454-17"><a href="#cb454-17" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{<span class="co">%</span></span>
-<span id="cb454-18"><a href="#cb454-18" aria-hidden="true" tabindex="-1"></a> , and</span>
-<span id="cb454-19"><a href="#cb454-19" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{.}<span class="co">%</span></span>
-<span id="cb454-20"><a href="#cb454-20" aria-hidden="true" tabindex="-1"></a> }<span class="co">%</span></span>
-<span id="cb454-21"><a href="#cb454-21" aria-hidden="true" tabindex="-1"></a> }<span class="co">%</span></span>
-<span id="cb454-22"><a href="#cb454-22" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb454-23"><a href="#cb454-23" aria-hidden="true" tabindex="-1"></a> dlItemEnd = {<span class="kw">\end</span>{<span class="ex">itemize</span>}},</span>
-<span id="cb454-24"><a href="#cb454-24" aria-hidden="true" tabindex="-1"></a> dlDefinitionBegin = <span class="fu">\item</span>,</span>
-<span id="cb454-25"><a href="#cb454-25" aria-hidden="true" tabindex="-1"></a> dlEndTight = {<span class="kw">\end</span>{<span class="ex">description</span>}},</span>
-<span id="cb454-26"><a href="#cb454-26" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb454-27"><a href="#cb454-27" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb454-28"><a href="#cb454-28" aria-hidden="true" tabindex="-1"></a>This is a tight definition list</span>
-<span id="cb454-29"><a href="#cb454-29" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb454-30"><a href="#cb454-30" aria-hidden="true" tabindex="-1"></a>Coffee</span>
-<span id="cb454-31"><a href="#cb454-31" aria-hidden="true" tabindex="-1"></a>: black hot drink</span>
-<span id="cb454-32"><a href="#cb454-32" aria-hidden="true" tabindex="-1"></a>: prepared from roasted coffee beans</span>
-<span id="cb454-33"><a href="#cb454-33" aria-hidden="true" tabindex="-1"></a>: one of the most traded agricultural commodities in the world</span>
-<span id="cb454-34"><a href="#cb454-34" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb454-35"><a href="#cb454-35" aria-hidden="true" tabindex="-1"></a>Milk</span>
-<span id="cb454-36"><a href="#cb454-36" aria-hidden="true" tabindex="-1"></a>: white cold drink</span>
-<span id="cb454-37"><a href="#cb454-37" aria-hidden="true" tabindex="-1"></a>: nutrient-rich</span>
-<span id="cb454-38"><a href="#cb454-38" aria-hidden="true" tabindex="-1"></a>: produced on an industrial scale</span>
-<span id="cb454-39"><a href="#cb454-39" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span>
-<span id="cb454-40"><a href="#cb454-40" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb454-41"><a href="#cb454-41" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span>
-<span id="cb454-42"><a href="#cb454-42" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
-<span id="cb454-43"><a href="#cb454-43" aria-hidden="true" tabindex="-1"></a> interblockSeparator = {<span class="co">%</span></span>
-<span id="cb454-44"><a href="#cb454-44" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span>
-<span id="cb454-45"><a href="#cb454-45" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb454-46"><a href="#cb454-46" aria-hidden="true" tabindex="-1"></a> dlBegin = {},</span>
-<span id="cb454-47"><a href="#cb454-47" aria-hidden="true" tabindex="-1"></a> dlItem = {<span class="co">%</span></span>
-<span id="cb454-48"><a href="#cb454-48" aria-hidden="true" tabindex="-1"></a> . #1 is a</span>
-<span id="cb454-49"><a href="#cb454-49" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="co">%</span></span>
-<span id="cb454-50"><a href="#cb454-50" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="co">%</span></span>
-<span id="cb454-51"><a href="#cb454-51" aria-hidden="true" tabindex="-1"></a> ,</span>
-<span id="cb454-52"><a href="#cb454-52" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{, and }<span class="co">%</span></span>
-<span id="cb454-53"><a href="#cb454-53" aria-hidden="true" tabindex="-1"></a> }<span class="co">%</span></span>
-<span id="cb454-54"><a href="#cb454-54" aria-hidden="true" tabindex="-1"></a> }<span class="co">%</span></span>
-<span id="cb454-55"><a href="#cb454-55" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb454-56"><a href="#cb454-56" aria-hidden="true" tabindex="-1"></a> dlItemEnd = {},</span>
-<span id="cb454-57"><a href="#cb454-57" aria-hidden="true" tabindex="-1"></a> dlDefinitionEnd = {},</span>
-<span id="cb454-58"><a href="#cb454-58" aria-hidden="true" tabindex="-1"></a> dlEnd = {.},</span>
-<span id="cb454-59"><a href="#cb454-59" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb454-60"><a href="#cb454-60" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb454-61"><a href="#cb454-61" aria-hidden="true" tabindex="-1"></a>This is a loose definition list</span>
-<span id="cb454-62"><a href="#cb454-62" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb454-63"><a href="#cb454-63" aria-hidden="true" tabindex="-1"></a>Coffee</span>
-<span id="cb454-64"><a href="#cb454-64" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb454-65"><a href="#cb454-65" aria-hidden="true" tabindex="-1"></a>: black hot drink</span>
-<span id="cb454-66"><a href="#cb454-66" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb454-67"><a href="#cb454-67" aria-hidden="true" tabindex="-1"></a>: prepared from roasted coffee beans</span>
-<span id="cb454-68"><a href="#cb454-68" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb454-69"><a href="#cb454-69" aria-hidden="true" tabindex="-1"></a>: one of the most traded agricultural commodities in the world</span>
-<span id="cb454-70"><a href="#cb454-70" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb454-71"><a href="#cb454-71" aria-hidden="true" tabindex="-1"></a>Milk</span>
-<span id="cb454-72"><a href="#cb454-72" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb454-73"><a href="#cb454-73" aria-hidden="true" tabindex="-1"></a>: white cold drink</span>
-<span id="cb454-74"><a href="#cb454-74" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb454-75"><a href="#cb454-75" aria-hidden="true" tabindex="-1"></a>: nutrient-rich</span>
-<span id="cb454-76"><a href="#cb454-76" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb454-77"><a href="#cb454-77" aria-hidden="true" tabindex="-1"></a>: produced on an industrial scale</span>
-<span id="cb454-78"><a href="#cb454-78" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span>
-<span id="cb454-79"><a href="#cb454-79" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb454-80"><a href="#cb454-80" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<div class="sourceCode" id="cb426"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb426-1"><a href="#cb426-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb426-2"><a href="#cb426-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[definitionLists, tightLists]{<span class="ex">markdown</span>}</span>
+<span id="cb426-3"><a href="#cb426-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb426-4"><a href="#cb426-4" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb426-5"><a href="#cb426-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span>
+<span id="cb426-6"><a href="#cb426-6" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
+<span id="cb426-7"><a href="#cb426-7" aria-hidden="true" tabindex="-1"></a> interblockSeparator = {<span class="co">%</span></span>
+<span id="cb426-8"><a href="#cb426-8" aria-hidden="true" tabindex="-1"></a> :<span class="co">%</span></span>
+<span id="cb426-9"><a href="#cb426-9" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span>
+<span id="cb426-10"><a href="#cb426-10" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb426-11"><a href="#cb426-11" aria-hidden="true" tabindex="-1"></a> dlBeginTight = {<span class="kw">\begin</span>{<span class="ex">description</span>}},</span>
+<span id="cb426-12"><a href="#cb426-12" aria-hidden="true" tabindex="-1"></a> dlItem = {<span class="co">%</span></span>
+<span id="cb426-13"><a href="#cb426-13" aria-hidden="true" tabindex="-1"></a> <span class="fu">\item</span>[#1]</span>
+<span id="cb426-14"><a href="#cb426-14" aria-hidden="true" tabindex="-1"></a> <span class="kw">\begin</span>{<span class="ex">itemize</span>}</span>
+<span id="cb426-15"><a href="#cb426-15" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{<span class="co">%</span></span>
+<span id="cb426-16"><a href="#cb426-16" aria-hidden="true" tabindex="-1"></a> ,</span>
+<span id="cb426-17"><a href="#cb426-17" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{<span class="co">%</span></span>
+<span id="cb426-18"><a href="#cb426-18" aria-hidden="true" tabindex="-1"></a> , and</span>
+<span id="cb426-19"><a href="#cb426-19" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{.}<span class="co">%</span></span>
+<span id="cb426-20"><a href="#cb426-20" aria-hidden="true" tabindex="-1"></a> }<span class="co">%</span></span>
+<span id="cb426-21"><a href="#cb426-21" aria-hidden="true" tabindex="-1"></a> }<span class="co">%</span></span>
+<span id="cb426-22"><a href="#cb426-22" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb426-23"><a href="#cb426-23" aria-hidden="true" tabindex="-1"></a> dlItemEnd = {<span class="kw">\end</span>{<span class="ex">itemize</span>}},</span>
+<span id="cb426-24"><a href="#cb426-24" aria-hidden="true" tabindex="-1"></a> dlDefinitionBegin = <span class="fu">\item</span>,</span>
+<span id="cb426-25"><a href="#cb426-25" aria-hidden="true" tabindex="-1"></a> dlEndTight = {<span class="kw">\end</span>{<span class="ex">description</span>}},</span>
+<span id="cb426-26"><a href="#cb426-26" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb426-27"><a href="#cb426-27" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb426-28"><a href="#cb426-28" aria-hidden="true" tabindex="-1"></a>This is a tight definition list</span>
+<span id="cb426-29"><a href="#cb426-29" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb426-30"><a href="#cb426-30" aria-hidden="true" tabindex="-1"></a>Coffee</span>
+<span id="cb426-31"><a href="#cb426-31" aria-hidden="true" tabindex="-1"></a>: black hot drink</span>
+<span id="cb426-32"><a href="#cb426-32" aria-hidden="true" tabindex="-1"></a>: prepared from roasted coffee beans</span>
+<span id="cb426-33"><a href="#cb426-33" aria-hidden="true" tabindex="-1"></a>: one of the most traded agricultural commodities in the world</span>
+<span id="cb426-34"><a href="#cb426-34" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb426-35"><a href="#cb426-35" aria-hidden="true" tabindex="-1"></a>Milk</span>
+<span id="cb426-36"><a href="#cb426-36" aria-hidden="true" tabindex="-1"></a>: white cold drink</span>
+<span id="cb426-37"><a href="#cb426-37" aria-hidden="true" tabindex="-1"></a>: nutrient-rich</span>
+<span id="cb426-38"><a href="#cb426-38" aria-hidden="true" tabindex="-1"></a>: produced on an industrial scale</span>
+<span id="cb426-39"><a href="#cb426-39" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span>
+<span id="cb426-40"><a href="#cb426-40" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb426-41"><a href="#cb426-41" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span>
+<span id="cb426-42"><a href="#cb426-42" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
+<span id="cb426-43"><a href="#cb426-43" aria-hidden="true" tabindex="-1"></a> interblockSeparator = {<span class="co">%</span></span>
+<span id="cb426-44"><a href="#cb426-44" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span>
+<span id="cb426-45"><a href="#cb426-45" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb426-46"><a href="#cb426-46" aria-hidden="true" tabindex="-1"></a> dlBegin = {},</span>
+<span id="cb426-47"><a href="#cb426-47" aria-hidden="true" tabindex="-1"></a> dlItem = {<span class="co">%</span></span>
+<span id="cb426-48"><a href="#cb426-48" aria-hidden="true" tabindex="-1"></a> . #1 is a</span>
+<span id="cb426-49"><a href="#cb426-49" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="co">%</span></span>
+<span id="cb426-50"><a href="#cb426-50" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="co">%</span></span>
+<span id="cb426-51"><a href="#cb426-51" aria-hidden="true" tabindex="-1"></a> ,</span>
+<span id="cb426-52"><a href="#cb426-52" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{, and }<span class="co">%</span></span>
+<span id="cb426-53"><a href="#cb426-53" aria-hidden="true" tabindex="-1"></a> }<span class="co">%</span></span>
+<span id="cb426-54"><a href="#cb426-54" aria-hidden="true" tabindex="-1"></a> }<span class="co">%</span></span>
+<span id="cb426-55"><a href="#cb426-55" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb426-56"><a href="#cb426-56" aria-hidden="true" tabindex="-1"></a> dlItemEnd = {},</span>
+<span id="cb426-57"><a href="#cb426-57" aria-hidden="true" tabindex="-1"></a> dlDefinitionEnd = {},</span>
+<span id="cb426-58"><a href="#cb426-58" aria-hidden="true" tabindex="-1"></a> dlEnd = {.},</span>
+<span id="cb426-59"><a href="#cb426-59" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb426-60"><a href="#cb426-60" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb426-61"><a href="#cb426-61" aria-hidden="true" tabindex="-1"></a>This is a loose definition list</span>
+<span id="cb426-62"><a href="#cb426-62" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb426-63"><a href="#cb426-63" aria-hidden="true" tabindex="-1"></a>Coffee</span>
+<span id="cb426-64"><a href="#cb426-64" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb426-65"><a href="#cb426-65" aria-hidden="true" tabindex="-1"></a>: black hot drink</span>
+<span id="cb426-66"><a href="#cb426-66" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb426-67"><a href="#cb426-67" aria-hidden="true" tabindex="-1"></a>: prepared from roasted coffee beans</span>
+<span id="cb426-68"><a href="#cb426-68" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb426-69"><a href="#cb426-69" aria-hidden="true" tabindex="-1"></a>: one of the most traded agricultural commodities in the world</span>
+<span id="cb426-70"><a href="#cb426-70" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb426-71"><a href="#cb426-71" aria-hidden="true" tabindex="-1"></a>Milk</span>
+<span id="cb426-72"><a href="#cb426-72" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb426-73"><a href="#cb426-73" aria-hidden="true" tabindex="-1"></a>: white cold drink</span>
+<span id="cb426-74"><a href="#cb426-74" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb426-75"><a href="#cb426-75" aria-hidden="true" tabindex="-1"></a>: nutrient-rich</span>
+<span id="cb426-76"><a href="#cb426-76" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb426-77"><a href="#cb426-77" aria-hidden="true" tabindex="-1"></a>: produced on an industrial scale</span>
+<span id="cb426-78"><a href="#cb426-78" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span>
+<span id="cb426-79"><a href="#cb426-79" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb426-80"><a href="#cb426-80" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb455"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb455-1"><a href="#cb455-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb427"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb427-1"><a href="#cb427-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -8213,94 +7617,94 @@ prepared from roasted coffee beans, and one of the most traded
agricultural commodities in the world. Milk is a white cold drink,
nutrient-rich, and produced on an industrial scale.</p>
</blockquote>
-<h5 class="unnumbered" id="context-example-42">Con<span
+<h5 class="unnumbered" id="context-example-36">Con<span
class="tex">T<sub>e</sub>X</span>t Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb456"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb456-1"><a href="#cb456-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
-<span id="cb456-2"><a href="#cb456-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span></span>
-<span id="cb456-3"><a href="#cb456-3" aria-hidden="true" tabindex="-1"></a> [</span>
-<span id="cb456-4"><a href="#cb456-4" aria-hidden="true" tabindex="-1"></a> definitionLists = yes,</span>
-<span id="cb456-5"><a href="#cb456-5" aria-hidden="true" tabindex="-1"></a> tightLists = yes,</span>
-<span id="cb456-6"><a href="#cb456-6" aria-hidden="true" tabindex="-1"></a> ]</span>
-<span id="cb456-7"><a href="#cb456-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
-<span id="cb456-8"><a href="#cb456-8" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb456-9"><a href="#cb456-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span>
-<span id="cb456-10"><a href="#cb456-10" aria-hidden="true" tabindex="-1"></a> :<span class="co">%</span></span>
-<span id="cb456-11"><a href="#cb456-11" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span>
-<span id="cb456-12"><a href="#cb456-12" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb456-13"><a href="#cb456-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlBeginTight</span>{}</span>
-<span id="cb456-14"><a href="#cb456-14" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlItem</span>#1{<span class="co">%</span></span>
-<span id="cb456-15"><a href="#cb456-15" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span>{<span class="fu">\bf</span>#1}<span class="co">%</span></span>
-<span id="cb456-16"><a href="#cb456-16" aria-hidden="true" tabindex="-1"></a> <span class="fu">\startitemize</span></span>
-<span id="cb456-17"><a href="#cb456-17" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{<span class="co">%</span></span>
-<span id="cb456-18"><a href="#cb456-18" aria-hidden="true" tabindex="-1"></a> ,</span>
-<span id="cb456-19"><a href="#cb456-19" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{<span class="co">%</span></span>
-<span id="cb456-20"><a href="#cb456-20" aria-hidden="true" tabindex="-1"></a> , and</span>
-<span id="cb456-21"><a href="#cb456-21" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{.}<span class="co">%</span></span>
-<span id="cb456-22"><a href="#cb456-22" aria-hidden="true" tabindex="-1"></a> }<span class="co">%</span></span>
-<span id="cb456-23"><a href="#cb456-23" aria-hidden="true" tabindex="-1"></a> }<span class="co">%</span></span>
-<span id="cb456-24"><a href="#cb456-24" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb456-25"><a href="#cb456-25" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlItemEnd</span>{<span class="fu">\stopitemize</span>}</span>
-<span id="cb456-26"><a href="#cb456-26" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="fu">\item</span>}</span>
-<span id="cb456-27"><a href="#cb456-27" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlEndTight</span>{}</span>
-<span id="cb456-28"><a href="#cb456-28" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb456-29"><a href="#cb456-29" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb456-30"><a href="#cb456-30" aria-hidden="true" tabindex="-1"></a>This is a tight definition list</span>
-<span id="cb456-31"><a href="#cb456-31" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb456-32"><a href="#cb456-32" aria-hidden="true" tabindex="-1"></a>Coffee</span>
-<span id="cb456-33"><a href="#cb456-33" aria-hidden="true" tabindex="-1"></a>: black hot drink</span>
-<span id="cb456-34"><a href="#cb456-34" aria-hidden="true" tabindex="-1"></a>: prepared from roasted coffee beans</span>
-<span id="cb456-35"><a href="#cb456-35" aria-hidden="true" tabindex="-1"></a>: one of the most traded agricultural commodities in the world</span>
-<span id="cb456-36"><a href="#cb456-36" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb456-37"><a href="#cb456-37" aria-hidden="true" tabindex="-1"></a>Milk</span>
-<span id="cb456-38"><a href="#cb456-38" aria-hidden="true" tabindex="-1"></a>: white cold drink</span>
-<span id="cb456-39"><a href="#cb456-39" aria-hidden="true" tabindex="-1"></a>: nutrient-rich</span>
-<span id="cb456-40"><a href="#cb456-40" aria-hidden="true" tabindex="-1"></a>: produced on an industrial scale</span>
-<span id="cb456-41"><a href="#cb456-41" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb456-42"><a href="#cb456-42" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb456-43"><a href="#cb456-43" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span>
-<span id="cb456-44"><a href="#cb456-44" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span>
-<span id="cb456-45"><a href="#cb456-45" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb456-46"><a href="#cb456-46" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlBegin</span>{}</span>
-<span id="cb456-47"><a href="#cb456-47" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlItem</span>#1{<span class="co">%</span></span>
-<span id="cb456-48"><a href="#cb456-48" aria-hidden="true" tabindex="-1"></a> . #1 is a</span>
-<span id="cb456-49"><a href="#cb456-49" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="co">%</span></span>
-<span id="cb456-50"><a href="#cb456-50" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="co">%</span></span>
-<span id="cb456-51"><a href="#cb456-51" aria-hidden="true" tabindex="-1"></a> ,</span>
-<span id="cb456-52"><a href="#cb456-52" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{, and }<span class="co">%</span></span>
-<span id="cb456-53"><a href="#cb456-53" aria-hidden="true" tabindex="-1"></a> }<span class="co">%</span></span>
-<span id="cb456-54"><a href="#cb456-54" aria-hidden="true" tabindex="-1"></a> }<span class="co">%</span></span>
-<span id="cb456-55"><a href="#cb456-55" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb456-56"><a href="#cb456-56" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlItemEnd</span>{}</span>
-<span id="cb456-57"><a href="#cb456-57" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlDefinitionEnd</span>{}</span>
-<span id="cb456-58"><a href="#cb456-58" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlEnd</span>{.}</span>
-<span id="cb456-59"><a href="#cb456-59" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb456-60"><a href="#cb456-60" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb456-61"><a href="#cb456-61" aria-hidden="true" tabindex="-1"></a>This is a loose definition list</span>
-<span id="cb456-62"><a href="#cb456-62" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb456-63"><a href="#cb456-63" aria-hidden="true" tabindex="-1"></a>Coffee</span>
-<span id="cb456-64"><a href="#cb456-64" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb456-65"><a href="#cb456-65" aria-hidden="true" tabindex="-1"></a>: black hot drink</span>
-<span id="cb456-66"><a href="#cb456-66" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb456-67"><a href="#cb456-67" aria-hidden="true" tabindex="-1"></a>: prepared from roasted coffee beans</span>
-<span id="cb456-68"><a href="#cb456-68" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb456-69"><a href="#cb456-69" aria-hidden="true" tabindex="-1"></a>: one of the most traded agricultural commodities in the world</span>
-<span id="cb456-70"><a href="#cb456-70" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb456-71"><a href="#cb456-71" aria-hidden="true" tabindex="-1"></a>Milk</span>
-<span id="cb456-72"><a href="#cb456-72" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb456-73"><a href="#cb456-73" aria-hidden="true" tabindex="-1"></a>: white cold drink</span>
-<span id="cb456-74"><a href="#cb456-74" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb456-75"><a href="#cb456-75" aria-hidden="true" tabindex="-1"></a>: nutrient-rich</span>
-<span id="cb456-76"><a href="#cb456-76" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb456-77"><a href="#cb456-77" aria-hidden="true" tabindex="-1"></a>: produced on an industrial scale</span>
-<span id="cb456-78"><a href="#cb456-78" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb456-79"><a href="#cb456-79" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb456-80"><a href="#cb456-80" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
-<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb457"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb457-1"><a href="#cb457-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb428"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb428-1"><a href="#cb428-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
+<span id="cb428-2"><a href="#cb428-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span></span>
+<span id="cb428-3"><a href="#cb428-3" aria-hidden="true" tabindex="-1"></a> [</span>
+<span id="cb428-4"><a href="#cb428-4" aria-hidden="true" tabindex="-1"></a> definitionLists = yes,</span>
+<span id="cb428-5"><a href="#cb428-5" aria-hidden="true" tabindex="-1"></a> tightLists = yes,</span>
+<span id="cb428-6"><a href="#cb428-6" aria-hidden="true" tabindex="-1"></a> ]</span>
+<span id="cb428-7"><a href="#cb428-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
+<span id="cb428-8"><a href="#cb428-8" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb428-9"><a href="#cb428-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span>
+<span id="cb428-10"><a href="#cb428-10" aria-hidden="true" tabindex="-1"></a> :<span class="co">%</span></span>
+<span id="cb428-11"><a href="#cb428-11" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span>
+<span id="cb428-12"><a href="#cb428-12" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb428-13"><a href="#cb428-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlBeginTight</span>{}</span>
+<span id="cb428-14"><a href="#cb428-14" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlItem</span>#1{<span class="co">%</span></span>
+<span id="cb428-15"><a href="#cb428-15" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span>{<span class="fu">\bf</span>#1}<span class="co">%</span></span>
+<span id="cb428-16"><a href="#cb428-16" aria-hidden="true" tabindex="-1"></a> <span class="fu">\startitemize</span></span>
+<span id="cb428-17"><a href="#cb428-17" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{<span class="co">%</span></span>
+<span id="cb428-18"><a href="#cb428-18" aria-hidden="true" tabindex="-1"></a> ,</span>
+<span id="cb428-19"><a href="#cb428-19" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{<span class="co">%</span></span>
+<span id="cb428-20"><a href="#cb428-20" aria-hidden="true" tabindex="-1"></a> , and</span>
+<span id="cb428-21"><a href="#cb428-21" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{.}<span class="co">%</span></span>
+<span id="cb428-22"><a href="#cb428-22" aria-hidden="true" tabindex="-1"></a> }<span class="co">%</span></span>
+<span id="cb428-23"><a href="#cb428-23" aria-hidden="true" tabindex="-1"></a> }<span class="co">%</span></span>
+<span id="cb428-24"><a href="#cb428-24" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb428-25"><a href="#cb428-25" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlItemEnd</span>{<span class="fu">\stopitemize</span>}</span>
+<span id="cb428-26"><a href="#cb428-26" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="fu">\item</span>}</span>
+<span id="cb428-27"><a href="#cb428-27" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlEndTight</span>{}</span>
+<span id="cb428-28"><a href="#cb428-28" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb428-29"><a href="#cb428-29" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb428-30"><a href="#cb428-30" aria-hidden="true" tabindex="-1"></a>This is a tight definition list</span>
+<span id="cb428-31"><a href="#cb428-31" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb428-32"><a href="#cb428-32" aria-hidden="true" tabindex="-1"></a>Coffee</span>
+<span id="cb428-33"><a href="#cb428-33" aria-hidden="true" tabindex="-1"></a>: black hot drink</span>
+<span id="cb428-34"><a href="#cb428-34" aria-hidden="true" tabindex="-1"></a>: prepared from roasted coffee beans</span>
+<span id="cb428-35"><a href="#cb428-35" aria-hidden="true" tabindex="-1"></a>: one of the most traded agricultural commodities in the world</span>
+<span id="cb428-36"><a href="#cb428-36" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb428-37"><a href="#cb428-37" aria-hidden="true" tabindex="-1"></a>Milk</span>
+<span id="cb428-38"><a href="#cb428-38" aria-hidden="true" tabindex="-1"></a>: white cold drink</span>
+<span id="cb428-39"><a href="#cb428-39" aria-hidden="true" tabindex="-1"></a>: nutrient-rich</span>
+<span id="cb428-40"><a href="#cb428-40" aria-hidden="true" tabindex="-1"></a>: produced on an industrial scale</span>
+<span id="cb428-41"><a href="#cb428-41" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb428-42"><a href="#cb428-42" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb428-43"><a href="#cb428-43" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span>
+<span id="cb428-44"><a href="#cb428-44" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span>
+<span id="cb428-45"><a href="#cb428-45" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb428-46"><a href="#cb428-46" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlBegin</span>{}</span>
+<span id="cb428-47"><a href="#cb428-47" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlItem</span>#1{<span class="co">%</span></span>
+<span id="cb428-48"><a href="#cb428-48" aria-hidden="true" tabindex="-1"></a> . #1 is a</span>
+<span id="cb428-49"><a href="#cb428-49" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="co">%</span></span>
+<span id="cb428-50"><a href="#cb428-50" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="co">%</span></span>
+<span id="cb428-51"><a href="#cb428-51" aria-hidden="true" tabindex="-1"></a> ,</span>
+<span id="cb428-52"><a href="#cb428-52" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{, and }<span class="co">%</span></span>
+<span id="cb428-53"><a href="#cb428-53" aria-hidden="true" tabindex="-1"></a> }<span class="co">%</span></span>
+<span id="cb428-54"><a href="#cb428-54" aria-hidden="true" tabindex="-1"></a> }<span class="co">%</span></span>
+<span id="cb428-55"><a href="#cb428-55" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb428-56"><a href="#cb428-56" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlItemEnd</span>{}</span>
+<span id="cb428-57"><a href="#cb428-57" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlDefinitionEnd</span>{}</span>
+<span id="cb428-58"><a href="#cb428-58" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlEnd</span>{.}</span>
+<span id="cb428-59"><a href="#cb428-59" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb428-60"><a href="#cb428-60" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb428-61"><a href="#cb428-61" aria-hidden="true" tabindex="-1"></a>This is a loose definition list</span>
+<span id="cb428-62"><a href="#cb428-62" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb428-63"><a href="#cb428-63" aria-hidden="true" tabindex="-1"></a>Coffee</span>
+<span id="cb428-64"><a href="#cb428-64" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb428-65"><a href="#cb428-65" aria-hidden="true" tabindex="-1"></a>: black hot drink</span>
+<span id="cb428-66"><a href="#cb428-66" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb428-67"><a href="#cb428-67" aria-hidden="true" tabindex="-1"></a>: prepared from roasted coffee beans</span>
+<span id="cb428-68"><a href="#cb428-68" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb428-69"><a href="#cb428-69" aria-hidden="true" tabindex="-1"></a>: one of the most traded agricultural commodities in the world</span>
+<span id="cb428-70"><a href="#cb428-70" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb428-71"><a href="#cb428-71" aria-hidden="true" tabindex="-1"></a>Milk</span>
+<span id="cb428-72"><a href="#cb428-72" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb428-73"><a href="#cb428-73" aria-hidden="true" tabindex="-1"></a>: white cold drink</span>
+<span id="cb428-74"><a href="#cb428-74" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb428-75"><a href="#cb428-75" aria-hidden="true" tabindex="-1"></a>: nutrient-rich</span>
+<span id="cb428-76"><a href="#cb428-76" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb428-77"><a href="#cb428-77" aria-hidden="true" tabindex="-1"></a>: produced on an industrial scale</span>
+<span id="cb428-78"><a href="#cb428-78" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb428-79"><a href="#cb428-79" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb428-80"><a href="#cb428-80" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
+<p>Next, invoke LuaTeX from the terminal:</p>
+<div class="sourceCode" id="cb429"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb429-1"><a href="#cb429-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -8322,81 +7726,155 @@ prepared from roasted coffee beans, and one of the most traded
agricultural commodities in the world. Milk is a white cold drink,
nutrient-rich, and produced on an industrial scale.</p>
</blockquote>
-<h4 data-number="2.3.1.15" id="emphasis-renderers"><span
-class="header-section-number">2.3.1.15</span> Emphasis Renderers</h4>
+<h4 data-number="2.3.1.9" id="ellipsis-renderer"><span
+class="header-section-number">2.3.1.9</span> Ellipsis Renderer</h4>
+<p>The <code>\markdownRendererEllipsis</code> macro replaces any
+occurance of ASCII ellipses in the input text. This macro will only be
+produced, when the <strong><code>smartEllipses</code></strong> option is
+enabled. The macro receives no arguments.</p>
+<h5 class="unnumbered" id="plain-tex-example-23">Plain <span
+class="tex">T<sub>e</sub>X</span> Example</h5>
+<p>Using a text editor, create a text document named
+<code>document.tex</code> with the following content:</p>
+<div class="sourceCode" id="cb430"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb430-1"><a href="#cb430-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
+<span id="cb430-2"><a href="#cb430-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionSmartEllipses</span>{true}</span>
+<span id="cb430-3"><a href="#cb430-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererEllipsis</span>{{<span class="fu">\it</span> SHAZAM}!}</span>
+<span id="cb430-4"><a href="#cb430-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
+<span id="cb430-5"><a href="#cb430-5" aria-hidden="true" tabindex="-1"></a>The secret word is ...</span>
+<span id="cb430-6"><a href="#cb430-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
+<span id="cb430-7"><a href="#cb430-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
+<p>Next, invoke LuaTeX from the terminal:</p>
+<div class="sourceCode" id="cb431"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb431-1"><a href="#cb431-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
+<p>A PDF document named <code>document.pdf</code> should be produced and
+contain the following text:</p>
+<blockquote>
+<p>The secret word is <em>SHAZAM</em>!</p>
+</blockquote>
+<h5 class="unnumbered" id="latex-example-55"><span
+class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
+<p>Using a text editor, create a text document named
+<code>document.tex</code> with the following content:</p>
+<div class="sourceCode" id="cb432"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb432-1"><a href="#cb432-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb432-2"><a href="#cb432-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[smartEllipses]{<span class="ex">markdown</span>}</span>
+<span id="cb432-3"><a href="#cb432-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
+<span id="cb432-4"><a href="#cb432-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
+<span id="cb432-5"><a href="#cb432-5" aria-hidden="true" tabindex="-1"></a> ellipsis = <span class="fu">\emph</span>{SHAZAM}!,</span>
+<span id="cb432-6"><a href="#cb432-6" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb432-7"><a href="#cb432-7" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb432-8"><a href="#cb432-8" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb432-9"><a href="#cb432-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb432-10"><a href="#cb432-10" aria-hidden="true" tabindex="-1"></a>The secret word is ...</span>
+<span id="cb432-11"><a href="#cb432-11" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb432-12"><a href="#cb432-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<p>Next, invoke LuaTeX from the terminal:</p>
+<div class="sourceCode" id="cb433"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb433-1"><a href="#cb433-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+<p>A PDF document named <code>document.pdf</code> should be produced and
+contain the following text:</p>
+<blockquote>
+<p>The secret word is <em>SHAZAM</em>!</p>
+</blockquote>
+<h5 class="unnumbered" id="context-example-37">Con<span
+class="tex">T<sub>e</sub>X</span>t Example</h5>
+<p>Using a text editor, create a text document named
+<code>document.tex</code> with the following content:</p>
+<div class="sourceCode" id="cb434"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb434-1"><a href="#cb434-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
+<span id="cb434-2"><a href="#cb434-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[smartEllipses = yes]</span>
+<span id="cb434-3"><a href="#cb434-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererEllipsis</span>{<span class="fu">\emph</span>{SHAZAM}!}</span>
+<span id="cb434-4"><a href="#cb434-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
+<span id="cb434-5"><a href="#cb434-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb434-6"><a href="#cb434-6" aria-hidden="true" tabindex="-1"></a>The secret word is ...</span>
+<span id="cb434-7"><a href="#cb434-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb434-8"><a href="#cb434-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
+<p>Next, invoke LuaTeX from the terminal:</p>
+<div class="sourceCode" id="cb435"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb435-1"><a href="#cb435-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
+<p>A PDF document named <code>document.pdf</code> should be produced and
+contain the following text:</p>
+<blockquote>
+<p>Hello <em>world</em>!</p>
+<p><em>(The end of a block)</em></p>
+<p><em>Foo</em> bar!</p>
+</blockquote>
+<h4 data-number="2.3.1.10" id="emphasis-renderers"><span
+class="header-section-number">2.3.1.10</span> Emphasis Renderers</h4>
<p>The <code>\markdownRendererEmphasis</code> macro represents an
emphasized span of text. The macro receives a single argument that
corresponds to the emphasized span of text.</p>
-<h5 class="unnumbered" id="plain-tex-example-28">Plain <span
+<h5 class="unnumbered" id="plain-tex-example-24">Plain <span
class="tex">T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb458"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb458-1"><a href="#cb458-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
-<span id="cb458-2"><a href="#cb458-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererEmphasis</span>#1{{<span class="fu">\it</span>#1}}</span>
-<span id="cb458-3"><a href="#cb458-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererStrongEmphasis</span>#1{{<span class="fu">\bf</span>#1}}</span>
-<span id="cb458-4"><a href="#cb458-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
-<span id="cb458-5"><a href="#cb458-5" aria-hidden="true" tabindex="-1"></a>This is *emphasis*.</span>
-<span id="cb458-6"><a href="#cb458-6" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb458-7"><a href="#cb458-7" aria-hidden="true" tabindex="-1"></a>This is **strong emphasis**.</span>
-<span id="cb458-8"><a href="#cb458-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
-<span id="cb458-9"><a href="#cb458-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
+<div class="sourceCode" id="cb436"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb436-1"><a href="#cb436-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
+<span id="cb436-2"><a href="#cb436-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererEmphasis</span>#1{{<span class="fu">\it</span>#1}}</span>
+<span id="cb436-3"><a href="#cb436-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererStrongEmphasis</span>#1{{<span class="fu">\bf</span>#1}}</span>
+<span id="cb436-4"><a href="#cb436-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
+<span id="cb436-5"><a href="#cb436-5" aria-hidden="true" tabindex="-1"></a>This is *emphasis*.</span>
+<span id="cb436-6"><a href="#cb436-6" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb436-7"><a href="#cb436-7" aria-hidden="true" tabindex="-1"></a>This is **strong emphasis**.</span>
+<span id="cb436-8"><a href="#cb436-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
+<span id="cb436-9"><a href="#cb436-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb459"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb459-1"><a href="#cb459-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb437"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb437-1"><a href="#cb437-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
<p>This is <em>emphasis</em>.</p>
<p>This is <strong>strong emphasis</strong>.</p>
</blockquote>
-<h5 class="unnumbered" id="latex-example-58"><span
+<h5 class="unnumbered" id="latex-example-56"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb460"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb460-1"><a href="#cb460-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb460-2"><a href="#cb460-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span>
-<span id="cb460-3"><a href="#cb460-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
-<span id="cb460-4"><a href="#cb460-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
-<span id="cb460-5"><a href="#cb460-5" aria-hidden="true" tabindex="-1"></a> emphasis = {<span class="fu">\emph</span>{#1}},</span>
-<span id="cb460-6"><a href="#cb460-6" aria-hidden="true" tabindex="-1"></a> strongEmphasis = {<span class="fu">\textbf</span>{#1}},</span>
-<span id="cb460-7"><a href="#cb460-7" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb460-8"><a href="#cb460-8" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb460-9"><a href="#cb460-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb460-10"><a href="#cb460-10" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb460-11"><a href="#cb460-11" aria-hidden="true" tabindex="-1"></a>This is *emphasis*.</span>
-<span id="cb460-12"><a href="#cb460-12" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb460-13"><a href="#cb460-13" aria-hidden="true" tabindex="-1"></a>This is **strong emphasis**.</span>
-<span id="cb460-14"><a href="#cb460-14" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb460-15"><a href="#cb460-15" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<div class="sourceCode" id="cb438"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb438-1"><a href="#cb438-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb438-2"><a href="#cb438-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span>
+<span id="cb438-3"><a href="#cb438-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
+<span id="cb438-4"><a href="#cb438-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
+<span id="cb438-5"><a href="#cb438-5" aria-hidden="true" tabindex="-1"></a> emphasis = {<span class="fu">\emph</span>{#1}},</span>
+<span id="cb438-6"><a href="#cb438-6" aria-hidden="true" tabindex="-1"></a> strongEmphasis = {<span class="fu">\textbf</span>{#1}},</span>
+<span id="cb438-7"><a href="#cb438-7" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb438-8"><a href="#cb438-8" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb438-9"><a href="#cb438-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb438-10"><a href="#cb438-10" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb438-11"><a href="#cb438-11" aria-hidden="true" tabindex="-1"></a>This is *emphasis*.</span>
+<span id="cb438-12"><a href="#cb438-12" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb438-13"><a href="#cb438-13" aria-hidden="true" tabindex="-1"></a>This is **strong emphasis**.</span>
+<span id="cb438-14"><a href="#cb438-14" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb438-15"><a href="#cb438-15" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb461"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb461-1"><a href="#cb461-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb439"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb439-1"><a href="#cb439-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
<p>This is <em>emphasis</em>.</p>
<p>This is <strong>strong emphasis</strong>.</p>
</blockquote>
-<h5 class="unnumbered" id="context-example-43">Con<span
+<h5 class="unnumbered" id="context-example-38">Con<span
class="tex">T<sub>e</sub>X</span>t Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb462"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb462-1"><a href="#cb462-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
-<span id="cb462-2"><a href="#cb462-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererEmphasis</span>#1{<span class="fu">\emph</span>{#1}}</span>
-<span id="cb462-3"><a href="#cb462-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererStrongEmphasis</span>#1{<span class="fu">\bold</span>{#1}}</span>
-<span id="cb462-4"><a href="#cb462-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
-<span id="cb462-5"><a href="#cb462-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb462-6"><a href="#cb462-6" aria-hidden="true" tabindex="-1"></a>This is *emphasis*.</span>
-<span id="cb462-7"><a href="#cb462-7" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb462-8"><a href="#cb462-8" aria-hidden="true" tabindex="-1"></a>This is **strong emphasis**.</span>
-<span id="cb462-9"><a href="#cb462-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb462-10"><a href="#cb462-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
+<div class="sourceCode" id="cb440"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb440-1"><a href="#cb440-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
+<span id="cb440-2"><a href="#cb440-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererEmphasis</span>#1{<span class="fu">\emph</span>{#1}}</span>
+<span id="cb440-3"><a href="#cb440-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererStrongEmphasis</span>#1{<span class="fu">\bold</span>{#1}}</span>
+<span id="cb440-4"><a href="#cb440-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
+<span id="cb440-5"><a href="#cb440-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb440-6"><a href="#cb440-6" aria-hidden="true" tabindex="-1"></a>This is *emphasis*.</span>
+<span id="cb440-7"><a href="#cb440-7" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb440-8"><a href="#cb440-8" aria-hidden="true" tabindex="-1"></a>This is **strong emphasis**.</span>
+<span id="cb440-9"><a href="#cb440-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb440-10"><a href="#cb440-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb463"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb463-1"><a href="#cb463-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb441"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb441-1"><a href="#cb441-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
@@ -8406,515 +7884,906 @@ contain the following text:</p>
<p>The <code>\markdownRendererStrongEmphasis</code> macro represents a
strongly emphasized span of text. The macro receives a single argument
that corresponds to the emphasized span of text.</p>
-<h4 data-number="2.3.1.16" id="block-quote-renderers"><span
-class="header-section-number">2.3.1.16</span> Block Quote Renderers</h4>
-<p>The <code>\markdownRendererBlockQuoteBegin</code> macro represents
-the beginning of a block quote. The macro receives no arguments.</p>
-<p>The <code>\markdownRendererBlockQuoteEnd</code> macro represents the
-end of a block quote. The macro receives no arguments.</p>
-<h5 class="unnumbered" id="plain-tex-example-29">Plain <span
-class="tex">T<sub>e</sub>X</span> Example</h5>
+<h4 data-number="2.3.1.11" id="fenced-div-context-renderers"><span
+class="header-section-number">2.3.1.11</span> Fenced Div Context
+Renderers</h4>
+<p>The following macros are only produced, when the
+<strong><code>fencedDiv</code></strong> option is enabled.</p>
+<p>The <code>\markdownRendererFencedDivAttributeContextBegin</code> and
+<code>\markdownRendererFencedDivAttributeContextEnd</code> macros
+represent the beginning and the end of a div in which the attributes of
+the div apply. The macros receive no arguments.</p>
+<h5 class="unnumbered" id="latex-example-57"><span
+class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb464"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb464-1"><a href="#cb464-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
-<span id="cb464-2"><a href="#cb464-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererBlockQuoteBegin</span>{<span class="co">%</span></span>
-<span id="cb464-3"><a href="#cb464-3" aria-hidden="true" tabindex="-1"></a> <span class="fu">\begingroup</span></span>
-<span id="cb464-4"><a href="#cb464-4" aria-hidden="true" tabindex="-1"></a> <span class="fu">\vskip\parindent</span></span>
-<span id="cb464-5"><a href="#cb464-5" aria-hidden="true" tabindex="-1"></a> <span class="fu">\leftskip</span>=2<span class="fu">\parindent</span></span>
-<span id="cb464-6"><a href="#cb464-6" aria-hidden="true" tabindex="-1"></a> <span class="fu">\parindent</span>=0pt</span>
-<span id="cb464-7"><a href="#cb464-7" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb464-8"><a href="#cb464-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererBlockQuoteEnd</span>{<span class="co">%</span></span>
-<span id="cb464-9"><a href="#cb464-9" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
-<span id="cb464-10"><a href="#cb464-10" aria-hidden="true" tabindex="-1"></a> <span class="fu">\vskip\parindent</span></span>
-<span id="cb464-11"><a href="#cb464-11" aria-hidden="true" tabindex="-1"></a> <span class="fu">\endgroup</span></span>
-<span id="cb464-12"><a href="#cb464-12" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb464-13"><a href="#cb464-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
-<span id="cb464-14"><a href="#cb464-14" aria-hidden="true" tabindex="-1"></a>A quote from William Shakespeare&#39;s King Lear:</span>
-<span id="cb464-15"><a href="#cb464-15" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb464-16"><a href="#cb464-16" aria-hidden="true" tabindex="-1"></a>&gt; This is the excellent foppery of the world that when we are</span>
-<span id="cb464-17"><a href="#cb464-17" aria-hidden="true" tabindex="-1"></a>&gt; sick in fortune---often the surfeit of our own behavior---we</span>
-<span id="cb464-18"><a href="#cb464-18" aria-hidden="true" tabindex="-1"></a>&gt; make guilty of our disasters the sun, the moon, and the</span>
-<span id="cb464-19"><a href="#cb464-19" aria-hidden="true" tabindex="-1"></a>&gt; stars [...]</span>
-<span id="cb464-20"><a href="#cb464-20" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
-<span id="cb464-21"><a href="#cb464-21" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
+<div class="sourceCode" id="cb442"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb442-1"><a href="#cb442-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb442-2"><a href="#cb442-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[fencedDiv]{<span class="ex">markdown</span>}</span>
+<span id="cb442-3"><a href="#cb442-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
+<span id="cb442-4"><a href="#cb442-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
+<span id="cb442-5"><a href="#cb442-5" aria-hidden="true" tabindex="-1"></a> fencedDivAttributeContextBegin = {<span class="co">%</span></span>
+<span id="cb442-6"><a href="#cb442-6" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
+<span id="cb442-7"><a href="#cb442-7" aria-hidden="true" tabindex="-1"></a> <span class="fu">\emph</span>{(The beginning of a fenced div attribute context)}</span>
+<span id="cb442-8"><a href="#cb442-8" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
+<span id="cb442-9"><a href="#cb442-9" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb442-10"><a href="#cb442-10" aria-hidden="true" tabindex="-1"></a> fencedDivAttributeContextEnd = {<span class="co">%</span></span>
+<span id="cb442-11"><a href="#cb442-11" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
+<span id="cb442-12"><a href="#cb442-12" aria-hidden="true" tabindex="-1"></a> <span class="fu">\emph</span>{(The end of a fenced div attribute context)}</span>
+<span id="cb442-13"><a href="#cb442-13" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
+<span id="cb442-14"><a href="#cb442-14" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb442-15"><a href="#cb442-15" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb442-16"><a href="#cb442-16" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb442-17"><a href="#cb442-17" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb442-18"><a href="#cb442-18" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb442-19"><a href="#cb442-19" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb442-20"><a href="#cb442-20" aria-hidden="true" tabindex="-1"></a>::: {key=value}</span>
+<span id="cb442-21"><a href="#cb442-21" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb442-22"><a href="#cb442-22" aria-hidden="true" tabindex="-1"></a>foo</span>
+<span id="cb442-23"><a href="#cb442-23" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb442-24"><a href="#cb442-24" aria-hidden="true" tabindex="-1"></a>:::: {#identifier}</span>
+<span id="cb442-25"><a href="#cb442-25" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb442-26"><a href="#cb442-26" aria-hidden="true" tabindex="-1"></a>bar</span>
+<span id="cb442-27"><a href="#cb442-27" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb442-28"><a href="#cb442-28" aria-hidden="true" tabindex="-1"></a>::::</span>
+<span id="cb442-29"><a href="#cb442-29" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb442-30"><a href="#cb442-30" aria-hidden="true" tabindex="-1"></a>:::</span>
+<span id="cb442-31"><a href="#cb442-31" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb442-32"><a href="#cb442-32" aria-hidden="true" tabindex="-1"></a>::: {.class_name}</span>
+<span id="cb442-33"><a href="#cb442-33" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb442-34"><a href="#cb442-34" aria-hidden="true" tabindex="-1"></a>baz</span>
+<span id="cb442-35"><a href="#cb442-35" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb442-36"><a href="#cb442-36" aria-hidden="true" tabindex="-1"></a>:::</span>
+<span id="cb442-37"><a href="#cb442-37" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb442-38"><a href="#cb442-38" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb442-39"><a href="#cb442-39" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb465"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb465-1"><a href="#cb465-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb443"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb443-1"><a href="#cb443-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
-<p>A quote from William Shakespeare’s King Lear:</p>
+<p><em>(The beginning of a fenced div attribute context)</em></p>
+<p>foo</p>
+<p><em>(The beginning of a fenced div attribute context)</em></p>
+<p>bar</p>
+<p><em>(The end of a fenced div attribute context)</em></p>
+<p><em>(The end of a fenced div attribute context)</em></p>
+<p><em>(The beginning of a fenced div attribute context)</em></p>
+<p>baz</p>
+<p><em>(The end of a fenced div attribute context)</em></p>
+</blockquote>
+<h4 data-number="2.3.1.12" id="header-attribute-context-renderers"><span
+class="header-section-number">2.3.1.12</span> Header Attribute Context
+Renderers</h4>
+<p>The following macros are only produced, when the
+<strong><code>headerAttributes</code></strong> option is enabled.</p>
+<p>The <code>\markdownRendererHeaderAttributeContextBegin</code> and
+<code>\markdownRendererHeaderAttributeContextEnd</code> macros represent
+the beginning and the end of a section in which the attributes of a
+heading apply. The macros receive no arguments.</p>
+<h5 class="unnumbered" id="latex-example-58"><span
+class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
+<p>Using a text editor, create a text document named
+<code>document.tex</code> with the following content:</p>
+<div class="sourceCode" id="cb444"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb444-1"><a href="#cb444-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb444-2"><a href="#cb444-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[headerAttributes]{<span class="ex">markdown</span>}</span>
+<span id="cb444-3"><a href="#cb444-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
+<span id="cb444-4"><a href="#cb444-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
+<span id="cb444-5"><a href="#cb444-5" aria-hidden="true" tabindex="-1"></a> headerAttributeContextBegin = {<span class="co">%</span></span>
+<span id="cb444-6"><a href="#cb444-6" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
+<span id="cb444-7"><a href="#cb444-7" aria-hidden="true" tabindex="-1"></a> <span class="fu">\emph</span>{(The beginning of a header attribute context)}</span>
+<span id="cb444-8"><a href="#cb444-8" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
+<span id="cb444-9"><a href="#cb444-9" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb444-10"><a href="#cb444-10" aria-hidden="true" tabindex="-1"></a> headerAttributeContextEnd = {<span class="co">%</span></span>
+<span id="cb444-11"><a href="#cb444-11" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
+<span id="cb444-12"><a href="#cb444-12" aria-hidden="true" tabindex="-1"></a> <span class="fu">\emph</span>{(The end of a header attribute context)}</span>
+<span id="cb444-13"><a href="#cb444-13" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
+<span id="cb444-14"><a href="#cb444-14" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb444-15"><a href="#cb444-15" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb444-16"><a href="#cb444-16" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb444-17"><a href="#cb444-17" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb444-18"><a href="#cb444-18" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb444-19"><a href="#cb444-19" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb444-20"><a href="#cb444-20" aria-hidden="true" tabindex="-1"></a># First top-level heading</span>
+<span id="cb444-21"><a href="#cb444-21" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb444-22"><a href="#cb444-22" aria-hidden="true" tabindex="-1"></a>## A subheading {#identifier}</span>
+<span id="cb444-23"><a href="#cb444-23" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb444-24"><a href="#cb444-24" aria-hidden="true" tabindex="-1"></a># Second top-level heading {.class_name}</span>
+<span id="cb444-25"><a href="#cb444-25" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb444-26"><a href="#cb444-26" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb444-27"><a href="#cb444-27" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<p>Next, invoke LuaTeX from the terminal:</p>
+<div class="sourceCode" id="cb445"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb445-1"><a href="#cb445-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+<p>A PDF document named <code>document.pdf</code> should be produced and
+contain the following text:</p>
<blockquote>
-<p>This is the excellent foppery of the world that when we are sick in
-fortune—often the surfeit of our own behavior—we make guilty of our
-disasters the sun, the moon, and the stars […]</p>
+<h1 id="first-top-level-heading-1">First top-level heading</h1>
+<p><em>(The beginning of a header attribute context)</em></p>
+<h2 id="a-subheading-1">A subheading</h2>
+<p><em>(The end of a header attribute context)</em></p>
+<p><em>(The beginning of a header attribute context)</em></p>
+<h1 id="second-top-level-heading-1">Second top-level heading</h1>
+<p><em>(The end of a header attribute context)</em></p>
</blockquote>
+<h4 data-number="2.3.1.13" id="heading-renderers"><span
+class="header-section-number">2.3.1.13</span> Heading Renderers</h4>
+<p>The <code>\markdownRendererHeadingOne</code> macro represents a first
+level heading. The macro receives a single argument that corresponds to
+the heading text.</p>
+<p>The <code>\markdownRendererHeadingTwo</code> macro represents a
+second level heading. The macro receives a single argument that
+corresponds to the heading text.</p>
+<p>The <code>\markdownRendererHeadingThree</code> macro represents a
+third level heading. The macro receives a single argument that
+corresponds to the heading text.</p>
+<p>The <code>\markdownRendererHeadingFour</code> macro represents a
+fourth level heading. The macro receives a single argument that
+corresponds to the heading text.</p>
+<p>The <code>\markdownRendererHeadingFive</code> macro represents a
+fifth level heading. The macro receives a single argument that
+corresponds to the heading text.</p>
+<p>The <code>\markdownRendererHeadingSix</code> macro represents a sixth
+level heading. The macro receives a single argument that corresponds to
+the heading text.</p>
+<h5 class="unnumbered" id="plain-tex-example-25">Plain <span
+class="tex">T<sub>e</sub>X</span> Example</h5>
+<p>Using a text editor, create a text document named
+<code>document.tex</code> with the following content:</p>
+<div class="sourceCode" id="cb446"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb446-1"><a href="#cb446-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
+<span id="cb446-2"><a href="#cb446-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{}</span>
+<span id="cb446-3"><a href="#cb446-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHeadingOne</span>{1}</span>
+<span id="cb446-4"><a href="#cb446-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHeadingTwo</span>{2}</span>
+<span id="cb446-5"><a href="#cb446-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHeadingThree</span>{3}</span>
+<span id="cb446-6"><a href="#cb446-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHeadingFour</span>{4}</span>
+<span id="cb446-7"><a href="#cb446-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHeadingFive</span>{5}</span>
+<span id="cb446-8"><a href="#cb446-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHeadingSix</span>{6}</span>
+<span id="cb446-9"><a href="#cb446-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
+<span id="cb446-10"><a href="#cb446-10" aria-hidden="true" tabindex="-1"></a>######</span>
+<span id="cb446-11"><a href="#cb446-11" aria-hidden="true" tabindex="-1"></a>#####</span>
+<span id="cb446-12"><a href="#cb446-12" aria-hidden="true" tabindex="-1"></a>#####</span>
+<span id="cb446-13"><a href="#cb446-13" aria-hidden="true" tabindex="-1"></a>###</span>
+<span id="cb446-14"><a href="#cb446-14" aria-hidden="true" tabindex="-1"></a>######</span>
+<span id="cb446-15"><a href="#cb446-15" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
+<span id="cb446-16"><a href="#cb446-16" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
+<p>Next, invoke LuaTeX from the terminal:</p>
+<div class="sourceCode" id="cb447"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb447-1"><a href="#cb447-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
+<p>A PDF document named <code>document.pdf</code> should be produced and
+contain the following text:</p>
+<blockquote>
+<p>65536</p>
</blockquote>
<h5 class="unnumbered" id="latex-example-59"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb466"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb466-1"><a href="#cb466-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb466-2"><a href="#cb466-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span>
-<span id="cb466-3"><a href="#cb466-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
-<span id="cb466-4"><a href="#cb466-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
-<span id="cb466-5"><a href="#cb466-5" aria-hidden="true" tabindex="-1"></a> blockQuoteBegin = {<span class="kw">\begin</span>{<span class="ex">quote</span>}},</span>
-<span id="cb466-6"><a href="#cb466-6" aria-hidden="true" tabindex="-1"></a> blockQuoteEnd = {<span class="kw">\end</span>{<span class="ex">quote</span>}},</span>
-<span id="cb466-7"><a href="#cb466-7" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb466-8"><a href="#cb466-8" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb466-9"><a href="#cb466-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb466-10"><a href="#cb466-10" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb466-11"><a href="#cb466-11" aria-hidden="true" tabindex="-1"></a>A quote from William Shakespeare&#39;s King Lear:</span>
-<span id="cb466-12"><a href="#cb466-12" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb466-13"><a href="#cb466-13" aria-hidden="true" tabindex="-1"></a>&gt; This is the excellent foppery of the world that when we are</span>
-<span id="cb466-14"><a href="#cb466-14" aria-hidden="true" tabindex="-1"></a>&gt; sick in fortune---often the surfeit of our own behavior---we</span>
-<span id="cb466-15"><a href="#cb466-15" aria-hidden="true" tabindex="-1"></a>&gt; make guilty of our disasters the sun, the moon, and the</span>
-<span id="cb466-16"><a href="#cb466-16" aria-hidden="true" tabindex="-1"></a>&gt; stars [...]</span>
-<span id="cb466-17"><a href="#cb466-17" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb466-18"><a href="#cb466-18" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<div class="sourceCode" id="cb448"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb448-1"><a href="#cb448-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb448-2"><a href="#cb448-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span>
+<span id="cb448-3"><a href="#cb448-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
+<span id="cb448-4"><a href="#cb448-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
+<span id="cb448-5"><a href="#cb448-5" aria-hidden="true" tabindex="-1"></a> interblockSeparator = {},</span>
+<span id="cb448-6"><a href="#cb448-6" aria-hidden="true" tabindex="-1"></a> headingOne = 1,</span>
+<span id="cb448-7"><a href="#cb448-7" aria-hidden="true" tabindex="-1"></a> headingTwo = 2,</span>
+<span id="cb448-8"><a href="#cb448-8" aria-hidden="true" tabindex="-1"></a> headingThree = 3,</span>
+<span id="cb448-9"><a href="#cb448-9" aria-hidden="true" tabindex="-1"></a> headingFour = 4,</span>
+<span id="cb448-10"><a href="#cb448-10" aria-hidden="true" tabindex="-1"></a> headingFive = 5,</span>
+<span id="cb448-11"><a href="#cb448-11" aria-hidden="true" tabindex="-1"></a> headingSix = 6,</span>
+<span id="cb448-12"><a href="#cb448-12" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb448-13"><a href="#cb448-13" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb448-14"><a href="#cb448-14" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb448-15"><a href="#cb448-15" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb448-16"><a href="#cb448-16" aria-hidden="true" tabindex="-1"></a>######</span>
+<span id="cb448-17"><a href="#cb448-17" aria-hidden="true" tabindex="-1"></a>#####</span>
+<span id="cb448-18"><a href="#cb448-18" aria-hidden="true" tabindex="-1"></a>#####</span>
+<span id="cb448-19"><a href="#cb448-19" aria-hidden="true" tabindex="-1"></a>###</span>
+<span id="cb448-20"><a href="#cb448-20" aria-hidden="true" tabindex="-1"></a>######</span>
+<span id="cb448-21"><a href="#cb448-21" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb448-22"><a href="#cb448-22" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb467"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb467-1"><a href="#cb467-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb449"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb449-1"><a href="#cb449-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
-<p>A quote from William Shakespeare’s King Lear:</p>
+<p>65536</p>
+</blockquote>
+<h5 class="unnumbered" id="context-example-39">Con<span
+class="tex">T<sub>e</sub>X</span>t Example</h5>
+<p>Using a text editor, create a text document named
+<code>document.tex</code> with the following content:</p>
+<div class="sourceCode" id="cb450"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb450-1"><a href="#cb450-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
+<span id="cb450-2"><a href="#cb450-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{}</span>
+<span id="cb450-3"><a href="#cb450-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHeadingOne</span>{1}</span>
+<span id="cb450-4"><a href="#cb450-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHeadingTwo</span>{2}</span>
+<span id="cb450-5"><a href="#cb450-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHeadingThree</span>{3}</span>
+<span id="cb450-6"><a href="#cb450-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHeadingFour</span>{4}</span>
+<span id="cb450-7"><a href="#cb450-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHeadingFive</span>{5}</span>
+<span id="cb450-8"><a href="#cb450-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHeadingSix</span>{6}</span>
+<span id="cb450-9"><a href="#cb450-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
+<span id="cb450-10"><a href="#cb450-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb450-11"><a href="#cb450-11" aria-hidden="true" tabindex="-1"></a>######</span>
+<span id="cb450-12"><a href="#cb450-12" aria-hidden="true" tabindex="-1"></a>#####</span>
+<span id="cb450-13"><a href="#cb450-13" aria-hidden="true" tabindex="-1"></a>#####</span>
+<span id="cb450-14"><a href="#cb450-14" aria-hidden="true" tabindex="-1"></a>###</span>
+<span id="cb450-15"><a href="#cb450-15" aria-hidden="true" tabindex="-1"></a>######</span>
+<span id="cb450-16"><a href="#cb450-16" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb450-17"><a href="#cb450-17" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
+<p>Next, invoke LuaTeX from the terminal:</p>
+<div class="sourceCode" id="cb451"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb451-1"><a href="#cb451-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
+<p>A PDF document named <code>document.pdf</code> should be produced and
+contain the following text:</p>
<blockquote>
-<p>This is the excellent foppery of the world that when we are sick in
-fortune—often the surfeit of our own behavior—we make guilty of our
-disasters the sun, the moon, and the stars […]</p>
+<p>65536</p>
+</blockquote>
+<h4 data-number="2.3.1.14" id="html-comment-renderers"><span
+class="header-section-number">2.3.1.14</span> HTML Comment
+Renderers</h4>
+<p>The <code>\markdownRendererInlineHtmlComment</code> macro represents
+the contents of an inline <abbr>HTML</abbr> comment. This macro will
+only be produced, when the <strong><code>html</code></strong> option is
+enabled. The macro receives a single argument that corresponds to the
+contents of the <abbr>HTML</abbr> comment.</p>
+<p>The <code>\markdownRendererBlockHtmlCommentBegin</code> and
+<code>\markdownRendererBlockHtmlCommentEnd</code> macros represent the
+beginning and the end of a block <abbr>HTML</abbr> comment. The macros
+receive no arguments.</p>
+<h5 class="unnumbered" id="latex-example-60"><span
+class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
+<p>Using a text editor, create a text document named
+<code>document.tex</code> with the following content:</p>
+<div class="sourceCode" id="cb452"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb452-1"><a href="#cb452-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb452-2"><a href="#cb452-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[html]{<span class="ex">markdown</span>}</span>
+<span id="cb452-3"><a href="#cb452-3" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">marginnote</span>}</span>
+<span id="cb452-4"><a href="#cb452-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
+<span id="cb452-5"><a href="#cb452-5" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
+<span id="cb452-6"><a href="#cb452-6" aria-hidden="true" tabindex="-1"></a> inlineHtmlComment = {<span class="fu">\marginnote</span>{#1}},</span>
+<span id="cb452-7"><a href="#cb452-7" aria-hidden="true" tabindex="-1"></a> blockHtmlCommentBegin = {<span class="kw">\begin</span>{<span class="ex">quote</span>}},</span>
+<span id="cb452-8"><a href="#cb452-8" aria-hidden="true" tabindex="-1"></a> blockHtmlCommentEnd = {<span class="kw">\end</span>{<span class="ex">quote</span>}},</span>
+<span id="cb452-9"><a href="#cb452-9" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb452-10"><a href="#cb452-10" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb452-11"><a href="#cb452-11" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb452-12"><a href="#cb452-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb452-13"><a href="#cb452-13" aria-hidden="true" tabindex="-1"></a>A useful use of inline HTML comments are side notes.</span>
+<span id="cb452-14"><a href="#cb452-14" aria-hidden="true" tabindex="-1"></a>&lt;!-- Side notes are displayed in the horizontal margins next to the relevant</span>
+<span id="cb452-15"><a href="#cb452-15" aria-hidden="true" tabindex="-1"></a>passages, which makes them *easier for the reader to find* than notes. --&gt;</span>
+<span id="cb452-16"><a href="#cb452-16" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb452-17"><a href="#cb452-17" aria-hidden="true" tabindex="-1"></a>We can render block HTML comments as blockquotes:</span>
+<span id="cb452-18"><a href="#cb452-18" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb452-19"><a href="#cb452-19" aria-hidden="true" tabindex="-1"></a>&lt;!--</span>
+<span id="cb452-20"><a href="#cb452-20" aria-hidden="true" tabindex="-1"></a>Here is a block HTML comment with a code example that a programmer might understand:</span>
+<span id="cb452-21"><a href="#cb452-21" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb452-22"><a href="#cb452-22" aria-hidden="true" tabindex="-1"></a> foo = bar + baz - 42</span>
+<span id="cb452-23"><a href="#cb452-23" aria-hidden="true" tabindex="-1"></a>--&gt;</span>
+<span id="cb452-24"><a href="#cb452-24" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb452-25"><a href="#cb452-25" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<p>Next, invoke LuaTeX from the terminal:</p>
+<div class="sourceCode" id="cb453"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb453-1"><a href="#cb453-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span>
+<span id="cb453-2"><a href="#cb453-2" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+<p>A PDF document named <code>document.pdf</code> should be produced and
+contain the following body text:</p>
+<blockquote>
+<p>A useful use of HTML comments are side notes.</p>
+<p>We can render block HTML comments as blockquotes:</p>
+<blockquote>
+<p>Here is a block HTML comment with a code example that a programmer
+might understand:</p>
+<pre><code>foo = bar + baz - 42</code></pre>
</blockquote>
</blockquote>
-<h5 class="unnumbered" id="context-example-44">Con<span
+<p>The horizontal margins should contain the following text:</p>
+<blockquote>
+<p>Side notes are displayed in the horizontal margins next to the
+relevant passages, which makes them <em>easier for the reader to
+find</em> than notes.</p>
+</blockquote>
+<h4 data-number="2.3.1.15" id="html-tag-and-element-renderers"><span
+class="header-section-number">2.3.1.15</span> HTML Tag and Element
+Renderers</h4>
+<p>The <code>\markdownRendererInlineHtmlTag</code> macro represents an
+opening, closing, or empty inline <abbr>HTML</abbr> tag. This macro will
+only be produced, when the <strong><code>html</code></strong> option is
+enabled. The macro receives a single argument that corresponds to the
+contents of the <abbr>HTML</abbr> tag.</p>
+<p>The <code>\markdownRendererInputBlockHtmlElement</code> macro
+represents a block <abbr>HTML</abbr> element. This macro will only be
+produced, when the <strong><code>html</code></strong> option is enabled.
+The macro receives a single argument that filename of a file containing
+the contents of the <abbr>HTML</abbr> element.</p>
+<h5 class="unnumbered" id="latex-example-61"><span
+class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
+<p>Using a text editor, create a text document named
+<code>document.tex</code> with the following content:</p>
+<div class="sourceCode" id="cb455"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb455-1"><a href="#cb455-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb455-2"><a href="#cb455-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[html]{<span class="ex">markdown</span>}</span>
+<span id="cb455-3"><a href="#cb455-3" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">marginnote</span>}</span>
+<span id="cb455-4"><a href="#cb455-4" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">verbatim</span>}</span>
+<span id="cb455-5"><a href="#cb455-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
+<span id="cb455-6"><a href="#cb455-6" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
+<span id="cb455-7"><a href="#cb455-7" aria-hidden="true" tabindex="-1"></a> inlineHtmlTag = {<span class="fu">\textbf</span>{#1}},</span>
+<span id="cb455-8"><a href="#cb455-8" aria-hidden="true" tabindex="-1"></a> inputBlockHtmlElement = {<span class="fu">\verbatiminput</span>{#1}},</span>
+<span id="cb455-9"><a href="#cb455-9" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb455-10"><a href="#cb455-10" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb455-11"><a href="#cb455-11" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb455-12"><a href="#cb455-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb455-13"><a href="#cb455-13" aria-hidden="true" tabindex="-1"></a>&lt;b&gt;_Hello,_ world!&lt;/b&gt;&lt;br/&gt;</span>
+<span id="cb455-14"><a href="#cb455-14" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb455-15"><a href="#cb455-15" aria-hidden="true" tabindex="-1"></a>&lt;div&gt;_Hello,_ world!&lt;/div&gt;</span>
+<span id="cb455-16"><a href="#cb455-16" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb455-17"><a href="#cb455-17" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<p>Next, invoke LuaTeX from the terminal:</p>
+<div class="sourceCode" id="cb456"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb456-1"><a href="#cb456-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span>
+<span id="cb456-2"><a href="#cb456-2" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+<p>A PDF document named <code>document.pdf</code> should be produced and
+contain the following body text:</p>
+<blockquote>
+<p><strong><b></strong>_Hello,_ world!<strong></b><br/></strong></p>
+<pre><code>&lt;div&gt;_Hello,_ world!&lt;/div&gt;</code></pre>
+</blockquote>
+<h4 data-number="2.3.1.16" id="image-renderer"><span
+class="header-section-number">2.3.1.16</span> Image Renderer</h4>
+<p>The <code>\markdownRendererImage</code> macro represents an image. It
+receives four arguments: the label, the fully escaped <abbr>uri</abbr>
+that can be directly typeset, the raw <abbr>uri</abbr> that can be used
+outside typesetting, and the title of the link.</p>
+<h5 class="unnumbered" id="latex-example-62"><span
+class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
+<p>Using a text editor, create a text document named
+<code>document.tex</code> with the following content:</p>
+<div class="sourceCode" id="cb458"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb458-1"><a href="#cb458-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb458-2"><a href="#cb458-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span>
+<span id="cb458-3"><a href="#cb458-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\begingroup</span></span>
+<span id="cb458-4"><a href="#cb458-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\catcode</span>`<span class="fu">\@</span>=11</span>
+<span id="cb458-5"><a href="#cb458-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\catcode</span>`<span class="fu">\%</span>=12</span>
+<span id="cb458-6"><a href="#cb458-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\catcode</span>`<span class="fu">\^</span>^A=14</span>
+<span id="cb458-7"><a href="#cb458-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\global\def\markdownRendererImage</span>#1#2#3#4{^^A</span>
+<span id="cb458-8"><a href="#cb458-8" aria-hidden="true" tabindex="-1"></a> <span class="fu">\immediate\write</span>18{^^A</span></code></pre></div>
+<div class="sourceCode" id="cb459"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb459-1"><a href="#cb459-1" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> <span class="bu">printf</span> <span class="st">&#39;%s&#39;</span> <span class="st">&quot;#3&quot;</span> <span class="kw">|</span> <span class="fu">grep</span> <span class="at">-q</span> ^http<span class="kw">;</span> <span class="cf">then</span></span>
+<span id="cb459-2"><a href="#cb459-2" aria-hidden="true" tabindex="-1"></a> <span class="va">OUTPUT</span><span class="op">=</span><span class="st">&quot;</span><span class="va">$(</span><span class="bu">printf</span> <span class="st">&#39;%s&#39;</span> <span class="st">&quot;#3&quot;</span> <span class="kw">|</span> <span class="fu">md5sum</span> <span class="kw">|</span> <span class="fu">cut</span> <span class="at">-d</span><span class="st">&#39; &#39;</span> <span class="at">-f1</span><span class="va">)</span><span class="st">.^^A</span></span>
+<span id="cb459-3"><a href="#cb459-3" aria-hidden="true" tabindex="-1"></a><span class="st"> </span><span class="va">$(</span><span class="bu">printf</span> <span class="st">&#39;%s&#39;</span> <span class="st">&quot;#3&quot;</span> <span class="kw">|</span> <span class="fu">sed</span> <span class="st">&#39;s/.*[.]//&#39;</span><span class="va">)</span><span class="st">&quot;</span><span class="kw">;</span></span>
+<span id="cb459-4"><a href="#cb459-4" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> <span class="ot">! </span><span class="bu">[</span> <span class="ot">-e</span> <span class="st">&quot;</span><span class="va">$OUTPUT</span><span class="st">&quot;</span> <span class="bu">]</span><span class="kw">;</span> <span class="cf">then</span></span>
+<span id="cb459-5"><a href="#cb459-5" aria-hidden="true" tabindex="-1"></a> <span class="fu">wget</span> <span class="at">-O</span> <span class="st">&quot;</span><span class="va">$OUTPUT</span><span class="st">&quot;</span> <span class="st">&#39;#3&#39;</span> <span class="kw">||</span> <span class="fu">rm</span> <span class="st">&quot;</span><span class="va">$OUTPUT</span><span class="st">&quot;</span><span class="kw">;</span></span>
+<span id="cb459-6"><a href="#cb459-6" aria-hidden="true" tabindex="-1"></a> <span class="ex">convert</span> <span class="st">&quot;</span><span class="va">$OUTPUT</span><span class="st">&quot;</span> png:<span class="st">&quot;</span><span class="va">$OUTPUT</span><span class="st">&quot;</span><span class="kw">;</span></span>
+<span id="cb459-7"><a href="#cb459-7" aria-hidden="true" tabindex="-1"></a> <span class="cf">fi</span><span class="kw">;</span></span>
+<span id="cb459-8"><a href="#cb459-8" aria-hidden="true" tabindex="-1"></a> <span class="bu">printf</span> <span class="st">&#39;%s%%&#39;</span> <span class="st">&quot;</span><span class="va">$OUTPUT</span><span class="st">&quot;</span> <span class="op">&gt;</span> <span class="dt">\j</span>obname.fetched<span class="kw">;</span></span>
+<span id="cb459-9"><a href="#cb459-9" aria-hidden="true" tabindex="-1"></a> <span class="cf">else</span></span>
+<span id="cb459-10"><a href="#cb459-10" aria-hidden="true" tabindex="-1"></a> <span class="bu">printf</span> <span class="st">&#39;%s%%&#39;</span> <span class="st">&quot;#3&quot;</span> <span class="op">&gt;</span> <span class="dt">\j</span>obname.fetched<span class="kw">;</span></span>
+<span id="cb459-11"><a href="#cb459-11" aria-hidden="true" tabindex="-1"></a> <span class="ex">fi^^A</span></span></code></pre></div>
+<div class="sourceCode" id="cb460"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb460-1"><a href="#cb460-1" aria-hidden="true" tabindex="-1"></a> }^^A</span>
+<span id="cb460-2"><a href="#cb460-2" aria-hidden="true" tabindex="-1"></a> {^^A</span>
+<span id="cb460-3"><a href="#cb460-3" aria-hidden="true" tabindex="-1"></a> <span class="fu">\everyeof</span>={<span class="fu">\noexpand</span>}^^A</span>
+<span id="cb460-4"><a href="#cb460-4" aria-hidden="true" tabindex="-1"></a> <span class="fu">\edef\filename</span>{<span class="fu">\_</span>_markdowninput&quot;<span class="fu">\jobname</span>.fetched&quot; }^^A</span>
+<span id="cb460-5"><a href="#cb460-5" aria-hidden="true" tabindex="-1"></a> <span class="bu">\includegraphics</span>[width=<span class="fu">\textwidth</span>]{<span class="fu">\filename</span>}^^A</span>
+<span id="cb460-6"><a href="#cb460-6" aria-hidden="true" tabindex="-1"></a> }^^A</span>
+<span id="cb460-7"><a href="#cb460-7" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb460-8"><a href="#cb460-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\endgroup</span></span>
+<span id="cb460-9"><a href="#cb460-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb460-10"><a href="#cb460-10" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb460-11"><a href="#cb460-11" aria-hidden="true" tabindex="-1"></a>![TUGboat](https://tug.org/tugboat/noword.jpg)</span>
+<span id="cb460-12"><a href="#cb460-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb460-13"><a href="#cb460-13" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<p>Next, invoke LuaTeX from the terminal:</p>
+<div class="sourceCode" id="cb461"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb461-1"><a href="#cb461-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> <span class="at">--shell-escape</span> document.tex</span></code></pre></div>
+<p>A PDF document named <code>document.pdf</code> should be produced and
+contain the following content. This assumes that you use a Unix-like
+operating system with Bourne or Bourne again shell as the default shell
+of the current user. It also assumes that the <code>md5sum</code>,
+<code>wget</code>, and <code>convert</code> binaries are installed and
+that the <span class="tex">T<sub>e</sub>X</span> engine has shell
+access.</p>
+<blockquote>
+<figure>
+<img src="https://tug.org/tugboat/noword.jpg"
+title="The Communications of the TeX Users Group" alt="TUGboat" />
+<figcaption aria-hidden="true">TUGboat</figcaption>
+</figure>
+</blockquote>
+<h4 data-number="2.3.1.17" id="interblock-separator-renderer"><span
+class="header-section-number">2.3.1.17</span> Interblock Separator
+Renderer</h4>
+<p>The <code>\markdownRendererInterblockSeparator</code> macro
+represents a separator between two markdown block elements. The macro
+receives no arguments.</p>
+<h5 class="unnumbered" id="plain-tex-example-26">Plain <span
+class="tex">T<sub>e</sub>X</span> Example</h5>
+<p>Using a text editor, create a text document named
+<code>document.tex</code> with the following content:</p>
+<div class="sourceCode" id="cb462"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb462-1"><a href="#cb462-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
+<span id="cb462-2"><a href="#cb462-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span>
+<span id="cb462-3"><a href="#cb462-3" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
+<span id="cb462-4"><a href="#cb462-4" aria-hidden="true" tabindex="-1"></a> {<span class="fu">\it</span>(The end of a block)}<span class="co">%</span></span>
+<span id="cb462-5"><a href="#cb462-5" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
+<span id="cb462-6"><a href="#cb462-6" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb462-7"><a href="#cb462-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
+<span id="cb462-8"><a href="#cb462-8" aria-hidden="true" tabindex="-1"></a>Hello *world*!</span>
+<span id="cb462-9"><a href="#cb462-9" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb462-10"><a href="#cb462-10" aria-hidden="true" tabindex="-1"></a>_Foo_ bar!</span>
+<span id="cb462-11"><a href="#cb462-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
+<span id="cb462-12"><a href="#cb462-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
+<p>Next, invoke LuaTeX from the terminal:</p>
+<div class="sourceCode" id="cb463"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb463-1"><a href="#cb463-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
+<p>A PDF document named <code>document.pdf</code> should be produced and
+contain the following text:</p>
+<blockquote>
+<p>Hello <em>world</em>!</p>
+<p><em>(The end of a block)</em></p>
+<p><em>Foo</em> bar!</p>
+</blockquote>
+<h5 class="unnumbered" id="latex-example-63"><span
+class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
+<p>Using a text editor, create a text document named
+<code>document.tex</code> with the following content:</p>
+<div class="sourceCode" id="cb464"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb464-1"><a href="#cb464-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb464-2"><a href="#cb464-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span>
+<span id="cb464-3"><a href="#cb464-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
+<span id="cb464-4"><a href="#cb464-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
+<span id="cb464-5"><a href="#cb464-5" aria-hidden="true" tabindex="-1"></a> interblockSeparator = {<span class="co">%</span></span>
+<span id="cb464-6"><a href="#cb464-6" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
+<span id="cb464-7"><a href="#cb464-7" aria-hidden="true" tabindex="-1"></a> <span class="fu">\emph</span>{(The end of a block)}<span class="co">%</span></span>
+<span id="cb464-8"><a href="#cb464-8" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
+<span id="cb464-9"><a href="#cb464-9" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb464-10"><a href="#cb464-10" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb464-11"><a href="#cb464-11" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb464-12"><a href="#cb464-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb464-13"><a href="#cb464-13" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb464-14"><a href="#cb464-14" aria-hidden="true" tabindex="-1"></a>Hello *world*!</span>
+<span id="cb464-15"><a href="#cb464-15" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb464-16"><a href="#cb464-16" aria-hidden="true" tabindex="-1"></a>_Foo_ bar!</span>
+<span id="cb464-17"><a href="#cb464-17" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb464-18"><a href="#cb464-18" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<p>Next, invoke LuaTeX from the terminal:</p>
+<div class="sourceCode" id="cb465"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb465-1"><a href="#cb465-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+<p>A PDF document named <code>document.pdf</code> should be produced and
+contain the following text:</p>
+<blockquote>
+<p>Hello <em>world</em>!</p>
+<p><em>(The end of a block)</em></p>
+<p><em>Foo</em> bar!</p>
+</blockquote>
+<h5 class="unnumbered" id="context-example-40">Con<span
class="tex">T<sub>e</sub>X</span>t Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
+<div class="sourceCode" id="cb466"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb466-1"><a href="#cb466-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
+<span id="cb466-2"><a href="#cb466-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span>
+<span id="cb466-3"><a href="#cb466-3" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
+<span id="cb466-4"><a href="#cb466-4" aria-hidden="true" tabindex="-1"></a> <span class="fu">\emph</span>{(The end of a block)}<span class="co">%</span></span>
+<span id="cb466-5"><a href="#cb466-5" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
+<span id="cb466-6"><a href="#cb466-6" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb466-7"><a href="#cb466-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
+<span id="cb466-8"><a href="#cb466-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb466-9"><a href="#cb466-9" aria-hidden="true" tabindex="-1"></a>Hello *world*!</span>
+<span id="cb466-10"><a href="#cb466-10" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb466-11"><a href="#cb466-11" aria-hidden="true" tabindex="-1"></a>_Foo_ bar!</span>
+<span id="cb466-12"><a href="#cb466-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb466-13"><a href="#cb466-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
+<p>Next, invoke LuaTeX from the terminal:</p>
+<div class="sourceCode" id="cb467"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb467-1"><a href="#cb467-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
+<p>A PDF document named <code>document.pdf</code> should be produced and
+contain the following text:</p>
+<blockquote>
+<p>Hello <em>world</em>!</p>
+<p><em>(The end of a block)</em></p>
+<p><em>Foo</em> bar!</p>
+</blockquote>
+<h4 data-number="2.3.1.18" id="line-break-renderer"><span
+class="header-section-number">2.3.1.18</span> Line Break Renderer</h4>
+<p>The <code>\markdownRendererLineBreak</code> macro represents a forced
+line break. The macro receives no arguments.</p>
+<h5 class="unnumbered" id="plain-tex-example-27">Plain <span
+class="tex">T<sub>e</sub>X</span> Example</h5>
+<p>Using a text editor, create a text document named
+<code>document.tex</code> with the following content:</p>
<div class="sourceCode" id="cb468"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb468-1"><a href="#cb468-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
-<span id="cb468-2"><a href="#cb468-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererBlockQuoteBegin</span>{<span class="fu">\startquotation</span>}</span>
-<span id="cb468-3"><a href="#cb468-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererBlockQuoteEnd</span>{<span class="fu">\stopquotation</span>}</span>
-<span id="cb468-4"><a href="#cb468-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
-<span id="cb468-5"><a href="#cb468-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb468-6"><a href="#cb468-6" aria-hidden="true" tabindex="-1"></a>A quote from William Shakespeare&#39;s King Lear:</span>
-<span id="cb468-7"><a href="#cb468-7" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb468-8"><a href="#cb468-8" aria-hidden="true" tabindex="-1"></a>&gt; This is the excellent foppery of the world that when we are</span>
-<span id="cb468-9"><a href="#cb468-9" aria-hidden="true" tabindex="-1"></a>&gt; sick in fortune---often the surfeit of our own behavior---we</span>
-<span id="cb468-10"><a href="#cb468-10" aria-hidden="true" tabindex="-1"></a>&gt; make guilty of our disasters the sun, the moon, and the</span>
-<span id="cb468-11"><a href="#cb468-11" aria-hidden="true" tabindex="-1"></a>&gt; stars [...]</span>
-<span id="cb468-12"><a href="#cb468-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb468-13"><a href="#cb468-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb468-1"><a href="#cb468-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
+<span id="cb468-2"><a href="#cb468-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererLineBreak</span>{<span class="co">%</span></span>
+<span id="cb468-3"><a href="#cb468-3" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
+<span id="cb468-4"><a href="#cb468-4" aria-hidden="true" tabindex="-1"></a> {<span class="fu">\it</span>(A forced linebreak)}<span class="co">%</span></span>
+<span id="cb468-5"><a href="#cb468-5" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
+<span id="cb468-6"><a href="#cb468-6" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb468-7"><a href="#cb468-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownInput</span>{example.md}</span>
+<span id="cb468-8"><a href="#cb468-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
+<p>Using a text editor, create a text document named
+<code>example.md</code> with the following content. Note the two spaces
+at the end of the first line, which specify a hard linebreak. Due to the
+limitations of the <span class="tex">T<sub>e</sub>X</span> input
+processor, hard linebreaks would be ignored if we typed them directly
+into the <code>document.tex</code> document.</p>
+<pre><code>Hello world! <br/>_Foo_ bar!</code></pre>
<p>Next, invoke LuaTeX from the terminal:</p>
<div class="sourceCode" id="cb469"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb469-1"><a href="#cb469-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb469-1"><a href="#cb469-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
-<p>A quote from William Shakespeare’s King Lear:</p>
-<blockquote>
-<p>This is the excellent foppery of the world that when we are sick in
-fortune—often the surfeit of our own behavior—we make guilty of our
-disasters the sun, the moon, and the stars […]</p>
-</blockquote>
+<p>Hello <em>world</em>!</p>
+<p><em>(A forced linebreak)</em></p>
+<p><em>Foo</em> bar!</p>
</blockquote>
-<h4 data-number="2.3.1.17" id="code-block-renderers"><span
-class="header-section-number">2.3.1.17</span> Code Block Renderers</h4>
-<p>The <code>\markdownRendererInputVerbatim</code> macro represents a
-code block. The macro receives a single argument that corresponds to the
-filename of a file contaning the code block contents.</p>
-<p>The <code>\markdownRendererInputFencedCode</code> macro represents a
-fenced code block. This macro will only be produced, when the
-<strong><code>fencedCode</code></strong> option is enabled. The macro
-receives two arguments that correspond to the filename of a file
-contaning the code block contents and to the code fence infostring.</p>
-<h5 class="unnumbered" id="latex-example-60"><span
+<h5 class="unnumbered" id="latex-example-64"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
<div class="sourceCode" id="cb470"><pre
class="sourceCode tex"><code class="sourceCode latex"><span id="cb470-1"><a href="#cb470-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb470-2"><a href="#cb470-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">verbatim</span>}</span>
-<span id="cb470-3"><a href="#cb470-3" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[hyphens]{<span class="ex">url</span>}</span>
-<span id="cb470-4"><a href="#cb470-4" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[fencedCode]{<span class="ex">markdown</span>}</span>
-<span id="cb470-5"><a href="#cb470-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
-<span id="cb470-6"><a href="#cb470-6" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
-<span id="cb470-7"><a href="#cb470-7" aria-hidden="true" tabindex="-1"></a> interblockSeparator = {</span>
-<span id="cb470-8"><a href="#cb470-8" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span>
-<span id="cb470-9"><a href="#cb470-9" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
-<span id="cb470-10"><a href="#cb470-10" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span>
-<span id="cb470-11"><a href="#cb470-11" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span>
-<span id="cb470-12"><a href="#cb470-12" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
-<span id="cb470-13"><a href="#cb470-13" aria-hidden="true" tabindex="-1"></a> }<span class="co">%</span></span>
-<span id="cb470-14"><a href="#cb470-14" aria-hidden="true" tabindex="-1"></a> }<span class="co">%</span></span>
-<span id="cb470-15"><a href="#cb470-15" aria-hidden="true" tabindex="-1"></a> }<span class="co">%</span></span>
-<span id="cb470-16"><a href="#cb470-16" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb470-17"><a href="#cb470-17" aria-hidden="true" tabindex="-1"></a> inputVerbatim = {</span>
-<span id="cb470-18"><a href="#cb470-18" aria-hidden="true" tabindex="-1"></a> is contained in file <span class="fu">\url</span>{#1}:<span class="co">%</span></span>
-<span id="cb470-19"><a href="#cb470-19" aria-hidden="true" tabindex="-1"></a> <span class="fu">\verbatiminput</span>{#1}<span class="co">%</span></span>
-<span id="cb470-20"><a href="#cb470-20" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb470-21"><a href="#cb470-21" aria-hidden="true" tabindex="-1"></a> inputFencedCode = {</span>
-<span id="cb470-22"><a href="#cb470-22" aria-hidden="true" tabindex="-1"></a> in #2 <span class="fu">\markdownRendererInputVerbatim</span>{#1}<span class="co">%</span></span>
-<span id="cb470-23"><a href="#cb470-23" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb470-24"><a href="#cb470-24" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb470-25"><a href="#cb470-25" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb470-26"><a href="#cb470-26" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb470-27"><a href="#cb470-27" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb470-28"><a href="#cb470-28" aria-hidden="true" tabindex="-1"></a>The following code</span>
-<span id="cb470-29"><a href="#cb470-29" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb470-30"><a href="#cb470-30" aria-hidden="true" tabindex="-1"></a> def foo(bar):</span>
-<span id="cb470-31"><a href="#cb470-31" aria-hidden="true" tabindex="-1"></a> if len(bar) &lt;= 1:</span>
-<span id="cb470-32"><a href="#cb470-32" aria-hidden="true" tabindex="-1"></a> return bar[0]</span>
-<span id="cb470-33"><a href="#cb470-33" aria-hidden="true" tabindex="-1"></a> elif len(bar) == 2:</span>
-<span id="cb470-34"><a href="#cb470-34" aria-hidden="true" tabindex="-1"></a> return sorted(bar)</span>
-<span id="cb470-35"><a href="#cb470-35" aria-hidden="true" tabindex="-1"></a> else:</span>
-<span id="cb470-36"><a href="#cb470-36" aria-hidden="true" tabindex="-1"></a> baz = len(bar) // 2</span>
-<span id="cb470-37"><a href="#cb470-37" aria-hidden="true" tabindex="-1"></a> return foo(bar[baz:], bar[:baz])</span>
-<span id="cb470-38"><a href="#cb470-38" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb470-39"><a href="#cb470-39" aria-hidden="true" tabindex="-1"></a>The following code</span>
-<span id="cb470-40"><a href="#cb470-40" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb470-41"><a href="#cb470-41" aria-hidden="true" tabindex="-1"></a>~~~ Python</span>
-<span id="cb470-42"><a href="#cb470-42" aria-hidden="true" tabindex="-1"></a>&gt;&gt;&gt; foo([4, 2, 1, 3])</span>
-<span id="cb470-43"><a href="#cb470-43" aria-hidden="true" tabindex="-1"></a>[1, 2, 3, 4]</span>
-<span id="cb470-44"><a href="#cb470-44" aria-hidden="true" tabindex="-1"></a>~~~~~~~~~~</span>
-<span id="cb470-45"><a href="#cb470-45" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb470-46"><a href="#cb470-46" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<span id="cb470-2"><a href="#cb470-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span>
+<span id="cb470-3"><a href="#cb470-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
+<span id="cb470-4"><a href="#cb470-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
+<span id="cb470-5"><a href="#cb470-5" aria-hidden="true" tabindex="-1"></a> lineBreak = {<span class="co">%</span></span>
+<span id="cb470-6"><a href="#cb470-6" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
+<span id="cb470-7"><a href="#cb470-7" aria-hidden="true" tabindex="-1"></a> <span class="fu">\emph</span>{(A forced linebreak)}<span class="co">%</span></span>
+<span id="cb470-8"><a href="#cb470-8" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
+<span id="cb470-9"><a href="#cb470-9" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb470-10"><a href="#cb470-10" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb470-11"><a href="#cb470-11" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb470-12"><a href="#cb470-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb470-13"><a href="#cb470-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownInput</span>{example.md}</span>
+<span id="cb470-14"><a href="#cb470-14" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<p>Using a text editor, create a text document named
+<code>example.md</code> with the following content. Note the two spaces
+at the end of the first line, which specify a hard linebreak. Due to the
+limitations of the <span class="tex">T<sub>e</sub>X</span> input
+processor, hard linebreaks would be ignored if we typed them directly
+into the <code>document.tex</code> document.</p>
+<pre><code>Hello world! <br/>_Foo_ bar!</code></pre>
<p>Next, invoke LuaTeX from the terminal:</p>
<div class="sourceCode" id="cb471"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb471-1"><a href="#cb471-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
-contain the following text except for the filename, which may
-differ:</p>
+contain the following text:</p>
<blockquote>
-<p>The following code is contained in file
-<code>./_markdown_document/882453149edcf288976647f6fe147ada.verbatim</code>:</p>
+<p>Hello <em>world</em>!</p>
+<p><em>(A forced linebreak)</em></p>
+<p><em>Foo</em> bar!</p>
+</blockquote>
+<h5 class="unnumbered" id="context-example-41">Con<span
+class="tex">T<sub>e</sub>X</span>t Example</h5>
+<p>Using a text editor, create a text document named
+<code>document.tex</code> with the following content:</p>
<div class="sourceCode" id="cb472"><pre
-class="sourceCode py"><code class="sourceCode python"><span id="cb472-1"><a href="#cb472-1" aria-hidden="true" tabindex="-1"></a><span class="kw">def</span> foo(bar):</span>
-<span id="cb472-2"><a href="#cb472-2" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> <span class="bu">len</span>(bar) <span class="op">&lt;=</span> <span class="dv">1</span>:</span>
-<span id="cb472-3"><a href="#cb472-3" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> bar[:<span class="dv">1</span>]</span>
-<span id="cb472-4"><a href="#cb472-4" aria-hidden="true" tabindex="-1"></a> <span class="cf">elif</span> <span class="bu">len</span>(bar) <span class="op">==</span> <span class="dv">2</span>:</span>
-<span id="cb472-5"><a href="#cb472-5" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> <span class="bu">sorted</span>(bar)</span>
-<span id="cb472-6"><a href="#cb472-6" aria-hidden="true" tabindex="-1"></a> <span class="cf">else</span>:</span>
-<span id="cb472-7"><a href="#cb472-7" aria-hidden="true" tabindex="-1"></a> baz <span class="op">=</span> bar[<span class="bu">len</span>(bar) <span class="op">//</span> <span class="dv">2</span>]</span>
-<span id="cb472-8"><a href="#cb472-8" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> (</span>
-<span id="cb472-9"><a href="#cb472-9" aria-hidden="true" tabindex="-1"></a> foo([qux <span class="cf">for</span> qux <span class="kw">in</span> bar <span class="cf">if</span> qux <span class="op">&lt;</span> baz]) <span class="op">+</span> [baz] <span class="op">+</span></span>
-<span id="cb472-10"><a href="#cb472-10" aria-hidden="true" tabindex="-1"></a> foo([qux <span class="cf">for</span> qux <span class="kw">in</span> bar <span class="cf">if</span> qux <span class="op">&gt;</span> baz])</span>
-<span id="cb472-11"><a href="#cb472-11" aria-hidden="true" tabindex="-1"></a> )</span></code></pre></div>
-<p>The following code in Python contained in file
-<code>./_markdown_document/cf2a96e2120cef5b1fae5fea36fcc27b.verbatim</code>:</p>
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb472-1"><a href="#cb472-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
+<span id="cb472-2"><a href="#cb472-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererLineBreak</span>{<span class="co">%</span></span>
+<span id="cb472-3"><a href="#cb472-3" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
+<span id="cb472-4"><a href="#cb472-4" aria-hidden="true" tabindex="-1"></a> <span class="fu">\emph</span>{(A forced linebreak)}<span class="co">%</span></span>
+<span id="cb472-5"><a href="#cb472-5" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
+<span id="cb472-6"><a href="#cb472-6" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb472-7"><a href="#cb472-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
+<span id="cb472-8"><a href="#cb472-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownInput</span>{example.md}</span>
+<span id="cb472-9"><a href="#cb472-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
+<p>Using a text editor, create a text document named
+<code>example.md</code> with the following content. Note the two spaces
+at the end of the first line, which specify a hard linebreak. Due to the
+limitations of the <span class="tex">T<sub>e</sub>X</span> input
+processor, hard linebreaks would be ignored if we typed them directly
+into the <code>document.tex</code> document.</p>
+<pre><code>Hello world! <br/>_Foo_ bar!</code></pre>
+<p>Next, invoke LuaTeX from the terminal:</p>
<div class="sourceCode" id="cb473"><pre
-class="sourceCode py"><code class="sourceCode python"><span id="cb473-1"><a href="#cb473-1" aria-hidden="true" tabindex="-1"></a><span class="op">&gt;&gt;&gt;</span> foo([<span class="dv">4</span>, <span class="dv">2</span>, <span class="dv">1</span>, <span class="dv">3</span>])</span>
-<span id="cb473-2"><a href="#cb473-2" aria-hidden="true" tabindex="-1"></a>[<span class="dv">1</span>, <span class="dv">2</span>, <span class="dv">3</span>, <span class="dv">4</span>]</span></code></pre></div>
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb473-1"><a href="#cb473-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
+<p>A PDF document named <code>document.pdf</code> should be produced and
+contain the following text:</p>
+<blockquote>
+<p>Hello <em>world</em>!</p>
+<p><em>(A forced linebreak)</em></p>
+<p><em>Foo</em> bar!</p>
</blockquote>
-<h4 data-number="2.3.1.18" id="yamlmetadatarenderers"><span
-class="header-section-number">2.3.1.18</span> YAML Metadata
-Renderers</h4>
-<p>The <code>\markdownRendererJekyllDataBegin</code> macro represents
-the beginning of a <abbr>yaml</abbr> document. This macro will only be
-produced when the <strong><code>jekyllData</code></strong> option is
-enabled. The macro receives no arguments.</p>
-<p>The <code>\markdownRendererJekyllDataEnd</code> macro represents the
-end of a <abbr>yaml</abbr> document. This macro will only be produced
-when the <strong><code>jekyllData</code></strong> option is enabled. The
-macro receives no arguments.</p>
-<p>The <code>\markdownRendererJekyllDataMappingBegin</code> macro
-represents the beginning of a mapping in a <abbr>yaml</abbr> document.
-This macro will only be produced when the
-<strong><code>jekyllData</code></strong> option is enabled. The macro
-receives two arguments: the scalar key in the parent structure, cast to
-a string following <abbr>yaml</abbr> serialization rules, and the number
-of items in the mapping.</p>
-<p>The <code>\markdownRendererJekyllDataMappingEnd</code> macro
-represents the end of a mapping in a <abbr>yaml</abbr> document. This
-macro will only be produced when the
-<strong><code>jekyllData</code></strong> option is enabled. The macro
-receives no arguments.</p>
-<p>The <code>\markdownRendererJekyllDataSequenceBegin</code> macro
-represents the beginning of a sequence in a <abbr>yaml</abbr> document.
-This macro will only be produced when the
-<strong><code>jekyllData</code></strong> option is enabled. The macro
-receives two arguments: the scalar key in the parent structure, cast to
-a string following <abbr>yaml</abbr> serialization rules, and the number
-of items in the sequence.</p>
-<p>The <code>\markdownRendererJekyllDataSequenceEnd</code> macro
-represents the end of a sequence in a <abbr>yaml</abbr> document. This
-macro will only be produced when the
-<strong><code>jekyllData</code></strong> option is enabled. The macro
-receives no arguments.</p>
-<p>The <code>\markdownRendererJekyllDataBoolean</code> macro represents
-a boolean scalar value in a <abbr>yaml</abbr> document. This macro will
-only be produced when the <strong><code>jekyllData</code></strong>
-option is enabled. The macro receives two arguments: the scalar key in
-the parent structure, and the scalar value, both cast to a string
-following <abbr>yaml</abbr> serialization rules.</p>
-<p>The <code>\markdownRendererJekyllDataNumber</code> macro represents a
-numeric scalar value in a <abbr>yaml</abbr> document. This macro will
-only be produced when the <strong><code>jekyllData</code></strong>
-option is enabled. The macro receives two arguments: the scalar key in
-the parent structure, and the scalar value, both cast to a string
-following <abbr>yaml</abbr> serialization rules.</p>
-<p>The <code>\markdownRendererJekyllDataString</code> macro represents a
-string scalar value in a <abbr>yaml</abbr> document. This macro will
-only be produced when the <strong><code>jekyllData</code></strong>
-option is enabled. The macro receives two arguments: the scalar key in
-the parent structure, cast to a string following <abbr>yaml</abbr>
-serialization rules, and the scalar value.</p>
-<p>The <code>\markdownRendererJekyllDataEmpty</code> macro represents an
-empty scalar value in a <abbr>yaml</abbr> document. This macro will only
-be produced when the <strong><code>jekyllData</code></strong> option is
-enabled. The macro receives one argument: the scalar key in the parent
-structure, cast to a string following <abbr>yaml</abbr> serialization
-rules.</p>
-<h5 class="unnumbered" id="plain-tex-example-30">Plain <span
+<h4 data-number="2.3.1.19" id="link-renderer"><span
+class="header-section-number">2.3.1.19</span> Link Renderer</h4>
+<p>The <code>\markdownRendererLink</code> macro represents a hyperlink.
+It receives four arguments: the label, the fully escaped
+<abbr>uri</abbr> that can be directly typeset, the raw <abbr>uri</abbr>
+that can be used outside typesetting, and the title of the link.</p>
+<h5 class="unnumbered" id="plain-tex-example-28">Plain <span
class="tex">T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
<div class="sourceCode" id="cb474"><pre
class="sourceCode tex"><code class="sourceCode latex"><span id="cb474-1"><a href="#cb474-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
-<span id="cb474-2"><a href="#cb474-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionJekyllData</span>{true}</span>
-<span id="cb474-3"><a href="#cb474-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererJekyllDataString</span>#1#2{<span class="fu">\gdef\name</span>{#2}}</span>
-<span id="cb474-4"><a href="#cb474-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererJekyllDataNumber</span>#1#2{<span class="fu">\gdef\age</span>{#2}}</span>
-<span id="cb474-5"><a href="#cb474-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererJekyllDataEnd</span>{<span class="co">%</span></span>
-<span id="cb474-6"><a href="#cb474-6" aria-hidden="true" tabindex="-1"></a> <span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.}</span>
-<span id="cb474-7"><a href="#cb474-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
-<span id="cb474-8"><a href="#cb474-8" aria-hidden="true" tabindex="-1"></a>---</span>
-<span id="cb474-9"><a href="#cb474-9" aria-hidden="true" tabindex="-1"></a>name: Jane Doe</span>
-<span id="cb474-10"><a href="#cb474-10" aria-hidden="true" tabindex="-1"></a>age: 99</span>
-<span id="cb474-11"><a href="#cb474-11" aria-hidden="true" tabindex="-1"></a>---</span>
-<span id="cb474-12"><a href="#cb474-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
-<span id="cb474-13"><a href="#cb474-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
+<span id="cb474-2"><a href="#cb474-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererLink</span>#1#2#3#4{<span class="co">%</span></span>
+<span id="cb474-3"><a href="#cb474-3" aria-hidden="true" tabindex="-1"></a> #1 {<span class="fu">\tt</span>#2} titled {<span class="fu">\it</span>#4}<span class="co">%</span></span>
+<span id="cb474-4"><a href="#cb474-4" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb474-5"><a href="#cb474-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
+<span id="cb474-6"><a href="#cb474-6" aria-hidden="true" tabindex="-1"></a>Please visit [the link][ctan].</span>
+<span id="cb474-7"><a href="#cb474-7" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb474-8"><a href="#cb474-8" aria-hidden="true" tabindex="-1"></a> [ctan]: https://ctan.org/</span>
+<span id="cb474-9"><a href="#cb474-9" aria-hidden="true" tabindex="-1"></a> (the Comprehensive TeX Archive Network)</span>
+<span id="cb474-10"><a href="#cb474-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
+<span id="cb474-11"><a href="#cb474-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
<div class="sourceCode" id="cb475"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb475-1"><a href="#cb475-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
-<p>Jane Doe is 99 years old.</p>
+<p>Please visit the link <a href="https://ctan.org/"
+class="uri">https://ctan.org/</a> titled <em>the Comprehensive TeX
+Archive Network</em>.</p>
</blockquote>
-<h5 class="unnumbered" id="latex-example-61"><span
+<h5 class="unnumbered" id="latex-example-65"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
<div class="sourceCode" id="cb476"><pre
class="sourceCode tex"><code class="sourceCode latex"><span id="cb476-1"><a href="#cb476-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb476-2"><a href="#cb476-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[jekyllData]{<span class="ex">markdown</span>}</span>
+<span id="cb476-2"><a href="#cb476-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span>
<span id="cb476-3"><a href="#cb476-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
<span id="cb476-4"><a href="#cb476-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
-<span id="cb476-5"><a href="#cb476-5" aria-hidden="true" tabindex="-1"></a> jekyllDataString = {<span class="fu">\gdef\name</span>{#2}},</span>
-<span id="cb476-6"><a href="#cb476-6" aria-hidden="true" tabindex="-1"></a> jekyllDataNumber = {<span class="fu">\gdef\age</span>{#2}},</span>
-<span id="cb476-7"><a href="#cb476-7" aria-hidden="true" tabindex="-1"></a> jekyllDataEnd = {<span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.},</span>
-<span id="cb476-8"><a href="#cb476-8" aria-hidden="true" tabindex="-1"></a> }</span>
+<span id="cb476-5"><a href="#cb476-5" aria-hidden="true" tabindex="-1"></a> link = {<span class="co">%</span></span>
+<span id="cb476-6"><a href="#cb476-6" aria-hidden="true" tabindex="-1"></a> #1 <span class="fu">\texttt</span>{#2} titled <span class="fu">\emph</span>{#4}<span class="co">%</span></span>
+<span id="cb476-7"><a href="#cb476-7" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb476-8"><a href="#cb476-8" aria-hidden="true" tabindex="-1"></a> },</span>
<span id="cb476-9"><a href="#cb476-9" aria-hidden="true" tabindex="-1"></a>}</span>
<span id="cb476-10"><a href="#cb476-10" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb476-11"><a href="#cb476-11" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb476-12"><a href="#cb476-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb476-13"><a href="#cb476-13" aria-hidden="true" tabindex="-1"></a>---</span>
-<span id="cb476-14"><a href="#cb476-14" aria-hidden="true" tabindex="-1"></a>name: Jane Doe</span>
-<span id="cb476-15"><a href="#cb476-15" aria-hidden="true" tabindex="-1"></a>age: 99</span>
-<span id="cb476-16"><a href="#cb476-16" aria-hidden="true" tabindex="-1"></a>---</span>
-<span id="cb476-17"><a href="#cb476-17" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb476-18"><a href="#cb476-18" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb476-19"><a href="#cb476-19" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<span id="cb476-11"><a href="#cb476-11" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb476-12"><a href="#cb476-12" aria-hidden="true" tabindex="-1"></a>Please visit [the link][ctan].</span>
+<span id="cb476-13"><a href="#cb476-13" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb476-14"><a href="#cb476-14" aria-hidden="true" tabindex="-1"></a> [ctan]: https://ctan.org/</span>
+<span id="cb476-15"><a href="#cb476-15" aria-hidden="true" tabindex="-1"></a> (the Comprehensive TeX Archive Network)</span>
+<span id="cb476-16"><a href="#cb476-16" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb476-17"><a href="#cb476-17" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
<div class="sourceCode" id="cb477"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb477-1"><a href="#cb477-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
-<p>Jane Doe is 99 years old.</p>
+<p>Please visit the link <a href="https://ctan.org/"
+class="uri">https://ctan.org/</a> titled <em>the Comprehensive TeX
+Archive Network</em>.</p>
</blockquote>
-<h5 class="unnumbered" id="context-example-45">Con<span
+<h5 class="unnumbered" id="context-example-42">Con<span
class="tex">T<sub>e</sub>X</span>t Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
<div class="sourceCode" id="cb478"><pre
class="sourceCode tex"><code class="sourceCode latex"><span id="cb478-1"><a href="#cb478-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
-<span id="cb478-2"><a href="#cb478-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[jekyllData = yes]</span>
-<span id="cb478-3"><a href="#cb478-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererJekyllDataString</span>#1#2{<span class="fu">\gdef\name</span>{#2}}</span>
-<span id="cb478-4"><a href="#cb478-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererJekyllDataNumber</span>#1#2{<span class="fu">\gdef\age</span>{#2}}</span>
-<span id="cb478-5"><a href="#cb478-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererJekyllDataEnd</span>{<span class="co">%</span></span>
-<span id="cb478-6"><a href="#cb478-6" aria-hidden="true" tabindex="-1"></a> <span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.}</span>
-<span id="cb478-7"><a href="#cb478-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
+<span id="cb478-2"><a href="#cb478-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererLink</span>#1#2#3#4{<span class="co">%</span></span>
+<span id="cb478-3"><a href="#cb478-3" aria-hidden="true" tabindex="-1"></a> #1 {<span class="fu">\tt</span>#2} titled <span class="fu">\emph</span>{#4}<span class="co">%</span></span>
+<span id="cb478-4"><a href="#cb478-4" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb478-5"><a href="#cb478-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
+<span id="cb478-6"><a href="#cb478-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb478-7"><a href="#cb478-7" aria-hidden="true" tabindex="-1"></a>Please visit [the link][ctan].</span>
<span id="cb478-8"><a href="#cb478-8" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb478-9"><a href="#cb478-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb478-10"><a href="#cb478-10" aria-hidden="true" tabindex="-1"></a>---</span>
-<span id="cb478-11"><a href="#cb478-11" aria-hidden="true" tabindex="-1"></a>name: Jane Doe</span>
-<span id="cb478-12"><a href="#cb478-12" aria-hidden="true" tabindex="-1"></a>age: 99</span>
-<span id="cb478-13"><a href="#cb478-13" aria-hidden="true" tabindex="-1"></a>---</span>
-<span id="cb478-14"><a href="#cb478-14" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb478-15"><a href="#cb478-15" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb478-16"><a href="#cb478-16" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
+<span id="cb478-9"><a href="#cb478-9" aria-hidden="true" tabindex="-1"></a> [ctan]: https://ctan.org/</span>
+<span id="cb478-10"><a href="#cb478-10" aria-hidden="true" tabindex="-1"></a> (the Comprehensive TeX Archive Network)</span>
+<span id="cb478-11"><a href="#cb478-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb478-12"><a href="#cb478-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
<div class="sourceCode" id="cb479"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb479-1"><a href="#cb479-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
-<p>Jane Doe is 99 years old.</p>
+<p>Please visit the link <a href="https://ctan.org/"
+class="uri">https://ctan.org/</a> titled <em>the Comprehensive TeX
+Archive Network</em>.</p>
</blockquote>
-<h4 data-number="2.3.1.19" id="heading-renderers"><span
-class="header-section-number">2.3.1.19</span> Heading Renderers</h4>
-<p>The <code>\markdownRendererHeadingOne</code> macro represents a first
-level heading. The macro receives a single argument that corresponds to
-the heading text.</p>
-<p>The <code>\markdownRendererHeadingTwo</code> macro represents a
-second level heading. The macro receives a single argument that
-corresponds to the heading text.</p>
-<p>The <code>\markdownRendererHeadingThree</code> macro represents a
-third level heading. The macro receives a single argument that
-corresponds to the heading text.</p>
-<p>The <code>\markdownRendererHeadingFour</code> macro represents a
-fourth level heading. The macro receives a single argument that
-corresponds to the heading text.</p>
-<p>The <code>\markdownRendererHeadingFive</code> macro represents a
-fifth level heading. The macro receives a single argument that
-corresponds to the heading text.</p>
-<p>The <code>\markdownRendererHeadingSix</code> macro represents a sixth
-level heading. The macro receives a single argument that corresponds to
-the heading text.</p>
-<h5 class="unnumbered" id="plain-tex-example-31">Plain <span
-class="tex">T<sub>e</sub>X</span> Example</h5>
+<h4 data-number="2.3.1.20" id="markdown-document-renderers"><span
+class="header-section-number">2.3.1.20</span> Markdown Document
+Renderers</h4>
+<p>The <code>\markdownRendererDocumentBegin</code> and
+<code>\markdownRendererDocumentEnd</code> macros represent the beginning
+and the end of a <em>markdown</em> document. The macros receive no
+arguments.</p>
+<p>A <span class="tex">T<sub>e</sub>X</span> document may contain any
+number of markdown documents. Additionally, markdown documents may
+appear not only in a sequence, but several markdown documents may also
+be <em>nested</em>. Redefinitions of the macros should take this into
+account.</p>
+<h5 class="unnumbered" id="latex-example-66"><span
+class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
-<code>document.tex</code> with the following content:</p>
+<code>nested.md</code> with the following content:</p>
<div class="sourceCode" id="cb480"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb480-1"><a href="#cb480-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
-<span id="cb480-2"><a href="#cb480-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{}</span>
-<span id="cb480-3"><a href="#cb480-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHeadingOne</span>{1}</span>
-<span id="cb480-4"><a href="#cb480-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHeadingTwo</span>{2}</span>
-<span id="cb480-5"><a href="#cb480-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHeadingThree</span>{3}</span>
-<span id="cb480-6"><a href="#cb480-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHeadingFour</span>{4}</span>
-<span id="cb480-7"><a href="#cb480-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHeadingFive</span>{5}</span>
-<span id="cb480-8"><a href="#cb480-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHeadingSix</span>{6}</span>
-<span id="cb480-9"><a href="#cb480-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
-<span id="cb480-10"><a href="#cb480-10" aria-hidden="true" tabindex="-1"></a>######</span>
-<span id="cb480-11"><a href="#cb480-11" aria-hidden="true" tabindex="-1"></a>#####</span>
-<span id="cb480-12"><a href="#cb480-12" aria-hidden="true" tabindex="-1"></a>#####</span>
-<span id="cb480-13"><a href="#cb480-13" aria-hidden="true" tabindex="-1"></a>###</span>
-<span id="cb480-14"><a href="#cb480-14" aria-hidden="true" tabindex="-1"></a>######</span>
-<span id="cb480-15"><a href="#cb480-15" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
-<span id="cb480-16"><a href="#cb480-16" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
-<p>Next, invoke LuaTeX from the terminal:</p>
+class="sourceCode md"><code class="sourceCode markdown"><span id="cb480-1"><a href="#cb480-1" aria-hidden="true" tabindex="-1"></a>This is a *nested* markdown document.</span></code></pre></div>
+<p>Using a text editor, create a text document named
+<code>document.tex</code> with the following content:</p>
<div class="sourceCode" id="cb481"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb481-1"><a href="#cb481-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb481-1"><a href="#cb481-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb481-2"><a href="#cb481-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[contentBlocks]{<span class="ex">markdown</span>}</span>
+<span id="cb481-3"><a href="#cb481-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
+<span id="cb481-4"><a href="#cb481-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
+<span id="cb481-5"><a href="#cb481-5" aria-hidden="true" tabindex="-1"></a> contentBlock = {<span class="co">%</span></span>
+<span id="cb481-6"><a href="#cb481-6" aria-hidden="true" tabindex="-1"></a> <span class="fu">\markdownInput</span>{#3}<span class="co">%</span></span>
+<span id="cb481-7"><a href="#cb481-7" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb481-8"><a href="#cb481-8" aria-hidden="true" tabindex="-1"></a> documentBegin = {<span class="co">%</span></span>
+<span id="cb481-9"><a href="#cb481-9" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
+<span id="cb481-10"><a href="#cb481-10" aria-hidden="true" tabindex="-1"></a> <span class="fu">\emph</span>{(The beginning of a document)}</span>
+<span id="cb481-11"><a href="#cb481-11" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
+<span id="cb481-12"><a href="#cb481-12" aria-hidden="true" tabindex="-1"></a> <span class="fu">\begingroup</span></span>
+<span id="cb481-13"><a href="#cb481-13" aria-hidden="true" tabindex="-1"></a> <span class="fu">\markdownSetup</span>{snippet=first-nesting-level}<span class="co">%</span></span>
+<span id="cb481-14"><a href="#cb481-14" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb481-15"><a href="#cb481-15" aria-hidden="true" tabindex="-1"></a> documentEnd = {<span class="co">%</span></span>
+<span id="cb481-16"><a href="#cb481-16" aria-hidden="true" tabindex="-1"></a> <span class="fu">\endgroup</span></span>
+<span id="cb481-17"><a href="#cb481-17" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
+<span id="cb481-18"><a href="#cb481-18" aria-hidden="true" tabindex="-1"></a> <span class="fu">\emph</span>{(The end of a document)}</span>
+<span id="cb481-19"><a href="#cb481-19" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
+<span id="cb481-20"><a href="#cb481-20" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb481-21"><a href="#cb481-21" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb481-22"><a href="#cb481-22" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb481-23"><a href="#cb481-23" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetupSnippet</span>{first-nesting-level}{</span>
+<span id="cb481-24"><a href="#cb481-24" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
+<span id="cb481-25"><a href="#cb481-25" aria-hidden="true" tabindex="-1"></a> documentBegin = {</span>
+<span id="cb481-26"><a href="#cb481-26" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
+<span id="cb481-27"><a href="#cb481-27" aria-hidden="true" tabindex="-1"></a> <span class="fu">\emph</span>{(The beginning of a nested document)}</span>
+<span id="cb481-28"><a href="#cb481-28" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
+<span id="cb481-29"><a href="#cb481-29" aria-hidden="true" tabindex="-1"></a> <span class="fu">\begingroup</span></span>
+<span id="cb481-30"><a href="#cb481-30" aria-hidden="true" tabindex="-1"></a> <span class="fu">\markdownSetup</span>{snippet=second-nesting-level-and-below}</span>
+<span id="cb481-31"><a href="#cb481-31" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb481-32"><a href="#cb481-32" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb481-33"><a href="#cb481-33" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb481-34"><a href="#cb481-34" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetupSnippet</span>{second-nesting-level-and-below}{</span>
+<span id="cb481-35"><a href="#cb481-35" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
+<span id="cb481-36"><a href="#cb481-36" aria-hidden="true" tabindex="-1"></a> documentBegin = {</span>
+<span id="cb481-37"><a href="#cb481-37" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
+<span id="cb481-38"><a href="#cb481-38" aria-hidden="true" tabindex="-1"></a> <span class="fu">\emph</span>{(The beginning of a nested document)}</span>
+<span id="cb481-39"><a href="#cb481-39" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
+<span id="cb481-40"><a href="#cb481-40" aria-hidden="true" tabindex="-1"></a> <span class="fu">\begingroup</span></span>
+<span id="cb481-41"><a href="#cb481-41" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb481-42"><a href="#cb481-42" aria-hidden="true" tabindex="-1"></a> documentEnd = {</span>
+<span id="cb481-43"><a href="#cb481-43" aria-hidden="true" tabindex="-1"></a> <span class="fu">\endgroup</span></span>
+<span id="cb481-44"><a href="#cb481-44" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
+<span id="cb481-45"><a href="#cb481-45" aria-hidden="true" tabindex="-1"></a> <span class="fu">\emph</span>{(The end of a nested document)}</span>
+<span id="cb481-46"><a href="#cb481-46" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
+<span id="cb481-47"><a href="#cb481-47" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb481-48"><a href="#cb481-48" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb481-49"><a href="#cb481-49" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb481-50"><a href="#cb481-50" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb481-51"><a href="#cb481-51" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb481-52"><a href="#cb481-52" aria-hidden="true" tabindex="-1"></a>Hello *world*!</span>
+<span id="cb481-53"><a href="#cb481-53" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb481-54"><a href="#cb481-54" aria-hidden="true" tabindex="-1"></a>/nested.md</span>
+<span id="cb481-55"><a href="#cb481-55" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb481-56"><a href="#cb481-56" aria-hidden="true" tabindex="-1"></a>_Foo_ bar!</span>
+<span id="cb481-57"><a href="#cb481-57" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb481-58"><a href="#cb481-58" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb481-59"><a href="#cb481-59" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb481-60"><a href="#cb481-60" aria-hidden="true" tabindex="-1"></a>Bar baz!</span>
+<span id="cb481-61"><a href="#cb481-61" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb481-62"><a href="#cb481-62" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb481-63"><a href="#cb481-63" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<p>Next, invoke LuaTeX from the terminal:</p>
+<div class="sourceCode" id="cb482"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb482-1"><a href="#cb482-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
-<p>65536</p>
+<p><em>(The beginning of a document)</em></p>
+<p>Hello <em>world</em>!</p>
+<p><em>(The beginning of a nested document)</em></p>
+<p>This is a <em>nested</em> markdown document.</p>
+<p><em>(The end of a nested document)</em></p>
+<p><em>Foo</em> bar!</p>
+<p><em>(The end of a document)</em></p>
+<p><em>(The beginning of a document)</em></p>
+<p>Bar baz!</p>
+<p><em>(The end of a document)</em></p>
</blockquote>
-<h5 class="unnumbered" id="latex-example-62"><span
+<h4 data-number="2.3.1.21" id="non-breaking-space-renderer"><span
+class="header-section-number">2.3.1.21</span> Non-Breaking Space
+Renderer</h4>
+<p>The <code>\markdownRendererNbsp</code> macro represents a
+non-breaking space.</p>
+<h5 class="unnumbered" id="latex-example-67"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
-<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb482"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb482-1"><a href="#cb482-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb482-2"><a href="#cb482-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span>
-<span id="cb482-3"><a href="#cb482-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
-<span id="cb482-4"><a href="#cb482-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
-<span id="cb482-5"><a href="#cb482-5" aria-hidden="true" tabindex="-1"></a> interblockSeparator = {},</span>
-<span id="cb482-6"><a href="#cb482-6" aria-hidden="true" tabindex="-1"></a> headingOne = 1,</span>
-<span id="cb482-7"><a href="#cb482-7" aria-hidden="true" tabindex="-1"></a> headingTwo = 2,</span>
-<span id="cb482-8"><a href="#cb482-8" aria-hidden="true" tabindex="-1"></a> headingThree = 3,</span>
-<span id="cb482-9"><a href="#cb482-9" aria-hidden="true" tabindex="-1"></a> headingFour = 4,</span>
-<span id="cb482-10"><a href="#cb482-10" aria-hidden="true" tabindex="-1"></a> headingFive = 5,</span>
-<span id="cb482-11"><a href="#cb482-11" aria-hidden="true" tabindex="-1"></a> headingSix = 6,</span>
-<span id="cb482-12"><a href="#cb482-12" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb482-13"><a href="#cb482-13" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb482-14"><a href="#cb482-14" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb482-15"><a href="#cb482-15" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb482-16"><a href="#cb482-16" aria-hidden="true" tabindex="-1"></a>######</span>
-<span id="cb482-17"><a href="#cb482-17" aria-hidden="true" tabindex="-1"></a>#####</span>
-<span id="cb482-18"><a href="#cb482-18" aria-hidden="true" tabindex="-1"></a>#####</span>
-<span id="cb482-19"><a href="#cb482-19" aria-hidden="true" tabindex="-1"></a>###</span>
-<span id="cb482-20"><a href="#cb482-20" aria-hidden="true" tabindex="-1"></a>######</span>
-<span id="cb482-21"><a href="#cb482-21" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb482-22"><a href="#cb482-22" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
-<p>Next, invoke LuaTeX from the terminal:</p>
+<code>document.bib</code> with the following content:</p>
<div class="sourceCode" id="cb483"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb483-1"><a href="#cb483-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
-<p>A PDF document named <code>document.pdf</code> should be produced and
-contain the following text:</p>
-<blockquote>
-<p>65536</p>
-</blockquote>
-<h5 class="unnumbered" id="context-example-46">Con<span
-class="tex">T<sub>e</sub>X</span>t Example</h5>
+class="sourceCode bib"><code class="sourceCode bibtex"><span id="cb483-1"><a href="#cb483-1" aria-hidden="true" tabindex="-1"></a><span class="va">@book</span>{<span class="ot">knuth:tex</span>,</span>
+<span id="cb483-2"><a href="#cb483-2" aria-hidden="true" tabindex="-1"></a> <span class="dt">author</span> = &quot;<span class="st">Knuth, Donald Ervin</span>&quot;,</span>
+<span id="cb483-3"><a href="#cb483-3" aria-hidden="true" tabindex="-1"></a> <span class="dt">title</span> = &quot;<span class="st">The </span><span class="ch">\TeX</span><span class="st"> book, volume A of Computers and typesetting</span>&quot;,</span>
+<span id="cb483-4"><a href="#cb483-4" aria-hidden="true" tabindex="-1"></a> <span class="dt">publisher</span> = &quot;<span class="st">Addison-Wesley</span>&quot;,</span>
+<span id="cb483-5"><a href="#cb483-5" aria-hidden="true" tabindex="-1"></a> <span class="dt">year</span> = &quot;<span class="st">1984</span>&quot;</span>
+<span id="cb483-6"><a href="#cb483-6" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
<div class="sourceCode" id="cb484"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb484-1"><a href="#cb484-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
-<span id="cb484-2"><a href="#cb484-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{}</span>
-<span id="cb484-3"><a href="#cb484-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHeadingOne</span>{1}</span>
-<span id="cb484-4"><a href="#cb484-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHeadingTwo</span>{2}</span>
-<span id="cb484-5"><a href="#cb484-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHeadingThree</span>{3}</span>
-<span id="cb484-6"><a href="#cb484-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHeadingFour</span>{4}</span>
-<span id="cb484-7"><a href="#cb484-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHeadingFive</span>{5}</span>
-<span id="cb484-8"><a href="#cb484-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHeadingSix</span>{6}</span>
-<span id="cb484-9"><a href="#cb484-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
-<span id="cb484-10"><a href="#cb484-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb484-11"><a href="#cb484-11" aria-hidden="true" tabindex="-1"></a>######</span>
-<span id="cb484-12"><a href="#cb484-12" aria-hidden="true" tabindex="-1"></a>#####</span>
-<span id="cb484-13"><a href="#cb484-13" aria-hidden="true" tabindex="-1"></a>#####</span>
-<span id="cb484-14"><a href="#cb484-14" aria-hidden="true" tabindex="-1"></a>###</span>
-<span id="cb484-15"><a href="#cb484-15" aria-hidden="true" tabindex="-1"></a>######</span>
-<span id="cb484-16"><a href="#cb484-16" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb484-17"><a href="#cb484-17" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
-<p>Next, invoke LuaTeX from the terminal:</p>
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb484-1"><a href="#cb484-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb484-2"><a href="#cb484-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[</span>
+<span id="cb484-3"><a href="#cb484-3" aria-hidden="true" tabindex="-1"></a> citations,</span>
+<span id="cb484-4"><a href="#cb484-4" aria-hidden="true" tabindex="-1"></a> citationNbsps,</span>
+<span id="cb484-5"><a href="#cb484-5" aria-hidden="true" tabindex="-1"></a>]{<span class="ex">markdown</span>}</span>
+<span id="cb484-6"><a href="#cb484-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
+<span id="cb484-7"><a href="#cb484-7" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
+<span id="cb484-8"><a href="#cb484-8" aria-hidden="true" tabindex="-1"></a> nbsp = {<span class="ss">$</span><span class="sc">\cdot</span><span class="ss">$</span>},</span>
+<span id="cb484-9"><a href="#cb484-9" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb484-10"><a href="#cb484-10" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb484-11"><a href="#cb484-11" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb484-12"><a href="#cb484-12" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb484-13"><a href="#cb484-13" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb484-14"><a href="#cb484-14" aria-hidden="true" tabindex="-1"></a>The TeXbook [@knuth:tex, p. 123 and 130] is good.</span>
+<span id="cb484-15"><a href="#cb484-15" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb484-16"><a href="#cb484-16" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb484-17"><a href="#cb484-17" aria-hidden="true" tabindex="-1"></a><span class="bu">\bibliographystyle</span>{<span class="ex">plain</span>}</span>
+<span id="cb484-18"><a href="#cb484-18" aria-hidden="true" tabindex="-1"></a><span class="bu">\bibliography</span>{<span class="ex">document.bib</span>}</span>
+<span id="cb484-19"><a href="#cb484-19" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb484-20"><a href="#cb484-20" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<p>Next, invoke LuaTeX and BibTeX from the terminal:</p>
<div class="sourceCode" id="cb485"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb485-1"><a href="#cb485-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb485-1"><a href="#cb485-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span>
+<span id="cb485-2"><a href="#cb485-2" aria-hidden="true" tabindex="-1"></a><span class="ex">bibtex</span> document.aux</span>
+<span id="cb485-3"><a href="#cb485-3" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span>
+<span id="cb485-4"><a href="#cb485-4" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
-<p>65536</p>
+<p>The TeXbook [1, p.·123·and·130] is good.</p>
+<h3 id="references-2">References</h3>
+<p><a
+href="https://datatracker.ietf.org/doc/html/rfc3986#section-4.2">1</a>
+Donald Ervin Knuth. <em>The TeXbook, volume A of Computers and
+typesetting.</em> Addison-Wesley, 1984.</p>
</blockquote>
-<h4 data-number="2.3.1.20" id="thematic-break-renderer"><span
-class="header-section-number">2.3.1.20</span> Thematic Break
-Renderer</h4>
-<p>The <code>\markdownRendererThematicBreak</code> macro represents a
-thematic break. The macro receives no arguments.</p>
-<h5 class="unnumbered" id="plain-tex-example-32">Plain <span
+<h4 data-number="2.3.1.22" id="note-renderer"><span
+class="header-section-number">2.3.1.22</span> Note Renderer</h4>
+<p>The <code>\markdownRendererNote</code> macro represents a note. This
+macro will only be produced, when the
+<strong><code>notes</code></strong> option is enabled. The macro
+receives a single argument that corresponds to the note text.</p>
+<h5 class="unnumbered" id="plain-tex-example-29">Plain <span
class="tex">T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
<div class="sourceCode" id="cb486"><pre
class="sourceCode tex"><code class="sourceCode latex"><span id="cb486-1"><a href="#cb486-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
-<span id="cb486-2"><a href="#cb486-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererThematicBreak</span>{<span class="fu">\vfil\break</span>}</span>
-<span id="cb486-3"><a href="#cb486-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
-<span id="cb486-4"><a href="#cb486-4" aria-hidden="true" tabindex="-1"></a>This is the first page.</span>
-<span id="cb486-5"><a href="#cb486-5" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb486-6"><a href="#cb486-6" aria-hidden="true" tabindex="-1"></a>***</span>
-<span id="cb486-7"><a href="#cb486-7" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb486-8"><a href="#cb486-8" aria-hidden="true" tabindex="-1"></a>This is the second page.</span>
-<span id="cb486-9"><a href="#cb486-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
-<span id="cb486-10"><a href="#cb486-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
+<span id="cb486-2"><a href="#cb486-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionNotes</span>{true}</span>
+<span id="cb486-3"><a href="#cb486-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererNote</span>#1{ (and <span class="fu">\lowercase</span>{#1})}</span>
+<span id="cb486-4"><a href="#cb486-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
+<span id="cb486-5"><a href="#cb486-5" aria-hidden="true" tabindex="-1"></a>This is some text[^1] and this is some other text[^2].</span>
+<span id="cb486-6"><a href="#cb486-6" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb486-7"><a href="#cb486-7" aria-hidden="true" tabindex="-1"></a> [^1]: this is a note</span>
+<span id="cb486-8"><a href="#cb486-8" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb486-9"><a href="#cb486-9" aria-hidden="true" tabindex="-1"></a> [^2]: this is some other note</span>
+<span id="cb486-10"><a href="#cb486-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
+<span id="cb486-11"><a href="#cb486-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
<div class="sourceCode" id="cb487"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb487-1"><a href="#cb487-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
-<p>This is the first page.</p>
-<hr />
-<p>This is the second page.</p>
+<p>This is some text (and this is a note) and this is some other text
+(and this is some other note).</p>
</blockquote>
-<h5 class="unnumbered" id="latex-example-63"><span
+<h5 class="unnumbered" id="latex-example-68"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
<div class="sourceCode" id="cb488"><pre
class="sourceCode tex"><code class="sourceCode latex"><span id="cb488-1"><a href="#cb488-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb488-2"><a href="#cb488-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span>
+<span id="cb488-2"><a href="#cb488-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[notes]{<span class="ex">markdown</span>}</span>
<span id="cb488-3"><a href="#cb488-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
<span id="cb488-4"><a href="#cb488-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
-<span id="cb488-5"><a href="#cb488-5" aria-hidden="true" tabindex="-1"></a> thematicBreak = <span class="fu">\newpage</span>,</span>
+<span id="cb488-5"><a href="#cb488-5" aria-hidden="true" tabindex="-1"></a> note = { (and <span class="fu">\MakeLowercase</span>{#1})},</span>
<span id="cb488-6"><a href="#cb488-6" aria-hidden="true" tabindex="-1"></a> },</span>
<span id="cb488-7"><a href="#cb488-7" aria-hidden="true" tabindex="-1"></a>}</span>
<span id="cb488-8"><a href="#cb488-8" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
<span id="cb488-9"><a href="#cb488-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb488-10"><a href="#cb488-10" aria-hidden="true" tabindex="-1"></a>This is the first page.</span>
+<span id="cb488-10"><a href="#cb488-10" aria-hidden="true" tabindex="-1"></a>This is some text[^1] and this is some other text[^2].</span>
<span id="cb488-11"><a href="#cb488-11" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb488-12"><a href="#cb488-12" aria-hidden="true" tabindex="-1"></a>***</span>
+<span id="cb488-12"><a href="#cb488-12" aria-hidden="true" tabindex="-1"></a> [^1]: this is a note</span>
<span id="cb488-13"><a href="#cb488-13" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb488-14"><a href="#cb488-14" aria-hidden="true" tabindex="-1"></a>This is the second page.</span>
+<span id="cb488-14"><a href="#cb488-14" aria-hidden="true" tabindex="-1"></a> [^2]: this is some other note</span>
<span id="cb488-15"><a href="#cb488-15" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
<span id="cb488-16"><a href="#cb488-16" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
@@ -8923,125 +8792,369 @@ class="sourceCode sh"><code class="sourceCode bash"><span id="cb489-1"><a href="
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
-<p>This is the first page.</p>
-<hr />
-<p>This is the second page.</p>
+<p>This is some text (and this is a note) and this is some other text
+(and this is some other note).</p>
</blockquote>
-<h5 class="unnumbered" id="context-example-47">Con<span
+<h5 class="unnumbered" id="context-example-43">Con<span
class="tex">T<sub>e</sub>X</span>t Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
<div class="sourceCode" id="cb490"><pre
class="sourceCode tex"><code class="sourceCode latex"><span id="cb490-1"><a href="#cb490-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
-<span id="cb490-2"><a href="#cb490-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererThematicBreak</span>{<span class="fu">\page</span>[yes]}</span>
-<span id="cb490-3"><a href="#cb490-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
-<span id="cb490-4"><a href="#cb490-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb490-5"><a href="#cb490-5" aria-hidden="true" tabindex="-1"></a>This is the first page.</span>
-<span id="cb490-6"><a href="#cb490-6" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb490-7"><a href="#cb490-7" aria-hidden="true" tabindex="-1"></a>***</span>
-<span id="cb490-8"><a href="#cb490-8" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb490-9"><a href="#cb490-9" aria-hidden="true" tabindex="-1"></a>This is the second page.</span>
-<span id="cb490-10"><a href="#cb490-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb490-11"><a href="#cb490-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
+<span id="cb490-2"><a href="#cb490-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[notes = yes]</span>
+<span id="cb490-3"><a href="#cb490-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererNote</span>#1{ (and <span class="fu">\lowercase</span>{#1})}</span>
+<span id="cb490-4"><a href="#cb490-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
+<span id="cb490-5"><a href="#cb490-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb490-6"><a href="#cb490-6" aria-hidden="true" tabindex="-1"></a>This is some text[^1] and this is some other text[^2].</span>
+<span id="cb490-7"><a href="#cb490-7" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb490-8"><a href="#cb490-8" aria-hidden="true" tabindex="-1"></a> [^1]: this is a note</span>
+<span id="cb490-9"><a href="#cb490-9" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb490-10"><a href="#cb490-10" aria-hidden="true" tabindex="-1"></a> [^2]: this is some other note</span>
+<span id="cb490-11"><a href="#cb490-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb490-12"><a href="#cb490-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
<div class="sourceCode" id="cb491"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb491-1"><a href="#cb491-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
-<p>This is the first page.</p>
-<hr />
-<p>This is the second page.</p>
+<p>This is some text (and this is a note) and this is some other text
+(and this is some other note).</p>
</blockquote>
-<h4 data-number="2.3.1.21" id="note-renderer"><span
-class="header-section-number">2.3.1.21</span> Note Renderer</h4>
-<p>The <code>\markdownRendererNote</code> macro represents a note. This
-macro will only be produced, when the
-<strong><code>notes</code></strong> option is enabled. The macro
-receives a single argument that corresponds to the note text.</p>
-<h5 class="unnumbered" id="plain-tex-example-33">Plain <span
+<h4 data-number="2.3.1.23" id="ordered-list-renderers"><span
+class="header-section-number">2.3.1.23</span> Ordered List
+Renderers</h4>
+<p>The <code>\markdownRendererOlBegin</code> macro represents the
+beginning of an ordered list that contains an item with several
+paragraphs of text (the list is not tight). This macro will only be
+produced, when the <strong><code>fancyLists</code></strong> option is
+disabled. The macro receives no arguments.</p>
+<p>The <code>\markdownRendererOlBeginTight</code> macro represents the
+beginning of an ordered list that contains no item with several
+paragraphs of text (the list is tight). This macro will only be
+produced, when the <strong><code>tightLists</code></strong> option is
+enabled and the <strong><code>fancyLists</code></strong> option is
+disabled. The macro receives no arguments.</p>
+<p>The <code>\markdownRendererFancyOlBegin</code> macro represents the
+beginning of a fancy ordered list that contains an item with several
+paragraphs of text (the list is not tight). This macro will only be
+produced, when the <strong><code>fancyLists</code></strong> option is
+enabled. The macro receives two arguments: the style of the list item
+labels (<code>Decimal</code>, <code>LowerRoman</code>,
+<code>UpperRoman</code>, <code>LowerAlpha</code>, and
+<code>UpperAlpha</code>), and the style of delimiters between list item
+labels and texts (<code>Default</code>, <code>OneParen</code>, and
+<code>Period</code>).</p>
+<p>The <code>\markdownRendererFancyOlBeginTight</code> macro represents
+the beginning of a fancy ordered list that contains no item with several
+paragraphs of text (the list is tight). This macro will only be
+produced, when the <strong><code>fancyLists</code></strong> and
+<strong><code>tightLists</code></strong> options are enabled. The macro
+receives two arguments: the style of the list item labels, and the style
+of delimiters between list item labels and texts. See the
+<code>\markdownRendererFancyOlBegin</code> macro for the valid style
+values.</p>
+<p>The <code>\markdownRendererOlItem</code> macro represents an item in
+an ordered list. This macro will only be produced, when the
+<strong><code>startNumber</code></strong> option is disabled and the
+<strong><code>fancyLists</code></strong> option is disabled. The macro
+receives no arguments.</p>
+<p>The <code>\markdownRendererOlItemEnd</code> macro represents the end
+of an item in an ordered list. This macro will only be produced, when
+the <strong><code>fancyLists</code></strong> option is disabled. The
+macro receives no arguments.</p>
+<p>The <code>\markdownRendererOlItemWithNumber</code> macro represents
+an item in an ordered list. This macro will only be produced, when the
+<strong><code>startNumber</code></strong> option is enabled and the
+<strong><code>fancyLists</code></strong> option is disabled. The macro
+receives a single numeric argument that corresponds to the item
+number.</p>
+<p>The <code>\markdownRendererFancyOlItem</code> macro represents an
+item in a fancy ordered list. This macro will only be produced, when the
+<strong><code>startNumber</code></strong> option is disabled and the
+<strong><code>fancyLists</code></strong> option is enabled. The macro
+receives no arguments.</p>
+<p>The <code>\markdownRendererFancyOlItemEnd</code> macro represents the
+end of an item in a fancy ordered list. This macro will only be
+produced, when the <strong><code>fancyLists</code></strong> option is
+enabled. The macro receives no arguments.</p>
+<p>The <code>\markdownRendererFancyOlItemWithNumber</code> macro
+represents an item in a fancy ordered list. This macro will only be
+produced, when the <strong><code>startNumber</code></strong> and
+<strong><code>fancyLists</code></strong> options are enabled. The macro
+receives a single numeric argument that corresponds to the item
+number.</p>
+<p>The <code>\markdownRendererOlEnd</code> macro represents the end of
+an ordered list that contains an item with several paragraphs of text
+(the list is not tight). This macro will only be produced, when the
+<strong><code>fancyLists</code></strong> option is disabled. The macro
+receives no arguments.</p>
+<p>The <code>\markdownRendererOlEndTight</code> macro represents the end
+of an ordered list that contains no item with several paragraphs of text
+(the list is tight). This macro will only be produced, when the
+<strong><code>tightLists</code></strong> option is enabled and the
+<strong><code>fancyLists</code></strong> option is disabled. The macro
+receives no arguments.</p>
+<p>The <code>\markdownRendererFancyOlEnd</code> macro represents the end
+of a fancy ordered list that contains an item with several paragraphs of
+text (the list is not tight). This macro will only be produced, when the
+<strong><code>fancyLists</code></strong> option is enabled. The macro
+receives no arguments.</p>
+<p>The <code>\markdownRendererFancyOlEndTight</code> macro represents
+the end of a fancy ordered list that contains no item with several
+paragraphs of text (the list is tight). This macro will only be
+produced, when the <strong><code>fancyLists</code></strong> and
+<strong><code>tightLists</code></strong> options are enabled. The macro
+receives no arguments.</p>
+<h5 class="unnumbered" id="plain-tex-example-30">Plain <span
class="tex">T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
<div class="sourceCode" id="cb492"><pre
class="sourceCode tex"><code class="sourceCode latex"><span id="cb492-1"><a href="#cb492-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
-<span id="cb492-2"><a href="#cb492-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionNotes</span>{true}</span>
-<span id="cb492-3"><a href="#cb492-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererNote</span>#1{ (and <span class="fu">\lowercase</span>{#1})}</span>
-<span id="cb492-4"><a href="#cb492-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
-<span id="cb492-5"><a href="#cb492-5" aria-hidden="true" tabindex="-1"></a>This is some text[^1] and this is some other text[^2].</span>
-<span id="cb492-6"><a href="#cb492-6" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb492-7"><a href="#cb492-7" aria-hidden="true" tabindex="-1"></a> [^1]: this is a note</span>
-<span id="cb492-8"><a href="#cb492-8" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb492-9"><a href="#cb492-9" aria-hidden="true" tabindex="-1"></a> [^2]: this is some other note</span>
-<span id="cb492-10"><a href="#cb492-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
-<span id="cb492-11"><a href="#cb492-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
+<span id="cb492-2"><a href="#cb492-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionTightLists</span>{true}</span>
+<span id="cb492-3"><a href="#cb492-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionStartNumber</span>{true}</span>
+<span id="cb492-4"><a href="#cb492-4" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb492-5"><a href="#cb492-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{}</span>
+<span id="cb492-6"><a href="#cb492-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererOlBeginTight</span>{ (}</span>
+<span id="cb492-7"><a href="#cb492-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererOlItemWithNumber</span>#1{<span class="co">%</span></span>
+<span id="cb492-8"><a href="#cb492-8" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></span>
+<span id="cb492-9"><a href="#cb492-9" aria-hidden="true" tabindex="-1"></a> the first</span>
+<span id="cb492-10"><a href="#cb492-10" aria-hidden="true" tabindex="-1"></a> <span class="fu">\else</span></span>
+<span id="cb492-11"><a href="#cb492-11" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></span>
+<span id="cb492-12"><a href="#cb492-12" aria-hidden="true" tabindex="-1"></a> , the second</span>
+<span id="cb492-13"><a href="#cb492-13" aria-hidden="true" tabindex="-1"></a> <span class="fu">\else</span></span>
+<span id="cb492-14"><a href="#cb492-14" aria-hidden="true" tabindex="-1"></a> , and the third</span>
+<span id="cb492-15"><a href="#cb492-15" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi</span></span>
+<span id="cb492-16"><a href="#cb492-16" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi</span></span>
+<span id="cb492-17"><a href="#cb492-17" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb492-18"><a href="#cb492-18" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererOlItemEnd</span>{}</span>
+<span id="cb492-19"><a href="#cb492-19" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererOlEndTight</span>{).}</span>
+<span id="cb492-20"><a href="#cb492-20" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb492-21"><a href="#cb492-21" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
+<span id="cb492-22"><a href="#cb492-22" aria-hidden="true" tabindex="-1"></a>This is a tight list</span>
+<span id="cb492-23"><a href="#cb492-23" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb492-24"><a href="#cb492-24" aria-hidden="true" tabindex="-1"></a>1. item</span>
+<span id="cb492-25"><a href="#cb492-25" aria-hidden="true" tabindex="-1"></a>2. item</span>
+<span id="cb492-26"><a href="#cb492-26" aria-hidden="true" tabindex="-1"></a>3. item</span>
+<span id="cb492-27"><a href="#cb492-27" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
+<span id="cb492-28"><a href="#cb492-28" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb492-29"><a href="#cb492-29" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span>
+<span id="cb492-30"><a href="#cb492-30" aria-hidden="true" tabindex="-1"></a> :<span class="fu">\par</span></span>
+<span id="cb492-31"><a href="#cb492-31" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span>
+<span id="cb492-32"><a href="#cb492-32" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb492-33"><a href="#cb492-33" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererOlBegin</span>{}</span>
+<span id="cb492-34"><a href="#cb492-34" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererOlItemWithNumber</span>#1{<span class="co">%</span></span>
+<span id="cb492-35"><a href="#cb492-35" aria-hidden="true" tabindex="-1"></a> #1.<span class="fu">\kern</span> 0.5em<span class="co">%</span></span>
+<span id="cb492-36"><a href="#cb492-36" aria-hidden="true" tabindex="-1"></a> This is the</span>
+<span id="cb492-37"><a href="#cb492-37" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></span>
+<span id="cb492-38"><a href="#cb492-38" aria-hidden="true" tabindex="-1"></a> first</span>
+<span id="cb492-39"><a href="#cb492-39" aria-hidden="true" tabindex="-1"></a> <span class="fu">\else</span></span>
+<span id="cb492-40"><a href="#cb492-40" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></span>
+<span id="cb492-41"><a href="#cb492-41" aria-hidden="true" tabindex="-1"></a> second</span>
+<span id="cb492-42"><a href="#cb492-42" aria-hidden="true" tabindex="-1"></a> <span class="fu">\else</span></span>
+<span id="cb492-43"><a href="#cb492-43" aria-hidden="true" tabindex="-1"></a> third</span>
+<span id="cb492-44"><a href="#cb492-44" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi</span></span>
+<span id="cb492-45"><a href="#cb492-45" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi</span></span>
+<span id="cb492-46"><a href="#cb492-46" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb492-47"><a href="#cb492-47" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererOlItemEnd</span>{.<span class="fu">\par</span>}</span>
+<span id="cb492-48"><a href="#cb492-48" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererOlEnd</span>{}</span>
+<span id="cb492-49"><a href="#cb492-49" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb492-50"><a href="#cb492-50" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
+<span id="cb492-51"><a href="#cb492-51" aria-hidden="true" tabindex="-1"></a>This is a loose list</span>
+<span id="cb492-52"><a href="#cb492-52" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb492-53"><a href="#cb492-53" aria-hidden="true" tabindex="-1"></a>1. item</span>
+<span id="cb492-54"><a href="#cb492-54" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb492-55"><a href="#cb492-55" aria-hidden="true" tabindex="-1"></a>2. item</span>
+<span id="cb492-56"><a href="#cb492-56" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb492-57"><a href="#cb492-57" aria-hidden="true" tabindex="-1"></a>3. item</span>
+<span id="cb492-58"><a href="#cb492-58" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
+<span id="cb492-59"><a href="#cb492-59" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb492-60"><a href="#cb492-60" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
<div class="sourceCode" id="cb493"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb493-1"><a href="#cb493-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
-<p>This is some text (and this is a note) and this is some other text
-(and this is some other note).</p>
+<p>This is a tight list (the first item, the second item, and the third
+item).</p>
+<p>This is a loose list:</p>
+<ol type="1">
+<li><p>This is the first item.</p></li>
+<li><p>This is the second item.</p></li>
+<li><p>This is the third item.</p></li>
+</ol>
</blockquote>
-<h5 class="unnumbered" id="latex-example-64"><span
+<h5 class="unnumbered" id="latex-example-69"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
<div class="sourceCode" id="cb494"><pre
class="sourceCode tex"><code class="sourceCode latex"><span id="cb494-1"><a href="#cb494-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb494-2"><a href="#cb494-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[notes]{<span class="ex">markdown</span>}</span>
-<span id="cb494-3"><a href="#cb494-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
-<span id="cb494-4"><a href="#cb494-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
-<span id="cb494-5"><a href="#cb494-5" aria-hidden="true" tabindex="-1"></a> note = { (and <span class="fu">\MakeLowercase</span>{#1})},</span>
-<span id="cb494-6"><a href="#cb494-6" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb494-7"><a href="#cb494-7" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb494-8"><a href="#cb494-8" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb494-9"><a href="#cb494-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb494-10"><a href="#cb494-10" aria-hidden="true" tabindex="-1"></a>This is some text[^1] and this is some other text[^2].</span>
-<span id="cb494-11"><a href="#cb494-11" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb494-12"><a href="#cb494-12" aria-hidden="true" tabindex="-1"></a> [^1]: this is a note</span>
-<span id="cb494-13"><a href="#cb494-13" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb494-14"><a href="#cb494-14" aria-hidden="true" tabindex="-1"></a> [^2]: this is some other note</span>
-<span id="cb494-15"><a href="#cb494-15" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb494-16"><a href="#cb494-16" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<span id="cb494-2"><a href="#cb494-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[tightLists, startNumber]{<span class="ex">markdown</span>}</span>
+<span id="cb494-3"><a href="#cb494-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb494-4"><a href="#cb494-4" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb494-5"><a href="#cb494-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span>
+<span id="cb494-6"><a href="#cb494-6" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
+<span id="cb494-7"><a href="#cb494-7" aria-hidden="true" tabindex="-1"></a> interblockSeparator = {},</span>
+<span id="cb494-8"><a href="#cb494-8" aria-hidden="true" tabindex="-1"></a> olBeginTight = { (},</span>
+<span id="cb494-9"><a href="#cb494-9" aria-hidden="true" tabindex="-1"></a> olItemWithNumber = {<span class="co">%</span></span>
+<span id="cb494-10"><a href="#cb494-10" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></span>
+<span id="cb494-11"><a href="#cb494-11" aria-hidden="true" tabindex="-1"></a> the first</span>
+<span id="cb494-12"><a href="#cb494-12" aria-hidden="true" tabindex="-1"></a> <span class="fu">\else</span></span>
+<span id="cb494-13"><a href="#cb494-13" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></span>
+<span id="cb494-14"><a href="#cb494-14" aria-hidden="true" tabindex="-1"></a> , the second</span>
+<span id="cb494-15"><a href="#cb494-15" aria-hidden="true" tabindex="-1"></a> <span class="fu">\else</span></span>
+<span id="cb494-16"><a href="#cb494-16" aria-hidden="true" tabindex="-1"></a> , and the third</span>
+<span id="cb494-17"><a href="#cb494-17" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi</span></span>
+<span id="cb494-18"><a href="#cb494-18" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi</span></span>
+<span id="cb494-19"><a href="#cb494-19" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb494-20"><a href="#cb494-20" aria-hidden="true" tabindex="-1"></a> olItemEnd = {},</span>
+<span id="cb494-21"><a href="#cb494-21" aria-hidden="true" tabindex="-1"></a> olEndTight = {).},</span>
+<span id="cb494-22"><a href="#cb494-22" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb494-23"><a href="#cb494-23" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb494-24"><a href="#cb494-24" aria-hidden="true" tabindex="-1"></a>This is a tight list</span>
+<span id="cb494-25"><a href="#cb494-25" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb494-26"><a href="#cb494-26" aria-hidden="true" tabindex="-1"></a>1. item</span>
+<span id="cb494-27"><a href="#cb494-27" aria-hidden="true" tabindex="-1"></a>2. item</span>
+<span id="cb494-28"><a href="#cb494-28" aria-hidden="true" tabindex="-1"></a>3. item</span>
+<span id="cb494-29"><a href="#cb494-29" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span>
+<span id="cb494-30"><a href="#cb494-30" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb494-31"><a href="#cb494-31" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span>
+<span id="cb494-32"><a href="#cb494-32" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
+<span id="cb494-33"><a href="#cb494-33" aria-hidden="true" tabindex="-1"></a> interblockSeparator = {<span class="co">%</span></span>
+<span id="cb494-34"><a href="#cb494-34" aria-hidden="true" tabindex="-1"></a> :<span class="fu">\par</span></span>
+<span id="cb494-35"><a href="#cb494-35" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span>
+<span id="cb494-36"><a href="#cb494-36" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb494-37"><a href="#cb494-37" aria-hidden="true" tabindex="-1"></a> olBeginTight = {<span class="kw">\begin</span>{<span class="ex">enumerate</span>}},</span>
+<span id="cb494-38"><a href="#cb494-38" aria-hidden="true" tabindex="-1"></a> olItemWithNumber = {<span class="co">%</span></span>
+<span id="cb494-39"><a href="#cb494-39" aria-hidden="true" tabindex="-1"></a> <span class="fu">\item</span> This is the</span>
+<span id="cb494-40"><a href="#cb494-40" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></span>
+<span id="cb494-41"><a href="#cb494-41" aria-hidden="true" tabindex="-1"></a> first</span>
+<span id="cb494-42"><a href="#cb494-42" aria-hidden="true" tabindex="-1"></a> <span class="fu">\else</span></span>
+<span id="cb494-43"><a href="#cb494-43" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></span>
+<span id="cb494-44"><a href="#cb494-44" aria-hidden="true" tabindex="-1"></a> second</span>
+<span id="cb494-45"><a href="#cb494-45" aria-hidden="true" tabindex="-1"></a> <span class="fu">\else</span></span>
+<span id="cb494-46"><a href="#cb494-46" aria-hidden="true" tabindex="-1"></a> third</span>
+<span id="cb494-47"><a href="#cb494-47" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi</span></span>
+<span id="cb494-48"><a href="#cb494-48" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi</span></span>
+<span id="cb494-49"><a href="#cb494-49" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb494-50"><a href="#cb494-50" aria-hidden="true" tabindex="-1"></a> olItemEnd = {.},</span>
+<span id="cb494-51"><a href="#cb494-51" aria-hidden="true" tabindex="-1"></a> olEnd = {<span class="kw">\end</span>{<span class="ex">enumerate</span>}},</span>
+<span id="cb494-52"><a href="#cb494-52" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb494-53"><a href="#cb494-53" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb494-54"><a href="#cb494-54" aria-hidden="true" tabindex="-1"></a>This is a loose list</span>
+<span id="cb494-55"><a href="#cb494-55" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb494-56"><a href="#cb494-56" aria-hidden="true" tabindex="-1"></a>1. item</span>
+<span id="cb494-57"><a href="#cb494-57" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb494-58"><a href="#cb494-58" aria-hidden="true" tabindex="-1"></a>2. item</span>
+<span id="cb494-59"><a href="#cb494-59" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb494-60"><a href="#cb494-60" aria-hidden="true" tabindex="-1"></a>3. item</span>
+<span id="cb494-61"><a href="#cb494-61" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span>
+<span id="cb494-62"><a href="#cb494-62" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb494-63"><a href="#cb494-63" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
<div class="sourceCode" id="cb495"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb495-1"><a href="#cb495-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
-<p>This is some text (and this is a note) and this is some other text
-(and this is some other note).</p>
+<p>This is a tight list (the first item, the second item, and the third
+item).</p>
+<p>This is a loose list:</p>
+<ol type="1">
+<li><p>This is the first item.</p></li>
+<li><p>This is the second item.</p></li>
+<li><p>This is the third item.</p></li>
+</ol>
</blockquote>
-<h5 class="unnumbered" id="context-example-48">Con<span
+<h5 class="unnumbered" id="context-example-44">Con<span
class="tex">T<sub>e</sub>X</span>t Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
<div class="sourceCode" id="cb496"><pre
class="sourceCode tex"><code class="sourceCode latex"><span id="cb496-1"><a href="#cb496-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
-<span id="cb496-2"><a href="#cb496-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[notes = yes]</span>
-<span id="cb496-3"><a href="#cb496-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererNote</span>#1{ (and <span class="fu">\lowercase</span>{#1})}</span>
-<span id="cb496-4"><a href="#cb496-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
-<span id="cb496-5"><a href="#cb496-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb496-6"><a href="#cb496-6" aria-hidden="true" tabindex="-1"></a>This is some text[^1] and this is some other text[^2].</span>
-<span id="cb496-7"><a href="#cb496-7" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb496-8"><a href="#cb496-8" aria-hidden="true" tabindex="-1"></a> [^1]: this is a note</span>
-<span id="cb496-9"><a href="#cb496-9" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb496-10"><a href="#cb496-10" aria-hidden="true" tabindex="-1"></a> [^2]: this is some other note</span>
-<span id="cb496-11"><a href="#cb496-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb496-12"><a href="#cb496-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
+<span id="cb496-2"><a href="#cb496-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span></span>
+<span id="cb496-3"><a href="#cb496-3" aria-hidden="true" tabindex="-1"></a> [</span>
+<span id="cb496-4"><a href="#cb496-4" aria-hidden="true" tabindex="-1"></a> tightLists = yes,</span>
+<span id="cb496-5"><a href="#cb496-5" aria-hidden="true" tabindex="-1"></a> startNumber = yes,</span>
+<span id="cb496-6"><a href="#cb496-6" aria-hidden="true" tabindex="-1"></a> ]</span>
+<span id="cb496-7"><a href="#cb496-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
+<span id="cb496-8"><a href="#cb496-8" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb496-9"><a href="#cb496-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{}</span>
+<span id="cb496-10"><a href="#cb496-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererOlBeginTight</span>{ (}</span>
+<span id="cb496-11"><a href="#cb496-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererOlItemWithNumber</span>#1{<span class="co">%</span></span>
+<span id="cb496-12"><a href="#cb496-12" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></span>
+<span id="cb496-13"><a href="#cb496-13" aria-hidden="true" tabindex="-1"></a> the first</span>
+<span id="cb496-14"><a href="#cb496-14" aria-hidden="true" tabindex="-1"></a> <span class="fu">\else</span></span>
+<span id="cb496-15"><a href="#cb496-15" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></span>
+<span id="cb496-16"><a href="#cb496-16" aria-hidden="true" tabindex="-1"></a> , the second</span>
+<span id="cb496-17"><a href="#cb496-17" aria-hidden="true" tabindex="-1"></a> <span class="fu">\else</span></span>
+<span id="cb496-18"><a href="#cb496-18" aria-hidden="true" tabindex="-1"></a> , and the third</span>
+<span id="cb496-19"><a href="#cb496-19" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi</span></span>
+<span id="cb496-20"><a href="#cb496-20" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi</span></span>
+<span id="cb496-21"><a href="#cb496-21" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb496-22"><a href="#cb496-22" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererOlItemEnd</span>{}</span>
+<span id="cb496-23"><a href="#cb496-23" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererOlEndTight</span>{).}</span>
+<span id="cb496-24"><a href="#cb496-24" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb496-25"><a href="#cb496-25" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb496-26"><a href="#cb496-26" aria-hidden="true" tabindex="-1"></a>This is a tight list</span>
+<span id="cb496-27"><a href="#cb496-27" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb496-28"><a href="#cb496-28" aria-hidden="true" tabindex="-1"></a>1. item</span>
+<span id="cb496-29"><a href="#cb496-29" aria-hidden="true" tabindex="-1"></a>2. item</span>
+<span id="cb496-30"><a href="#cb496-30" aria-hidden="true" tabindex="-1"></a>3. item</span>
+<span id="cb496-31"><a href="#cb496-31" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb496-32"><a href="#cb496-32" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb496-33"><a href="#cb496-33" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span>
+<span id="cb496-34"><a href="#cb496-34" aria-hidden="true" tabindex="-1"></a> :<span class="fu">\par</span></span>
+<span id="cb496-35"><a href="#cb496-35" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span>
+<span id="cb496-36"><a href="#cb496-36" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb496-37"><a href="#cb496-37" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererOlBegin</span>{<span class="fu">\startitemize</span>}</span>
+<span id="cb496-38"><a href="#cb496-38" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererOlItemWithNumber</span>#1{<span class="co">%</span></span>
+<span id="cb496-39"><a href="#cb496-39" aria-hidden="true" tabindex="-1"></a> <span class="fu">\sym</span>{#1.}</span>
+<span id="cb496-40"><a href="#cb496-40" aria-hidden="true" tabindex="-1"></a> This is the</span>
+<span id="cb496-41"><a href="#cb496-41" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></span>
+<span id="cb496-42"><a href="#cb496-42" aria-hidden="true" tabindex="-1"></a> first</span>
+<span id="cb496-43"><a href="#cb496-43" aria-hidden="true" tabindex="-1"></a> <span class="fu">\else</span></span>
+<span id="cb496-44"><a href="#cb496-44" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></span>
+<span id="cb496-45"><a href="#cb496-45" aria-hidden="true" tabindex="-1"></a> second</span>
+<span id="cb496-46"><a href="#cb496-46" aria-hidden="true" tabindex="-1"></a> <span class="fu">\else</span></span>
+<span id="cb496-47"><a href="#cb496-47" aria-hidden="true" tabindex="-1"></a> third</span>
+<span id="cb496-48"><a href="#cb496-48" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi</span></span>
+<span id="cb496-49"><a href="#cb496-49" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi</span></span>
+<span id="cb496-50"><a href="#cb496-50" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb496-51"><a href="#cb496-51" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererOlItemEnd</span>{.<span class="fu">\par</span>}</span>
+<span id="cb496-52"><a href="#cb496-52" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererOlEnd</span>{<span class="fu">\stopitemize</span>}</span>
+<span id="cb496-53"><a href="#cb496-53" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb496-54"><a href="#cb496-54" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb496-55"><a href="#cb496-55" aria-hidden="true" tabindex="-1"></a>This is a loose list</span>
+<span id="cb496-56"><a href="#cb496-56" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb496-57"><a href="#cb496-57" aria-hidden="true" tabindex="-1"></a>1. item</span>
+<span id="cb496-58"><a href="#cb496-58" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb496-59"><a href="#cb496-59" aria-hidden="true" tabindex="-1"></a>2. item</span>
+<span id="cb496-60"><a href="#cb496-60" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb496-61"><a href="#cb496-61" aria-hidden="true" tabindex="-1"></a>3. item</span>
+<span id="cb496-62"><a href="#cb496-62" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb496-63"><a href="#cb496-63" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb496-64"><a href="#cb496-64" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
<div class="sourceCode" id="cb497"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb497-1"><a href="#cb497-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
-<p>This is some text (and this is a note) and this is some other text
-(and this is some other note).</p>
+<p>This is a tight list (the first item, the second item, and the third
+item).</p>
+<p>This is a loose list:</p>
+<ol type="1">
+<li><p>This is the first item.</p></li>
+<li><p>This is the second item.</p></li>
+<li><p>This is the third item.</p></li>
+</ol>
</blockquote>
-<h4 data-number="2.3.1.22" id="parenthesized-citations-renderer"><span
-class="header-section-number">2.3.1.22</span> Parenthesized Citations
+<h4 data-number="2.3.1.24" id="parenthesized-citations-renderer"><span
+class="header-section-number">2.3.1.24</span> Parenthesized Citations
Renderer</h4>
<p>The <code>\markdownRendererCite</code> macro represents a string of
one or more parenthetical citations. This macro will only be produced,
@@ -9052,7 +9165,7 @@ citations</em>⟩<code>}</code> followed by ⟨<em>suppress author</em>⟩
repeated ⟨<em>number of citations</em>⟩ times. The ⟨<em>suppress
author</em>⟩ parameter is either the token <code>-</code>, when the
author’s name is to be suppressed, or <code>+</code> otherwise.</p>
-<h5 class="unnumbered" id="latex-example-65"><span
+<h5 class="unnumbered" id="latex-example-70"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
@@ -9107,474 +9220,310 @@ contain the following text:</p>
see and a postfix <em>pp. 12</em>, and a citation <em>eijkhout91</em>
with a postfix <em>pp. 34</em>.</p>
</blockquote>
-<h4 data-number="2.3.1.23" id="text-citations-renderer"><span
-class="header-section-number">2.3.1.23</span> Text Citations
-Renderer</h4>
-<p>The <code>\markdownRendererTextCite</code> macro represents a string
-of one or more text citations. This macro will only be produced, when
-the <strong><code>citations</code></strong> option is enabled. The macro
-receives parameters in the same format as the
-<code>\markdownRendererCite</code> macro.</p>
-<h5 class="unnumbered" id="latex-example-66"><span
+<h4 data-number="2.3.1.25" id="raw-content-renderers"><span
+class="header-section-number">2.3.1.25</span> Raw Content Renderers</h4>
+<p>The <code>\markdownRendererInputRawInline</code> macro represents an
+inline raw span. The macro receives two arguments: the filename of a
+file contaning the inline raw span contents and the raw attribute that
+designates the format of the inline raw span. This macro will only be
+produced, when the <strong><code>rawAttribute</code></strong> option is
+enabled.</p>
+<p>The <code>\markdownRendererInputRawBlock</code> macro represents a
+raw block. The macro receives two arguments: the filename of a file
+contaning the raw block and the raw attribute that designates the format
+of the raw block. This macro will only be produced, when the
+<strong><code>rawAttribute</code></strong> and
+<strong><code>fencedCode</code></strong> options are enabled.</p>
+<h5 class="unnumbered" id="latex-example-71"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
<div class="sourceCode" id="cb500"><pre
class="sourceCode tex"><code class="sourceCode latex"><span id="cb500-1"><a href="#cb500-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb500-2"><a href="#cb500-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[citations]{<span class="ex">markdown</span>}</span>
-<span id="cb500-3"><a href="#cb500-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\newcount\citationsCounter</span></span>
-<span id="cb500-4"><a href="#cb500-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\newcount\citationsTotal</span></span>
-<span id="cb500-5"><a href="#cb500-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\makeatletter</span></span>
-<span id="cb500-6"><a href="#cb500-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\citations</span>#1#2#3#4{<span class="co">%</span></span>
-<span id="cb500-7"><a href="#cb500-7" aria-hidden="true" tabindex="-1"></a> a text citation <span class="fu">\emph</span>{#4}</span>
-<span id="cb500-8"><a href="#cb500-8" aria-hidden="true" tabindex="-1"></a> <span class="fu">\advance\citationsCounter</span> by 1<span class="fu">\relax</span></span>
-<span id="cb500-9"><a href="#cb500-9" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifx\relax</span>#2<span class="fu">\relax</span></span>
-<span id="cb500-10"><a href="#cb500-10" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifx\relax</span>#3<span class="fu">\relax\else</span></span>
-<span id="cb500-11"><a href="#cb500-11" aria-hidden="true" tabindex="-1"></a> with a postfix <span class="fu">\emph</span>{#3}<span class="co">%</span></span>
-<span id="cb500-12"><a href="#cb500-12" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi</span></span>
-<span id="cb500-13"><a href="#cb500-13" aria-hidden="true" tabindex="-1"></a> <span class="fu">\else</span></span>
-<span id="cb500-14"><a href="#cb500-14" aria-hidden="true" tabindex="-1"></a> with a prefix <span class="fu">\emph</span>{#2}<span class="co">%</span></span>
-<span id="cb500-15"><a href="#cb500-15" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifx\relax</span>#3<span class="fu">\relax\else</span></span>
-<span id="cb500-16"><a href="#cb500-16" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ </span>and a postfix <span class="fu">\emph</span>{#3}<span class="co">%</span></span>
-<span id="cb500-17"><a href="#cb500-17" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi</span></span>
-<span id="cb500-18"><a href="#cb500-18" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi</span></span>
-<span id="cb500-19"><a href="#cb500-19" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum\citationsCounter</span>&gt;<span class="fu">\citationsTotal\relax</span></span>
-<span id="cb500-20"><a href="#cb500-20" aria-hidden="true" tabindex="-1"></a> .<span class="co">%</span></span>
-<span id="cb500-21"><a href="#cb500-21" aria-hidden="true" tabindex="-1"></a> <span class="fu">\expandafter\@gobble</span></span>
-<span id="cb500-22"><a href="#cb500-22" aria-hidden="true" tabindex="-1"></a> <span class="fu">\else</span></span>
-<span id="cb500-23"><a href="#cb500-23" aria-hidden="true" tabindex="-1"></a> , and</span>
-<span id="cb500-24"><a href="#cb500-24" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi\citations</span>}</span>
-<span id="cb500-25"><a href="#cb500-25" aria-hidden="true" tabindex="-1"></a><span class="fu">\makeatother</span></span>
-<span id="cb500-26"><a href="#cb500-26" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
-<span id="cb500-27"><a href="#cb500-27" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
-<span id="cb500-28"><a href="#cb500-28" aria-hidden="true" tabindex="-1"></a> textCite = {<span class="co">%</span></span>
-<span id="cb500-29"><a href="#cb500-29" aria-hidden="true" tabindex="-1"></a> <span class="fu">\citationsCounter</span>=1<span class="co">%</span></span>
-<span id="cb500-30"><a href="#cb500-30" aria-hidden="true" tabindex="-1"></a> <span class="fu">\citationsTotal</span>=#1<span class="co">%</span></span>
-<span id="cb500-31"><a href="#cb500-31" aria-hidden="true" tabindex="-1"></a> This is</span>
-<span id="cb500-32"><a href="#cb500-32" aria-hidden="true" tabindex="-1"></a> <span class="fu">\expandafter\citations</span></span>
-<span id="cb500-33"><a href="#cb500-33" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb500-34"><a href="#cb500-34" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb500-35"><a href="#cb500-35" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb500-36"><a href="#cb500-36" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb500-37"><a href="#cb500-37" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb500-38"><a href="#cb500-38" aria-hidden="true" tabindex="-1"></a>@abrahams90 [pp. 12; also @eijkhout91]</span>
-<span id="cb500-39"><a href="#cb500-39" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb500-40"><a href="#cb500-40" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<span id="cb500-2"><a href="#cb500-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[rawAttribute, fencedCode]{<span class="ex">markdown</span>}</span>
+<span id="cb500-3"><a href="#cb500-3" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">expl3</span>}</span>
+<span id="cb500-4"><a href="#cb500-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\ExplSyntaxOn</span></span>
+<span id="cb500-5"><a href="#cb500-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\cs</span>_new:Nn</span>
+<span id="cb500-6"><a href="#cb500-6" aria-hidden="true" tabindex="-1"></a> <span class="fu">\display</span>_raw_content:nn</span>
+<span id="cb500-7"><a href="#cb500-7" aria-hidden="true" tabindex="-1"></a> {</span>
+<span id="cb500-8"><a href="#cb500-8" aria-hidden="true" tabindex="-1"></a> <span class="co">% If the raw attribute is TeX, execute the content as a TeX document.</span></span>
+<span id="cb500-9"><a href="#cb500-9" aria-hidden="true" tabindex="-1"></a> <span class="fu">\str</span>_if_eq:nnTF</span>
+<span id="cb500-10"><a href="#cb500-10" aria-hidden="true" tabindex="-1"></a> { #2 }</span>
+<span id="cb500-11"><a href="#cb500-11" aria-hidden="true" tabindex="-1"></a> { tex }</span>
+<span id="cb500-12"><a href="#cb500-12" aria-hidden="true" tabindex="-1"></a> { <span class="fu">\markdownEscape</span> { #1 } }</span>
+<span id="cb500-13"><a href="#cb500-13" aria-hidden="true" tabindex="-1"></a> <span class="co">% Otherwise, ignore the content.</span></span>
+<span id="cb500-14"><a href="#cb500-14" aria-hidden="true" tabindex="-1"></a> { }</span>
+<span id="cb500-15"><a href="#cb500-15" aria-hidden="true" tabindex="-1"></a> }</span>
+<span id="cb500-16"><a href="#cb500-16" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
+<span id="cb500-17"><a href="#cb500-17" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
+<span id="cb500-18"><a href="#cb500-18" aria-hidden="true" tabindex="-1"></a> rawInline = { <span class="fu">\display</span>_raw_content:nn { #1 } { #2 } },</span>
+<span id="cb500-19"><a href="#cb500-19" aria-hidden="true" tabindex="-1"></a> rawBlock = { <span class="fu">\display</span>_raw_content:nn { #1 } { #2 } }</span>
+<span id="cb500-20"><a href="#cb500-20" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb500-21"><a href="#cb500-21" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb500-22"><a href="#cb500-22" aria-hidden="true" tabindex="-1"></a><span class="fu">\ExplSyntaxOff</span></span>
+<span id="cb500-23"><a href="#cb500-23" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb500-24"><a href="#cb500-24" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb500-25"><a href="#cb500-25" aria-hidden="true" tabindex="-1"></a>`<span class="ss">$H_2 O$</span>`{=tex} is a liquid.</span>
+<span id="cb500-26"><a href="#cb500-26" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb500-27"><a href="#cb500-27" aria-hidden="true" tabindex="-1"></a>``` {=html}</span>
+<span id="cb500-28"><a href="#cb500-28" aria-hidden="true" tabindex="-1"></a>&lt;p&gt;Here is some HTML content that will be ignored.&lt;/p&gt;</span>
+<span id="cb500-29"><a href="#cb500-29" aria-hidden="true" tabindex="-1"></a>```</span>
+<span id="cb500-30"><a href="#cb500-30" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb500-31"><a href="#cb500-31" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
<div class="sourceCode" id="cb501"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb501-1"><a href="#cb501-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></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>
+<p>H<sub>2</sub>O is a liquid.</p>
</blockquote>
-<h4 data-number="2.3.1.24" id="table-renderer"><span
-class="header-section-number">2.3.1.24</span> Table Renderer</h4>
-<p>The <code>\markdownRendererTable</code> macro represents a table.
-This macro will only be produced, when the
-<strong><code>pipeTables</code></strong> option is enabled. The macro
-receives the parameters
-<code>{</code>⟨<em>caption</em>⟩<code>}{</code>⟨<em>number of
-rows</em>⟩<code>}{</code>⟨<em>number of columns</em>⟩<code>}</code>
-followed by <code>{</code>⟨<em>alignments</em>⟩<code>}</code> and then
-by <code>{</code>⟨<em>row</em>⟩<code>}</code> repeated ⟨<em>number of
-rows</em>⟩ times, where ⟨<em>row</em>⟩ is
-<code>{</code>⟨<em>column</em>⟩<code>}</code> repeated ⟨<em>number of
-columns</em>⟩ times, ⟨<em>alignments</em>⟩ is ⟨<em>alignment</em>⟩
-repeated ⟨<em>number of columns</em>⟩ times, and ⟨<em>alignment</em>⟩ is
-one of the following:</p>
+<h4 data-number="2.3.1.26" id="special-character-renderers"><span
+class="header-section-number">2.3.1.26</span> Special Character
+Renderers</h4>
+<p>The following macros replace any special plain <span
+class="tex">T<sub>e</sub>X</span> characters, including the active pipe
+character (<code>|</code>) of Con<span
+class="tex">T<sub>e</sub>X</span>t, in the input text:</p>
<ul>
-<li><code>d</code> – The corresponding column has an unspecified
-(default) alignment.</li>
-<li><code>l</code> – The corresponding column is left-aligned.</li>
-<li><code>c</code> – The corresponding column is centered.</li>
-<li><code>r</code> – The corresponding column is right-aligned.</li>
+<li><code>\markdownRendererAmpersand</code> replaces the ampersand
+(<code>&amp;</code>).</li>
+<li><code>\markdownRendererBackslash</code> replaces the backslash
+(<code>\</code>).</li>
+<li><code>\markdownRendererCircumflex</code> replaces the circumflex
+(<code>^</code>).</li>
+<li><code>\markdownRendererDollarSign</code> replaces the dollar sign
+(<code>$</code>).</li>
+<li><code>\markdownRendererHash</code> replaces the hash sign
+(<code>#</code>).</li>
+<li><code>\markdownRendererLeftBrace</code> replaces the left brace
+(<code>{</code>).</li>
+<li><code>\markdownRendererPercentSign</code> replaces the percent sign
+(<code>%</code>).</li>
+<li><code>\markdownRendererPipe</code> replaces the pipe character
+(<code>|</code>).</li>
+<li><code>\markdownRendererRightBrace</code> replaces the right brace
+(<code>}</code>).</li>
+<li><code>\markdownRendererTilde</code> replaces the tilde
+(<code>~</code>).</li>
+<li><code>\markdownRendererUnderscore</code> replaces the underscore
+(<code>_</code>).</li>
</ul>
-<h5 class="unnumbered" id="latex-example-67"><span
-class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
+<h5 class="unnumbered" id="plain-tex-example-31">Plain <span
+class="tex">T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
-<code>document.tex</code> with the following content:</p>
+<code>document.tex</code> with the following content. We will make the
+tilde behave as if it were written in <span
+class="tex">T<sub>e</sub>X</span>, where it represents a non-breaking
+space.</p>
<div class="sourceCode" id="cb502"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb502-1"><a href="#cb502-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb502-2"><a href="#cb502-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[pipeTables, tableCaptions]{<span class="ex">markdown</span>}</span>
-<span id="cb502-3"><a href="#cb502-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\newcount\rowCounter</span></span>
-<span id="cb502-4"><a href="#cb502-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\newcount\columnCounter</span></span>
-<span id="cb502-5"><a href="#cb502-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\makeatletter</span></span>
-<span id="cb502-6"><a href="#cb502-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\processRow</span>#1{<span class="co">%</span></span>
-<span id="cb502-7"><a href="#cb502-7" aria-hidden="true" tabindex="-1"></a> <span class="fu">\columnCounter</span>=1<span class="co">%</span></span>
-<span id="cb502-8"><a href="#cb502-8" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum\rowCounter</span>=0<span class="fu">\relax</span></span>
-<span id="cb502-9"><a href="#cb502-9" aria-hidden="true" tabindex="-1"></a> As for the alignment,</span>
-<span id="cb502-10"><a href="#cb502-10" aria-hidden="true" tabindex="-1"></a> <span class="fu">\else</span></span>
-<span id="cb502-11"><a href="#cb502-11" aria-hidden="true" tabindex="-1"></a> In row <span class="fu">\the\rowCounter</span>,</span>
-<span id="cb502-12"><a href="#cb502-12" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi</span></span>
-<span id="cb502-13"><a href="#cb502-13" aria-hidden="true" tabindex="-1"></a> <span class="fu">\processColumn</span>#1</span>
-<span id="cb502-14"><a href="#cb502-14" aria-hidden="true" tabindex="-1"></a> <span class="fu">\advance\rowCounter</span> by 1<span class="fu">\relax</span></span>
-<span id="cb502-15"><a href="#cb502-15" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum\rowCounter</span>&gt;<span class="fu">\rowTotal\relax</span></span>
-<span id="cb502-16"><a href="#cb502-16" aria-hidden="true" tabindex="-1"></a> <span class="fu">\expandafter\@gobble</span></span>
-<span id="cb502-17"><a href="#cb502-17" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi\processRow</span>}<span class="co">%</span></span>
-<span id="cb502-18"><a href="#cb502-18" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\processColumn</span>#1{<span class="co">%</span></span>
-<span id="cb502-19"><a href="#cb502-19" aria-hidden="true" tabindex="-1"></a> column number <span class="fu">\the\columnCounter</span>{}</span>
-<span id="cb502-20"><a href="#cb502-20" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum\rowCounter</span>=0<span class="fu">\relax</span></span>
-<span id="cb502-21"><a href="#cb502-21" aria-hidden="true" tabindex="-1"></a> <span class="fu">\if</span>#1d{}has default alignment<span class="fu">\fi</span></span>
-<span id="cb502-22"><a href="#cb502-22" aria-hidden="true" tabindex="-1"></a> <span class="fu">\if</span>#1l{}is left-aligned<span class="fu">\fi</span></span>
-<span id="cb502-23"><a href="#cb502-23" aria-hidden="true" tabindex="-1"></a> <span class="fu">\if</span>#1c{}is centered<span class="fu">\fi</span></span>
-<span id="cb502-24"><a href="#cb502-24" aria-hidden="true" tabindex="-1"></a> <span class="fu">\if</span>#1r{}is right-aligned<span class="fu">\fi</span></span>
-<span id="cb502-25"><a href="#cb502-25" aria-hidden="true" tabindex="-1"></a> <span class="fu">\else</span></span>
-<span id="cb502-26"><a href="#cb502-26" aria-hidden="true" tabindex="-1"></a> says <span class="fu">\emph</span>{#1}<span class="co">%</span></span>
-<span id="cb502-27"><a href="#cb502-27" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi</span></span>
-<span id="cb502-28"><a href="#cb502-28" aria-hidden="true" tabindex="-1"></a> <span class="fu">\advance\columnCounter</span> by 1<span class="fu">\relax</span></span>
-<span id="cb502-29"><a href="#cb502-29" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum\columnCounter</span>&lt;<span class="fu">\columnTotal\relax</span>, <span class="fu">\fi</span></span>
-<span id="cb502-30"><a href="#cb502-30" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum\columnCounter</span>=<span class="fu">\columnTotal\relax</span>, and <span class="fu">\fi</span></span>
-<span id="cb502-31"><a href="#cb502-31" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum\columnCounter</span>&gt;<span class="fu">\columnTotal\relax</span></span>
-<span id="cb502-32"><a href="#cb502-32" aria-hidden="true" tabindex="-1"></a> .<span class="fu">\expandafter\@gobble</span></span>
-<span id="cb502-33"><a href="#cb502-33" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi\processColumn</span>}<span class="co">%</span></span>
-<span id="cb502-34"><a href="#cb502-34" aria-hidden="true" tabindex="-1"></a><span class="fu">\makeatother</span></span>
-<span id="cb502-35"><a href="#cb502-35" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
-<span id="cb502-36"><a href="#cb502-36" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
-<span id="cb502-37"><a href="#cb502-37" aria-hidden="true" tabindex="-1"></a> table = {<span class="co">%</span></span>
-<span id="cb502-38"><a href="#cb502-38" aria-hidden="true" tabindex="-1"></a> This is a table with caption <span class="fu">\emph</span>{#1} that is #3 colums wide</span>
-<span id="cb502-39"><a href="#cb502-39" aria-hidden="true" tabindex="-1"></a> and #2 rows long.</span>
-<span id="cb502-40"><a href="#cb502-40" aria-hidden="true" tabindex="-1"></a> <span class="fu">\rowCounter</span>=0<span class="co">%</span></span>
-<span id="cb502-41"><a href="#cb502-41" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\rowTotal</span>{#2}<span class="co">%</span></span>
-<span id="cb502-42"><a href="#cb502-42" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\columnTotal</span>{#3}<span class="co">%</span></span>
-<span id="cb502-43"><a href="#cb502-43" aria-hidden="true" tabindex="-1"></a> <span class="fu">\processRow</span></span>
-<span id="cb502-44"><a href="#cb502-44" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb502-45"><a href="#cb502-45" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb502-46"><a href="#cb502-46" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb502-47"><a href="#cb502-47" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb502-48"><a href="#cb502-48" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb502-49"><a href="#cb502-49" aria-hidden="true" tabindex="-1"></a>| Right | Left | Default | Center |</span>
-<span id="cb502-50"><a href="#cb502-50" aria-hidden="true" tabindex="-1"></a>|------:|:-----|---------|:------:|</span>
-<span id="cb502-51"><a href="#cb502-51" aria-hidden="true" tabindex="-1"></a>| 12 | 12 | 12 | 12 |</span>
-<span id="cb502-52"><a href="#cb502-52" aria-hidden="true" tabindex="-1"></a>| 123 | 123 | 123 | 123 |</span>
-<span id="cb502-53"><a href="#cb502-53" aria-hidden="true" tabindex="-1"></a>| 1 | 1 | 1 | 1 |</span>
-<span id="cb502-54"><a href="#cb502-54" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb502-55"><a href="#cb502-55" aria-hidden="true" tabindex="-1"></a> : Demonstration of pipe table syntax</span>
-<span id="cb502-56"><a href="#cb502-56" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb502-57"><a href="#cb502-57" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb502-1"><a href="#cb502-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
+<span id="cb502-2"><a href="#cb502-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererTilde</span>{~}</span>
+<span id="cb502-3"><a href="#cb502-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
+<span id="cb502-4"><a href="#cb502-4" aria-hidden="true" tabindex="-1"></a>Bartel~Leendert van~der~Waerden</span>
+<span id="cb502-5"><a href="#cb502-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
+<span id="cb502-6"><a href="#cb502-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
<div class="sourceCode" id="cb503"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb503-1"><a href="#cb503-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb503-1"><a href="#cb503-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
-contain the following text:</p>
+contain the following text, where the middot (<code>·</code>) denotes a
+non-breaking space:</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>
+<p>Bartel·Leendert van·der·Waerden</p>
</blockquote>
-<h4 data-number="2.3.1.25" id="html-comment-renderers"><span
-class="header-section-number">2.3.1.25</span> HTML Comment
-Renderers</h4>
-<p>The <code>\markdownRendererInlineHtmlComment</code> macro represents
-the contents of an inline <abbr>HTML</abbr> comment. This macro will
-only be produced, when the <strong><code>html</code></strong> option is
-enabled. The macro receives a single argument that corresponds to the
-contents of the <abbr>HTML</abbr> comment.</p>
-<p>The <code>\markdownRendererBlockHtmlCommentBegin</code> and
-<code>\markdownRendererBlockHtmlCommentEnd</code> macros represent the
-beginning and the end of a block <abbr>HTML</abbr> comment. The macros
-receive no arguments.</p>
-<h5 class="unnumbered" id="latex-example-68"><span
+<h5 class="unnumbered" id="latex-example-72"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
-<code>document.tex</code> with the following content:</p>
+<code>document.tex</code> with the following content. We will make the
+tilde behave as if it were written in <span
+class="tex">T<sub>e</sub>X</span>, where it represents a non-breaking
+space.</p>
<div class="sourceCode" id="cb504"><pre
class="sourceCode tex"><code class="sourceCode latex"><span id="cb504-1"><a href="#cb504-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb504-2"><a href="#cb504-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[html]{<span class="ex">markdown</span>}</span>
-<span id="cb504-3"><a href="#cb504-3" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">marginnote</span>}</span>
-<span id="cb504-4"><a href="#cb504-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
-<span id="cb504-5"><a href="#cb504-5" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
-<span id="cb504-6"><a href="#cb504-6" aria-hidden="true" tabindex="-1"></a> inlineHtmlComment = {<span class="fu">\marginnote</span>{#1}},</span>
-<span id="cb504-7"><a href="#cb504-7" aria-hidden="true" tabindex="-1"></a> blockHtmlCommentBegin = {<span class="kw">\begin</span>{<span class="ex">quote</span>}},</span>
-<span id="cb504-8"><a href="#cb504-8" aria-hidden="true" tabindex="-1"></a> blockHtmlCommentEnd = {<span class="kw">\end</span>{<span class="ex">quote</span>}},</span>
-<span id="cb504-9"><a href="#cb504-9" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb504-10"><a href="#cb504-10" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb504-11"><a href="#cb504-11" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb504-12"><a href="#cb504-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb504-13"><a href="#cb504-13" aria-hidden="true" tabindex="-1"></a>A useful use of inline HTML comments are side notes.</span>
-<span id="cb504-14"><a href="#cb504-14" aria-hidden="true" tabindex="-1"></a>&lt;!-- Side notes are displayed in the horizontal margins next to the relevant</span>
-<span id="cb504-15"><a href="#cb504-15" aria-hidden="true" tabindex="-1"></a>passages, which makes them *easier for the reader to find* than notes. --&gt;</span>
-<span id="cb504-16"><a href="#cb504-16" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb504-17"><a href="#cb504-17" aria-hidden="true" tabindex="-1"></a>We can render block HTML comments as blockquotes:</span>
-<span id="cb504-18"><a href="#cb504-18" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb504-19"><a href="#cb504-19" aria-hidden="true" tabindex="-1"></a>&lt;!--</span>
-<span id="cb504-20"><a href="#cb504-20" aria-hidden="true" tabindex="-1"></a>Here is a block HTML comment with a code example that a programmer might understand:</span>
-<span id="cb504-21"><a href="#cb504-21" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb504-22"><a href="#cb504-22" aria-hidden="true" tabindex="-1"></a> foo = bar + baz - 42</span>
-<span id="cb504-23"><a href="#cb504-23" aria-hidden="true" tabindex="-1"></a>--&gt;</span>
-<span id="cb504-24"><a href="#cb504-24" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb504-25"><a href="#cb504-25" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<span id="cb504-2"><a href="#cb504-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span>
+<span id="cb504-3"><a href="#cb504-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
+<span id="cb504-4"><a href="#cb504-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
+<span id="cb504-5"><a href="#cb504-5" aria-hidden="true" tabindex="-1"></a> tilde = ~,</span>
+<span id="cb504-6"><a href="#cb504-6" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb504-7"><a href="#cb504-7" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb504-8"><a href="#cb504-8" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb504-9"><a href="#cb504-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb504-10"><a href="#cb504-10" aria-hidden="true" tabindex="-1"></a>Bartel~Leendert van~der~Waerden</span>
+<span id="cb504-11"><a href="#cb504-11" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb504-12"><a href="#cb504-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
<div class="sourceCode" id="cb505"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb505-1"><a href="#cb505-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span>
-<span id="cb505-2"><a href="#cb505-2" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb505-1"><a href="#cb505-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
-contain the following body text:</p>
-<blockquote>
-<p>A useful use of HTML comments are side notes.</p>
-<p>We can render block HTML comments as blockquotes:</p>
+contain the following text, where the middot (<code>·</code>) denotes a
+non-breaking space:</p>
<blockquote>
-<p>Here is a block HTML comment with a code example that a programmer
-might understand:</p>
-<pre><code>foo = bar + baz - 42</code></pre>
-</blockquote>
+<p>Bartel·Leendert van·der·Waerden</p>
</blockquote>
-<p>The horizontal margins should contain the following text:</p>
+<h5 class="unnumbered" id="context-example-45">Con<span
+class="tex">T<sub>e</sub>X</span>t Example</h5>
+<p>Using a text editor, create a text document named
+<code>document.tex</code> with the following content. We will make the
+tilde behave as if it were written in <span
+class="tex">T<sub>e</sub>X</span>, where it represents a non-breaking
+space.</p>
+<div class="sourceCode" id="cb506"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb506-1"><a href="#cb506-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
+<span id="cb506-2"><a href="#cb506-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererTilde</span>{~}</span>
+<span id="cb506-3"><a href="#cb506-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
+<span id="cb506-4"><a href="#cb506-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb506-5"><a href="#cb506-5" aria-hidden="true" tabindex="-1"></a>Bartel~Leendert van~der~Waerden</span>
+<span id="cb506-6"><a href="#cb506-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb506-7"><a href="#cb506-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
+<p>Next, invoke LuaTeX from the terminal:</p>
+<div class="sourceCode" id="cb507"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb507-1"><a href="#cb507-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
+<p>A PDF document named <code>document.pdf</code> should be produced and
+contain the following text, where the middot (<code>·</code>) denotes a
+non-breaking space:</p>
<blockquote>
-<p>Side notes are displayed in the horizontal margins next to the
-relevant passages, which makes them <em>easier for the reader to
-find</em> than notes.</p>
+<p>Bartel·Leendert van·der·Waerden</p>
</blockquote>
-<h4 data-number="2.3.1.26" id="html-tag-and-element-renderers"><span
-class="header-section-number">2.3.1.26</span> HTML Tag and Element
-Renderers</h4>
-<p>The <code>\markdownRendererInlineHtmlTag</code> macro represents an
-opening, closing, or empty inline <abbr>HTML</abbr> tag. This macro will
-only be produced, when the <strong><code>html</code></strong> option is
-enabled. The macro receives a single argument that corresponds to the
-contents of the <abbr>HTML</abbr> tag.</p>
-<p>The <code>\markdownRendererInputBlockHtmlElement</code> macro
-represents a block <abbr>HTML</abbr> element. This macro will only be
-produced, when the <strong><code>html</code></strong> option is enabled.
-The macro receives a single argument that filename of a file containing
-the contents of the <abbr>HTML</abbr> element.</p>
-<h5 class="unnumbered" id="latex-example-69"><span
-class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
+<h4 data-number="2.3.1.27" id="strike-through-renderer"><span
+class="header-section-number">2.3.1.27</span> Strike-Through
+Renderer</h4>
+<p>The <code>\markdownRendererStrikeThrough</code> macro represents a
+strike-through span of text. The macro receives a single argument that
+corresponds to the striked-out span of text. This macro will only be
+produced, when the <strong><code>strikeThrough</code></strong> option is
+enabled.</p>
+<h5 class="unnumbered" id="plain-tex-example-32">Plain <span
+class="tex">T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
-<div class="sourceCode" id="cb507"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb507-1"><a href="#cb507-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb507-2"><a href="#cb507-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[html]{<span class="ex">markdown</span>}</span>
-<span id="cb507-3"><a href="#cb507-3" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">marginnote</span>}</span>
-<span id="cb507-4"><a href="#cb507-4" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">verbatim</span>}</span>
-<span id="cb507-5"><a href="#cb507-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
-<span id="cb507-6"><a href="#cb507-6" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
-<span id="cb507-7"><a href="#cb507-7" aria-hidden="true" tabindex="-1"></a> inlineHtmlTag = {<span class="fu">\textbf</span>{#1}},</span>
-<span id="cb507-8"><a href="#cb507-8" aria-hidden="true" tabindex="-1"></a> inputBlockHtmlElement = {<span class="fu">\verbatiminput</span>{#1}},</span>
-<span id="cb507-9"><a href="#cb507-9" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb507-10"><a href="#cb507-10" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb507-11"><a href="#cb507-11" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb507-12"><a href="#cb507-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb507-13"><a href="#cb507-13" aria-hidden="true" tabindex="-1"></a>&lt;b&gt;_Hello,_ world!&lt;/b&gt;&lt;br/&gt;</span>
-<span id="cb507-14"><a href="#cb507-14" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb507-15"><a href="#cb507-15" aria-hidden="true" tabindex="-1"></a>&lt;div&gt;_Hello,_ world!&lt;/div&gt;</span>
-<span id="cb507-16"><a href="#cb507-16" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb507-17"><a href="#cb507-17" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
-<p>Next, invoke LuaTeX from the terminal:</p>
<div class="sourceCode" id="cb508"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb508-1"><a href="#cb508-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span>
-<span id="cb508-2"><a href="#cb508-2" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb508-1"><a href="#cb508-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
+<span id="cb508-2"><a href="#cb508-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionStrikeThrough</span>{true}</span>
+<span id="cb508-3"><a href="#cb508-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> soulutf8.sty</span>
+<span id="cb508-4"><a href="#cb508-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererStrikeThrough</span>#1{<span class="fu">\st</span>{#1}}</span>
+<span id="cb508-5"><a href="#cb508-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
+<span id="cb508-6"><a href="#cb508-6" aria-hidden="true" tabindex="-1"></a>This is ~~a lunar roving vehicle~~ strike-through text.</span>
+<span id="cb508-7"><a href="#cb508-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
+<span id="cb508-8"><a href="#cb508-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
+<p>Next, invoke LuaTeX from the terminal:</p>
+<div class="sourceCode" id="cb509"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb509-1"><a href="#cb509-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
-contain the following body text:</p>
+contain the following text:</p>
<blockquote>
-<p><strong><b></strong>_Hello,_ world!<strong></b><br/></strong></p>
-<pre><code>&lt;div&gt;_Hello,_ world!&lt;/div&gt;</code></pre>
+<p>This is <del>a lunar roving vehicle</del> strike-through text.</p>
</blockquote>
-<h4 data-number="2.3.1.27" id="attribute-renderers"><span
-class="header-section-number">2.3.1.27</span> Attribute Renderers</h4>
-<p>The following macros are only produced, when the
-<strong><code>headerAttributes</code></strong> option is enabled.</p>
-<p><code>\markdownRendererAttributeIdentifier</code> represents the
-⟨<em>identifier</em>⟩ of a markdown element
-(<code>id="</code>⟨<em>identifier</em>⟩<code>"</code> in HTML and
-<code>#</code>⟨<em>identifier</em>⟩ in Markdown’s
-<strong><code>headerAttributes</code></strong> syntax extension). The
-macro receives a single attribute that corresponds to the
-⟨<em>identifier</em>⟩.</p>
-<p><code>\markdownRendererAttributeClassName</code> represents the
-⟨<em>class name</em>⟩ of a markdown element
-(<code>class="</code>⟨<em>class name</em>⟩ …<code>"</code> in HTML and
-<code>.</code>⟨<em>class name</em>⟩ in Markdown’s
-<strong><code>headerAttributes</code></strong> syntax extension). The
-macro receives a single attribute that corresponds to the .</p>
-<p><code>\markdownRendererAttributeKeyValue</code> represents a HTML
-attribute in the form ⟨<em>key</em>⟩<code>=</code>⟨<em>value</em>⟩ that
-is neither an identifier nor a class name. The macro receives two
-attributes that correspond to the ⟨<em>key</em>⟩ and the
-⟨<em>value</em>⟩, respectively.</p>
-<h5 class="unnumbered" id="latex-example-70"><span
+<h5 class="unnumbered" id="latex-example-73"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
<div class="sourceCode" id="cb510"><pre
class="sourceCode tex"><code class="sourceCode latex"><span id="cb510-1"><a href="#cb510-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb510-2"><a href="#cb510-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[headerAttributes, underscores=false]{<span class="ex">markdown</span>}</span>
-<span id="cb510-3"><a href="#cb510-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
-<span id="cb510-4"><a href="#cb510-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
-<span id="cb510-5"><a href="#cb510-5" aria-hidden="true" tabindex="-1"></a> attributeIdentifier = {<span class="co">%</span></span>
-<span id="cb510-6"><a href="#cb510-6" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
-<span id="cb510-7"><a href="#cb510-7" aria-hidden="true" tabindex="-1"></a> <span class="fu">\emph</span>{(Identifier: #1)}</span>
-<span id="cb510-8"><a href="#cb510-8" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
-<span id="cb510-9"><a href="#cb510-9" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb510-10"><a href="#cb510-10" aria-hidden="true" tabindex="-1"></a> attributeClassName = {<span class="co">%</span></span>
-<span id="cb510-11"><a href="#cb510-11" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
-<span id="cb510-12"><a href="#cb510-12" aria-hidden="true" tabindex="-1"></a> <span class="fu">\emph</span>{(Class name: #1)}</span>
-<span id="cb510-13"><a href="#cb510-13" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
-<span id="cb510-14"><a href="#cb510-14" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb510-15"><a href="#cb510-15" aria-hidden="true" tabindex="-1"></a> attributeKeyValue = {<span class="co">%</span></span>
-<span id="cb510-16"><a href="#cb510-16" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
-<span id="cb510-17"><a href="#cb510-17" aria-hidden="true" tabindex="-1"></a> <span class="fu">\emph</span>{(Key: #1, Value: #2)}</span>
-<span id="cb510-18"><a href="#cb510-18" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
-<span id="cb510-19"><a href="#cb510-19" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb510-20"><a href="#cb510-20" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb510-21"><a href="#cb510-21" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb510-22"><a href="#cb510-22" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb510-23"><a href="#cb510-23" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb510-24"><a href="#cb510-24" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb510-25"><a href="#cb510-25" aria-hidden="true" tabindex="-1"></a># First top-level heading {jane=doe}</span>
-<span id="cb510-26"><a href="#cb510-26" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb510-27"><a href="#cb510-27" aria-hidden="true" tabindex="-1"></a>## A subheading {#identifier}</span>
-<span id="cb510-28"><a href="#cb510-28" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb510-29"><a href="#cb510-29" aria-hidden="true" tabindex="-1"></a># Second top-level heading {.class_name}</span>
-<span id="cb510-30"><a href="#cb510-30" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb510-31"><a href="#cb510-31" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb510-32"><a href="#cb510-32" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<span id="cb510-2"><a href="#cb510-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[strikeThrough]{<span class="ex">markdown</span>}</span>
+<span id="cb510-3"><a href="#cb510-3" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">soulutf8</span>}</span>
+<span id="cb510-4"><a href="#cb510-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
+<span id="cb510-5"><a href="#cb510-5" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
+<span id="cb510-6"><a href="#cb510-6" aria-hidden="true" tabindex="-1"></a> strikeThrough = {<span class="fu">\st</span>{#1}},</span>
+<span id="cb510-7"><a href="#cb510-7" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb510-8"><a href="#cb510-8" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb510-9"><a href="#cb510-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb510-10"><a href="#cb510-10" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb510-11"><a href="#cb510-11" aria-hidden="true" tabindex="-1"></a>This is ~~a lunar roving vehicle~~ strike-through text.</span>
+<span id="cb510-12"><a href="#cb510-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb510-13"><a href="#cb510-13" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
<div class="sourceCode" id="cb511"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb511-1"><a href="#cb511-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
-<h1 id="first-top-level-heading">First top-level heading</h1>
-<p><em>(Key: Jane, Value: Doe)</em></p>
-<h2 id="a-subheading">A subheading</h2>
-<p><em>(Identifier: identifier)</em></p>
-<h1 id="second-top-level-heading">Second top-level heading</h1>
-<p><em>(Class name: class_name)</em></p>
+<p>This is <del>a lunar roving vehicle</del> strike-through text.</p>
</blockquote>
-<h4 data-number="2.3.1.28" id="header-attribute-context-renderers"><span
-class="header-section-number">2.3.1.28</span> Header Attribute Context
-Renderers</h4>
-<p>The following macros are only produced, when the
-<strong><code>headerAttributes</code></strong> option is enabled.</p>
-<p>The <code>\markdownRendererHeaderAttributeContextBegin</code> and
-<code>\markdownRendererHeaderAttributeContextEnd</code> macros represent
-the beginning and the end of a section in which the attributes of a
-heading apply. The macros receive no arguments.</p>
-<h5 class="unnumbered" id="latex-example-71"><span
-class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
+<h5 class="unnumbered" id="context-example-46">Con<span
+class="tex">T<sub>e</sub>X</span>t Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
<div class="sourceCode" id="cb512"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb512-1"><a href="#cb512-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb512-2"><a href="#cb512-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[headerAttributes]{<span class="ex">markdown</span>}</span>
-<span id="cb512-3"><a href="#cb512-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
-<span id="cb512-4"><a href="#cb512-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
-<span id="cb512-5"><a href="#cb512-5" aria-hidden="true" tabindex="-1"></a> headerAttributeContextBegin = {<span class="co">%</span></span>
-<span id="cb512-6"><a href="#cb512-6" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
-<span id="cb512-7"><a href="#cb512-7" aria-hidden="true" tabindex="-1"></a> <span class="fu">\emph</span>{(The beginning of a header attribute context)}</span>
-<span id="cb512-8"><a href="#cb512-8" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
-<span id="cb512-9"><a href="#cb512-9" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb512-10"><a href="#cb512-10" aria-hidden="true" tabindex="-1"></a> headerAttributeContextBegin = {<span class="co">%</span></span>
-<span id="cb512-11"><a href="#cb512-11" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
-<span id="cb512-12"><a href="#cb512-12" aria-hidden="true" tabindex="-1"></a> <span class="fu">\emph</span>{(The end of a header attribute context)}</span>
-<span id="cb512-13"><a href="#cb512-13" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span>
-<span id="cb512-14"><a href="#cb512-14" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb512-15"><a href="#cb512-15" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb512-16"><a href="#cb512-16" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb512-17"><a href="#cb512-17" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb512-18"><a href="#cb512-18" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb512-19"><a href="#cb512-19" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb512-20"><a href="#cb512-20" aria-hidden="true" tabindex="-1"></a># First top-level heading</span>
-<span id="cb512-21"><a href="#cb512-21" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb512-22"><a href="#cb512-22" aria-hidden="true" tabindex="-1"></a>## A subheading {#identifier}</span>
-<span id="cb512-23"><a href="#cb512-23" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb512-24"><a href="#cb512-24" aria-hidden="true" tabindex="-1"></a># Second top-level heading {.class_name}</span>
-<span id="cb512-25"><a href="#cb512-25" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb512-26"><a href="#cb512-26" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb512-27"><a href="#cb512-27" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb512-1"><a href="#cb512-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
+<span id="cb512-2"><a href="#cb512-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[strikeThrough = yes]</span>
+<span id="cb512-3"><a href="#cb512-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererStrikeThrough</span>#1{<span class="fu">\overstrikes</span>{#1}}</span>
+<span id="cb512-4"><a href="#cb512-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
+<span id="cb512-5"><a href="#cb512-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb512-6"><a href="#cb512-6" aria-hidden="true" tabindex="-1"></a>This is ~~a lunar roving vehicle~~ strike-through text.</span>
+<span id="cb512-7"><a href="#cb512-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb512-8"><a href="#cb512-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
<div class="sourceCode" id="cb513"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb513-1"><a href="#cb513-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb513-1"><a href="#cb513-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
-<h1 id="first-top-level-heading-1">First top-level heading</h1>
-<p><em>(The beginning of a header attribute context)</em></p>
-<h2 id="a-subheading-1">A subheading</h2>
-<p><em>(The end of a header attribute context)</em></p>
-<p><em>(The beginning of a header attribute context)</em></p>
-<h1 id="second-top-level-heading-1">Second top-level heading</h1>
-<p><em>(The end of a header attribute context)</em></p>
+<p>This is <del>a lunar roving vehicle</del> strike-through text.</p>
</blockquote>
-<h4 data-number="2.3.1.29" id="strike-through-renderer"><span
-class="header-section-number">2.3.1.29</span> Strike-Through
-Renderer</h4>
-<p>The <code>\markdownRendererStrikeThrough</code> macro represents a
-strike-through span of text. The macro receives a single argument that
-corresponds to the striked-out span of text. This macro will only be
-produced, when the <strong><code>strikeThrough</code></strong> option is
+<h4 data-number="2.3.1.28" id="subscript-renderer"><span
+class="header-section-number">2.3.1.28</span> Subscript Renderer</h4>
+<p>The <code>\markdownRendererSubscript</code> macro represents a
+subscript span of text. The macro receives a single argument that
+corresponds to the subscript span of text. This macro will only be
+produced, when the <strong><code>subscripts</code></strong> option is
enabled.</p>
-<h5 class="unnumbered" id="plain-tex-example-34">Plain <span
+<h5 class="unnumbered" id="plain-tex-example-33">Plain <span
class="tex">T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
<div class="sourceCode" id="cb514"><pre
class="sourceCode tex"><code class="sourceCode latex"><span id="cb514-1"><a href="#cb514-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
-<span id="cb514-2"><a href="#cb514-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionStrikeThrough</span>{true}</span>
-<span id="cb514-3"><a href="#cb514-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> soulutf8.sty</span>
-<span id="cb514-4"><a href="#cb514-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererStrikeThrough</span>#1{<span class="fu">\st</span>{#1}}</span>
-<span id="cb514-5"><a href="#cb514-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
-<span id="cb514-6"><a href="#cb514-6" aria-hidden="true" tabindex="-1"></a>This is ~~a lunar roving vehicle~~ strike-through text.</span>
-<span id="cb514-7"><a href="#cb514-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
-<span id="cb514-8"><a href="#cb514-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
+<span id="cb514-2"><a href="#cb514-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionSubscripts</span>{true}</span>
+<span id="cb514-3"><a href="#cb514-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererSubscript</span>#1{ (#1 moles) and }</span>
+<span id="cb514-4"><a href="#cb514-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
+<span id="cb514-5"><a href="#cb514-5" aria-hidden="true" tabindex="-1"></a>H~2~O is a liquid.</span>
+<span id="cb514-6"><a href="#cb514-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
+<span id="cb514-7"><a href="#cb514-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
<div class="sourceCode" id="cb515"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb515-1"><a href="#cb515-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
-<p>This is <del>a lunar roving vehicle</del> strike-through text.</p>
+<p>H (2 moles) and O is a liquid.</p>
</blockquote>
-<h5 class="unnumbered" id="latex-example-72"><span
+<h5 class="unnumbered" id="latex-example-74"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
<div class="sourceCode" id="cb516"><pre
class="sourceCode tex"><code class="sourceCode latex"><span id="cb516-1"><a href="#cb516-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb516-2"><a href="#cb516-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[strikeThrough]{<span class="ex">markdown</span>}</span>
-<span id="cb516-3"><a href="#cb516-3" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">soulutf8</span>}</span>
-<span id="cb516-4"><a href="#cb516-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
-<span id="cb516-5"><a href="#cb516-5" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
-<span id="cb516-6"><a href="#cb516-6" aria-hidden="true" tabindex="-1"></a> strikeThrough = {<span class="fu">\st</span>{#1}},</span>
-<span id="cb516-7"><a href="#cb516-7" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb516-8"><a href="#cb516-8" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb516-9"><a href="#cb516-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb516-10"><a href="#cb516-10" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb516-11"><a href="#cb516-11" aria-hidden="true" tabindex="-1"></a>This is ~~a lunar roving vehicle~~ strike-through text.</span>
-<span id="cb516-12"><a href="#cb516-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb516-13"><a href="#cb516-13" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<span id="cb516-2"><a href="#cb516-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[subscripts]{<span class="ex">markdown</span>}</span>
+<span id="cb516-3"><a href="#cb516-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
+<span id="cb516-4"><a href="#cb516-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
+<span id="cb516-5"><a href="#cb516-5" aria-hidden="true" tabindex="-1"></a> subscript = { (#1 moles) and },</span>
+<span id="cb516-6"><a href="#cb516-6" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb516-7"><a href="#cb516-7" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb516-8"><a href="#cb516-8" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb516-9"><a href="#cb516-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb516-10"><a href="#cb516-10" aria-hidden="true" tabindex="-1"></a>H~2~O is a liquid.</span>
+<span id="cb516-11"><a href="#cb516-11" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb516-12"><a href="#cb516-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
<div class="sourceCode" id="cb517"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb517-1"><a href="#cb517-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
-<p>This is <del>a lunar roving vehicle</del> strike-through text.</p>
+<p>H (2 moles) and O is a liquid.</p>
</blockquote>
-<h5 class="unnumbered" id="context-example-49">Con<span
+<h5 class="unnumbered" id="context-example-47">Con<span
class="tex">T<sub>e</sub>X</span>t Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
<div class="sourceCode" id="cb518"><pre
class="sourceCode tex"><code class="sourceCode latex"><span id="cb518-1"><a href="#cb518-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
-<span id="cb518-2"><a href="#cb518-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[strikeThrough = yes]</span>
-<span id="cb518-3"><a href="#cb518-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererStrikeThrough</span>#1{<span class="fu">\overstrikes</span>{#1}}</span>
+<span id="cb518-2"><a href="#cb518-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[subscripts = yes]</span>
+<span id="cb518-3"><a href="#cb518-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererSubscript</span>#1{ (#1 moles) and }</span>
<span id="cb518-4"><a href="#cb518-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
<span id="cb518-5"><a href="#cb518-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb518-6"><a href="#cb518-6" aria-hidden="true" tabindex="-1"></a>This is ~~a lunar roving vehicle~~ strike-through text.</span>
+<span id="cb518-6"><a href="#cb518-6" aria-hidden="true" tabindex="-1"></a>H~2~O is a liquid.</span>
<span id="cb518-7"><a href="#cb518-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
<span id="cb518-8"><a href="#cb518-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
@@ -9583,16 +9532,16 @@ class="sourceCode sh"><code class="sourceCode bash"><span id="cb519-1"><a href="
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
-<p>This is <del>a lunar roving vehicle</del> strike-through text.</p>
+<p>H (2 moles) and O is a liquid.</p>
</blockquote>
-<h4 data-number="2.3.1.30" id="superscript-renderer"><span
-class="header-section-number">2.3.1.30</span> Superscript Renderer</h4>
+<h4 data-number="2.3.1.29" id="superscript-renderer"><span
+class="header-section-number">2.3.1.29</span> Superscript Renderer</h4>
<p>The <code>\markdownRendererSuperscript</code> macro represents a
superscript span of text. The macro receives a single argument that
corresponds to the superscript span of text. This macro will only be
produced, when the <strong><code>superscripts</code></strong> option is
enabled.</p>
-<h5 class="unnumbered" id="plain-tex-example-35">Plain <span
+<h5 class="unnumbered" id="plain-tex-example-34">Plain <span
class="tex">T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
@@ -9612,7 +9561,7 @@ contain the following text:</p>
<blockquote>
<p>2 taken to the power of 10 is 1024.</p>
</blockquote>
-<h5 class="unnumbered" id="latex-example-73"><span
+<h5 class="unnumbered" id="latex-example-75"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
@@ -9637,7 +9586,7 @@ contain the following text:</p>
<blockquote>
<p>2 taken to the power of 10 is 1024.</p>
</blockquote>
-<h5 class="unnumbered" id="context-example-50">Con<span
+<h5 class="unnumbered" id="context-example-48">Con<span
class="tex">T<sub>e</sub>X</span>t Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
@@ -9658,267 +9607,403 @@ contain the following text:</p>
<blockquote>
<p>2 taken to the power of 10 is 1024.</p>
</blockquote>
-<h4 data-number="2.3.1.31" id="subscript-renderer"><span
-class="header-section-number">2.3.1.31</span> Subscript Renderer</h4>
-<p>The <code>\markdownRendererSubscript</code> macro represents a
-subscript span of text. The macro receives a single argument that
-corresponds to the subscript span of text. This macro will only be
-produced, when the <strong><code>subscripts</code></strong> option is
-enabled.</p>
-<h5 class="unnumbered" id="plain-tex-example-36">Plain <span
-class="tex">T<sub>e</sub>X</span> Example</h5>
+<h4 data-number="2.3.1.30" id="table-renderer"><span
+class="header-section-number">2.3.1.30</span> Table Renderer</h4>
+<p>The <code>\markdownRendererTable</code> macro represents a table.
+This macro will only be produced, when the
+<strong><code>pipeTables</code></strong> option is enabled. The macro
+receives the parameters
+<code>{</code>⟨<em>caption</em>⟩<code>}{</code>⟨<em>number of
+rows</em>⟩<code>}{</code>⟨<em>number of columns</em>⟩<code>}</code>
+followed by <code>{</code>⟨<em>alignments</em>⟩<code>}</code> and then
+by <code>{</code>⟨<em>row</em>⟩<code>}</code> repeated ⟨<em>number of
+rows</em>⟩ times, where ⟨<em>row</em>⟩ is
+<code>{</code>⟨<em>column</em>⟩<code>}</code> repeated ⟨<em>number of
+columns</em>⟩ times, ⟨<em>alignments</em>⟩ is ⟨<em>alignment</em>⟩
+repeated ⟨<em>number of columns</em>⟩ times, and ⟨<em>alignment</em>⟩ is
+one of the following:</p>
+<ul>
+<li><code>d</code> – The corresponding column has an unspecified
+(default) alignment.</li>
+<li><code>l</code> – The corresponding column is left-aligned.</li>
+<li><code>c</code> – The corresponding column is centered.</li>
+<li><code>r</code> – The corresponding column is right-aligned.</li>
+</ul>
+<h5 class="unnumbered" id="latex-example-76"><span
+class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
<div class="sourceCode" id="cb526"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb526-1"><a href="#cb526-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
-<span id="cb526-2"><a href="#cb526-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionSubscripts</span>{true}</span>
-<span id="cb526-3"><a href="#cb526-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererSubscript</span>#1{ (#1 moles) and }</span>
-<span id="cb526-4"><a href="#cb526-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
-<span id="cb526-5"><a href="#cb526-5" aria-hidden="true" tabindex="-1"></a>H~2~O is a liquid.</span>
-<span id="cb526-6"><a href="#cb526-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
-<span id="cb526-7"><a href="#cb526-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb526-1"><a href="#cb526-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb526-2"><a href="#cb526-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[pipeTables, tableCaptions]{<span class="ex">markdown</span>}</span>
+<span id="cb526-3"><a href="#cb526-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\newcount\rowCounter</span></span>
+<span id="cb526-4"><a href="#cb526-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\newcount\columnCounter</span></span>
+<span id="cb526-5"><a href="#cb526-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\makeatletter</span></span>
+<span id="cb526-6"><a href="#cb526-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\processRow</span>#1{<span class="co">%</span></span>
+<span id="cb526-7"><a href="#cb526-7" aria-hidden="true" tabindex="-1"></a> <span class="fu">\columnCounter</span>=1<span class="co">%</span></span>
+<span id="cb526-8"><a href="#cb526-8" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum\rowCounter</span>=0<span class="fu">\relax</span></span>
+<span id="cb526-9"><a href="#cb526-9" aria-hidden="true" tabindex="-1"></a> As for the alignment,</span>
+<span id="cb526-10"><a href="#cb526-10" aria-hidden="true" tabindex="-1"></a> <span class="fu">\else</span></span>
+<span id="cb526-11"><a href="#cb526-11" aria-hidden="true" tabindex="-1"></a> In row <span class="fu">\the\rowCounter</span>,</span>
+<span id="cb526-12"><a href="#cb526-12" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi</span></span>
+<span id="cb526-13"><a href="#cb526-13" aria-hidden="true" tabindex="-1"></a> <span class="fu">\processColumn</span>#1</span>
+<span id="cb526-14"><a href="#cb526-14" aria-hidden="true" tabindex="-1"></a> <span class="fu">\advance\rowCounter</span> by 1<span class="fu">\relax</span></span>
+<span id="cb526-15"><a href="#cb526-15" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum\rowCounter</span>&gt;<span class="fu">\rowTotal\relax</span></span>
+<span id="cb526-16"><a href="#cb526-16" aria-hidden="true" tabindex="-1"></a> <span class="fu">\expandafter\@gobble</span></span>
+<span id="cb526-17"><a href="#cb526-17" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi\processRow</span>}<span class="co">%</span></span>
+<span id="cb526-18"><a href="#cb526-18" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\processColumn</span>#1{<span class="co">%</span></span>
+<span id="cb526-19"><a href="#cb526-19" aria-hidden="true" tabindex="-1"></a> column number <span class="fu">\the\columnCounter</span>{}</span>
+<span id="cb526-20"><a href="#cb526-20" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum\rowCounter</span>=0<span class="fu">\relax</span></span>
+<span id="cb526-21"><a href="#cb526-21" aria-hidden="true" tabindex="-1"></a> <span class="fu">\if</span>#1d{}has default alignment<span class="fu">\fi</span></span>
+<span id="cb526-22"><a href="#cb526-22" aria-hidden="true" tabindex="-1"></a> <span class="fu">\if</span>#1l{}is left-aligned<span class="fu">\fi</span></span>
+<span id="cb526-23"><a href="#cb526-23" aria-hidden="true" tabindex="-1"></a> <span class="fu">\if</span>#1c{}is centered<span class="fu">\fi</span></span>
+<span id="cb526-24"><a href="#cb526-24" aria-hidden="true" tabindex="-1"></a> <span class="fu">\if</span>#1r{}is right-aligned<span class="fu">\fi</span></span>
+<span id="cb526-25"><a href="#cb526-25" aria-hidden="true" tabindex="-1"></a> <span class="fu">\else</span></span>
+<span id="cb526-26"><a href="#cb526-26" aria-hidden="true" tabindex="-1"></a> says <span class="fu">\emph</span>{#1}<span class="co">%</span></span>
+<span id="cb526-27"><a href="#cb526-27" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi</span></span>
+<span id="cb526-28"><a href="#cb526-28" aria-hidden="true" tabindex="-1"></a> <span class="fu">\advance\columnCounter</span> by 1<span class="fu">\relax</span></span>
+<span id="cb526-29"><a href="#cb526-29" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum\columnCounter</span>&lt;<span class="fu">\columnTotal\relax</span>, <span class="fu">\fi</span></span>
+<span id="cb526-30"><a href="#cb526-30" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum\columnCounter</span>=<span class="fu">\columnTotal\relax</span>, and <span class="fu">\fi</span></span>
+<span id="cb526-31"><a href="#cb526-31" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum\columnCounter</span>&gt;<span class="fu">\columnTotal\relax</span></span>
+<span id="cb526-32"><a href="#cb526-32" aria-hidden="true" tabindex="-1"></a> .<span class="fu">\expandafter\@gobble</span></span>
+<span id="cb526-33"><a href="#cb526-33" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi\processColumn</span>}<span class="co">%</span></span>
+<span id="cb526-34"><a href="#cb526-34" aria-hidden="true" tabindex="-1"></a><span class="fu">\makeatother</span></span>
+<span id="cb526-35"><a href="#cb526-35" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
+<span id="cb526-36"><a href="#cb526-36" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
+<span id="cb526-37"><a href="#cb526-37" aria-hidden="true" tabindex="-1"></a> table = {<span class="co">%</span></span>
+<span id="cb526-38"><a href="#cb526-38" aria-hidden="true" tabindex="-1"></a> This is a table with caption <span class="fu">\emph</span>{#1} that is #3 colums wide</span>
+<span id="cb526-39"><a href="#cb526-39" aria-hidden="true" tabindex="-1"></a> and #2 rows long.</span>
+<span id="cb526-40"><a href="#cb526-40" aria-hidden="true" tabindex="-1"></a> <span class="fu">\rowCounter</span>=0<span class="co">%</span></span>
+<span id="cb526-41"><a href="#cb526-41" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\rowTotal</span>{#2}<span class="co">%</span></span>
+<span id="cb526-42"><a href="#cb526-42" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\columnTotal</span>{#3}<span class="co">%</span></span>
+<span id="cb526-43"><a href="#cb526-43" aria-hidden="true" tabindex="-1"></a> <span class="fu">\processRow</span></span>
+<span id="cb526-44"><a href="#cb526-44" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb526-45"><a href="#cb526-45" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb526-46"><a href="#cb526-46" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb526-47"><a href="#cb526-47" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb526-48"><a href="#cb526-48" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb526-49"><a href="#cb526-49" aria-hidden="true" tabindex="-1"></a>| Right | Left | Default | Center |</span>
+<span id="cb526-50"><a href="#cb526-50" aria-hidden="true" tabindex="-1"></a>|------:|:-----|---------|:------:|</span>
+<span id="cb526-51"><a href="#cb526-51" aria-hidden="true" tabindex="-1"></a>| 12 | 12 | 12 | 12 |</span>
+<span id="cb526-52"><a href="#cb526-52" aria-hidden="true" tabindex="-1"></a>| 123 | 123 | 123 | 123 |</span>
+<span id="cb526-53"><a href="#cb526-53" aria-hidden="true" tabindex="-1"></a>| 1 | 1 | 1 | 1 |</span>
+<span id="cb526-54"><a href="#cb526-54" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb526-55"><a href="#cb526-55" aria-hidden="true" tabindex="-1"></a> : Demonstration of pipe table syntax</span>
+<span id="cb526-56"><a href="#cb526-56" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb526-57"><a href="#cb526-57" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
<div class="sourceCode" id="cb527"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb527-1"><a href="#cb527-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb527-1"><a href="#cb527-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
-<p>H (2 moles) and O is a liquid.</p>
+<p>This is a table with caption <em>Demonstration of pipe table
+syntax</em> that is 4 colums wide and 4 rows long. As for the alignment,
+column number 1 is right-aligned, column number 2 is left-aligned,
+column number 3 has default alignment, and column number 4 is centered.
+In row 1, column number 1 says <em>Right</em>, column number 2 says
+<em>Left</em>, column number 3 says <em>Default</em>, and column number
+4 says <em>Center</em>. In row 2, column number 1 says <em>12</em>,
+column number 2 says <em>12</em>, column number 3 says <em>12</em>, and
+column number 4 says <em>12</em>. In row 3, column number 1 says
+<em>123</em>, column number 2 says <em>123</em>, column number 3 says
+<em>123</em>, and column number 4 says <em>123</em>. In row 4, column
+number 1 says <em>1</em>, column number 2 says <em>1</em>, column number
+3 says <em>1</em>, and column number 4 says <em>1</em>.</p>
</blockquote>
-<h5 class="unnumbered" id="latex-example-74"><span
+<h4 data-number="2.3.1.31" id="text-citations-renderer"><span
+class="header-section-number">2.3.1.31</span> Text Citations
+Renderer</h4>
+<p>The <code>\markdownRendererTextCite</code> macro represents a string
+of one or more text citations. This macro will only be produced, when
+the <strong><code>citations</code></strong> option is enabled. The macro
+receives parameters in the same format as the
+<code>\markdownRendererCite</code> macro.</p>
+<h5 class="unnumbered" id="latex-example-77"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
<div class="sourceCode" id="cb528"><pre
class="sourceCode tex"><code class="sourceCode latex"><span id="cb528-1"><a href="#cb528-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb528-2"><a href="#cb528-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[subscripts]{<span class="ex">markdown</span>}</span>
-<span id="cb528-3"><a href="#cb528-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
-<span id="cb528-4"><a href="#cb528-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
-<span id="cb528-5"><a href="#cb528-5" aria-hidden="true" tabindex="-1"></a> subscript = { (#1 moles) and },</span>
-<span id="cb528-6"><a href="#cb528-6" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb528-7"><a href="#cb528-7" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb528-8"><a href="#cb528-8" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb528-9"><a href="#cb528-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb528-10"><a href="#cb528-10" aria-hidden="true" tabindex="-1"></a>H~2~O is a liquid.</span>
-<span id="cb528-11"><a href="#cb528-11" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb528-12"><a href="#cb528-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<span id="cb528-2"><a href="#cb528-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[citations]{<span class="ex">markdown</span>}</span>
+<span id="cb528-3"><a href="#cb528-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\newcount\citationsCounter</span></span>
+<span id="cb528-4"><a href="#cb528-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\newcount\citationsTotal</span></span>
+<span id="cb528-5"><a href="#cb528-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\makeatletter</span></span>
+<span id="cb528-6"><a href="#cb528-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\citations</span>#1#2#3#4{<span class="co">%</span></span>
+<span id="cb528-7"><a href="#cb528-7" aria-hidden="true" tabindex="-1"></a> a text citation <span class="fu">\emph</span>{#4}</span>
+<span id="cb528-8"><a href="#cb528-8" aria-hidden="true" tabindex="-1"></a> <span class="fu">\advance\citationsCounter</span> by 1<span class="fu">\relax</span></span>
+<span id="cb528-9"><a href="#cb528-9" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifx\relax</span>#2<span class="fu">\relax</span></span>
+<span id="cb528-10"><a href="#cb528-10" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifx\relax</span>#3<span class="fu">\relax\else</span></span>
+<span id="cb528-11"><a href="#cb528-11" aria-hidden="true" tabindex="-1"></a> with a postfix <span class="fu">\emph</span>{#3}<span class="co">%</span></span>
+<span id="cb528-12"><a href="#cb528-12" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi</span></span>
+<span id="cb528-13"><a href="#cb528-13" aria-hidden="true" tabindex="-1"></a> <span class="fu">\else</span></span>
+<span id="cb528-14"><a href="#cb528-14" aria-hidden="true" tabindex="-1"></a> with a prefix <span class="fu">\emph</span>{#2}<span class="co">%</span></span>
+<span id="cb528-15"><a href="#cb528-15" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifx\relax</span>#3<span class="fu">\relax\else</span></span>
+<span id="cb528-16"><a href="#cb528-16" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ </span>and a postfix <span class="fu">\emph</span>{#3}<span class="co">%</span></span>
+<span id="cb528-17"><a href="#cb528-17" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi</span></span>
+<span id="cb528-18"><a href="#cb528-18" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi</span></span>
+<span id="cb528-19"><a href="#cb528-19" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum\citationsCounter</span>&gt;<span class="fu">\citationsTotal\relax</span></span>
+<span id="cb528-20"><a href="#cb528-20" aria-hidden="true" tabindex="-1"></a> .<span class="co">%</span></span>
+<span id="cb528-21"><a href="#cb528-21" aria-hidden="true" tabindex="-1"></a> <span class="fu">\expandafter\@gobble</span></span>
+<span id="cb528-22"><a href="#cb528-22" aria-hidden="true" tabindex="-1"></a> <span class="fu">\else</span></span>
+<span id="cb528-23"><a href="#cb528-23" aria-hidden="true" tabindex="-1"></a> , and</span>
+<span id="cb528-24"><a href="#cb528-24" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi\citations</span>}</span>
+<span id="cb528-25"><a href="#cb528-25" aria-hidden="true" tabindex="-1"></a><span class="fu">\makeatother</span></span>
+<span id="cb528-26"><a href="#cb528-26" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
+<span id="cb528-27"><a href="#cb528-27" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
+<span id="cb528-28"><a href="#cb528-28" aria-hidden="true" tabindex="-1"></a> textCite = {<span class="co">%</span></span>
+<span id="cb528-29"><a href="#cb528-29" aria-hidden="true" tabindex="-1"></a> <span class="fu">\citationsCounter</span>=1<span class="co">%</span></span>
+<span id="cb528-30"><a href="#cb528-30" aria-hidden="true" tabindex="-1"></a> <span class="fu">\citationsTotal</span>=#1<span class="co">%</span></span>
+<span id="cb528-31"><a href="#cb528-31" aria-hidden="true" tabindex="-1"></a> This is</span>
+<span id="cb528-32"><a href="#cb528-32" aria-hidden="true" tabindex="-1"></a> <span class="fu">\expandafter\citations</span></span>
+<span id="cb528-33"><a href="#cb528-33" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb528-34"><a href="#cb528-34" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb528-35"><a href="#cb528-35" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb528-36"><a href="#cb528-36" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb528-37"><a href="#cb528-37" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb528-38"><a href="#cb528-38" aria-hidden="true" tabindex="-1"></a>@abrahams90 [pp. 12; also @eijkhout91]</span>
+<span id="cb528-39"><a href="#cb528-39" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb528-40"><a href="#cb528-40" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
<div class="sourceCode" id="cb529"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb529-1"><a href="#cb529-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
-<p>H (2 moles) and O is a liquid.</p>
+<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>
-<h5 class="unnumbered" id="context-example-51">Con<span
-class="tex">T<sub>e</sub>X</span>t Example</h5>
+<h4 data-number="2.3.1.32" id="thematic-break-renderer"><span
+class="header-section-number">2.3.1.32</span> Thematic Break
+Renderer</h4>
+<p>The <code>\markdownRendererThematicBreak</code> macro represents a
+thematic break. The macro receives no arguments.</p>
+<h5 class="unnumbered" id="plain-tex-example-35">Plain <span
+class="tex">T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
<div class="sourceCode" id="cb530"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb530-1"><a href="#cb530-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
-<span id="cb530-2"><a href="#cb530-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[subscripts = yes]</span>
-<span id="cb530-3"><a href="#cb530-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererSubscript</span>#1{ (#1 moles) and }</span>
-<span id="cb530-4"><a href="#cb530-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
-<span id="cb530-5"><a href="#cb530-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb530-6"><a href="#cb530-6" aria-hidden="true" tabindex="-1"></a>H~2~O is a liquid.</span>
-<span id="cb530-7"><a href="#cb530-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb530-8"><a href="#cb530-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb530-1"><a href="#cb530-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
+<span id="cb530-2"><a href="#cb530-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererThematicBreak</span>{<span class="fu">\vfil\break</span>}</span>
+<span id="cb530-3"><a href="#cb530-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
+<span id="cb530-4"><a href="#cb530-4" aria-hidden="true" tabindex="-1"></a>This is the first page.</span>
+<span id="cb530-5"><a href="#cb530-5" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb530-6"><a href="#cb530-6" aria-hidden="true" tabindex="-1"></a>***</span>
+<span id="cb530-7"><a href="#cb530-7" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb530-8"><a href="#cb530-8" aria-hidden="true" tabindex="-1"></a>This is the second page.</span>
+<span id="cb530-9"><a href="#cb530-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
+<span id="cb530-10"><a href="#cb530-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
<div class="sourceCode" id="cb531"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb531-1"><a href="#cb531-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb531-1"><a href="#cb531-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
-<p>H (2 moles) and O is a liquid.</p>
+<p>This is the first page.</p>
+<hr />
+<p>This is the second page.</p>
</blockquote>
-<h4 data-number="2.3.1.32" id="raw-content-renderers"><span
-class="header-section-number">2.3.1.32</span> Raw Content Renderers</h4>
-<p>The <code>\markdownRendererInputRawInline</code> macro represents an
-inline raw span. The macro receives two arguments: the filename of a
-file contaning the inline raw span contents and the raw attribute that
-designates the format of the inline raw span. This macro will only be
-produced, when the <strong><code>rawAttribute</code></strong> option is
-enabled.</p>
-<p>The <code>\markdownRendererInputRawBlock</code> macro represents a
-raw block. The macro receives two arguments: the filename of a file
-contaning the raw block and the raw attribute that designates the format
-of the raw block. This macro will only be produced, when the
-<strong><code>rawAttribute</code></strong> and
-<strong><code>fencedCode</code></strong> options are enabled.</p>
-<h5 class="unnumbered" id="latex-example-75"><span
+<h5 class="unnumbered" id="latex-example-78"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
<div class="sourceCode" id="cb532"><pre
class="sourceCode tex"><code class="sourceCode latex"><span id="cb532-1"><a href="#cb532-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb532-2"><a href="#cb532-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[rawAttribute, fencedCode]{<span class="ex">markdown</span>}</span>
-<span id="cb532-3"><a href="#cb532-3" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">expl3</span>}</span>
-<span id="cb532-4"><a href="#cb532-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\ExplSyntaxOn</span></span>
-<span id="cb532-5"><a href="#cb532-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\cs</span>_new:Nn</span>
-<span id="cb532-6"><a href="#cb532-6" aria-hidden="true" tabindex="-1"></a> <span class="fu">\display</span>_raw_content:nn</span>
-<span id="cb532-7"><a href="#cb532-7" aria-hidden="true" tabindex="-1"></a> {</span>
-<span id="cb532-8"><a href="#cb532-8" aria-hidden="true" tabindex="-1"></a> <span class="co">% If the raw attribute is TeX, execute the content as a TeX document.</span></span>
-<span id="cb532-9"><a href="#cb532-9" aria-hidden="true" tabindex="-1"></a> <span class="fu">\str</span>_if_eq:nnTF</span>
-<span id="cb532-10"><a href="#cb532-10" aria-hidden="true" tabindex="-1"></a> { #2 }</span>
-<span id="cb532-11"><a href="#cb532-11" aria-hidden="true" tabindex="-1"></a> { tex }</span>
-<span id="cb532-12"><a href="#cb532-12" aria-hidden="true" tabindex="-1"></a> { <span class="fu">\markdownEscape</span> { #1 } }</span>
-<span id="cb532-13"><a href="#cb532-13" aria-hidden="true" tabindex="-1"></a> <span class="co">% Otherwise, ignore the content.</span></span>
-<span id="cb532-14"><a href="#cb532-14" aria-hidden="true" tabindex="-1"></a> { }</span>
-<span id="cb532-15"><a href="#cb532-15" aria-hidden="true" tabindex="-1"></a> }</span>
-<span id="cb532-16"><a href="#cb532-16" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
-<span id="cb532-17"><a href="#cb532-17" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
-<span id="cb532-18"><a href="#cb532-18" aria-hidden="true" tabindex="-1"></a> rawInline = { <span class="fu">\display</span>_raw_content:nn { #1 } { #2 } },</span>
-<span id="cb532-19"><a href="#cb532-19" aria-hidden="true" tabindex="-1"></a> rawBlock = { <span class="fu">\display</span>_raw_content:nn { #1 } { #2 } }</span>
-<span id="cb532-20"><a href="#cb532-20" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb532-21"><a href="#cb532-21" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb532-22"><a href="#cb532-22" aria-hidden="true" tabindex="-1"></a><span class="fu">\ExplSyntaxOff</span></span>
-<span id="cb532-23"><a href="#cb532-23" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb532-24"><a href="#cb532-24" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb532-25"><a href="#cb532-25" aria-hidden="true" tabindex="-1"></a>`<span class="ss">$H_2 O$</span>`{=tex} is a liquid.</span>
-<span id="cb532-26"><a href="#cb532-26" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb532-27"><a href="#cb532-27" aria-hidden="true" tabindex="-1"></a>``` {=html}</span>
-<span id="cb532-28"><a href="#cb532-28" aria-hidden="true" tabindex="-1"></a>&lt;p&gt;Here is some HTML content that will be ignored.&lt;/p&gt;</span>
-<span id="cb532-29"><a href="#cb532-29" aria-hidden="true" tabindex="-1"></a>```</span>
-<span id="cb532-30"><a href="#cb532-30" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb532-31"><a href="#cb532-31" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<span id="cb532-2"><a href="#cb532-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span>
+<span id="cb532-3"><a href="#cb532-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
+<span id="cb532-4"><a href="#cb532-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
+<span id="cb532-5"><a href="#cb532-5" aria-hidden="true" tabindex="-1"></a> thematicBreak = <span class="fu">\newpage</span>,</span>
+<span id="cb532-6"><a href="#cb532-6" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb532-7"><a href="#cb532-7" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb532-8"><a href="#cb532-8" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb532-9"><a href="#cb532-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb532-10"><a href="#cb532-10" aria-hidden="true" tabindex="-1"></a>This is the first page.</span>
+<span id="cb532-11"><a href="#cb532-11" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb532-12"><a href="#cb532-12" aria-hidden="true" tabindex="-1"></a>***</span>
+<span id="cb532-13"><a href="#cb532-13" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb532-14"><a href="#cb532-14" aria-hidden="true" tabindex="-1"></a>This is the second page.</span>
+<span id="cb532-15"><a href="#cb532-15" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb532-16"><a href="#cb532-16" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
<div class="sourceCode" id="cb533"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb533-1"><a href="#cb533-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
-<p>H<sub>2</sub>O is a liquid.</p>
+<p>This is the first page.</p>
+<hr />
+<p>This is the second page.</p>
</blockquote>
-<h3 data-number="2.3.2" id="texrendererprototypes"><span
-class="header-section-number">2.3.2</span> Token Renderer
-Prototypes</h3>
-<p>By default, token renderers point to package-defined <span
-class="tex">T<sub>e</sub>X</span> macros, further referred to as
-<em>prototypes</em>, which provide useful default definitions.</p>
-<h5 class="unnumbered" id="plain-tex-example-37">Plain <span
-class="tex">T<sub>e</sub>X</span> Example</h5>
+<h5 class="unnumbered" id="context-example-49">Con<span
+class="tex">T<sub>e</sub>X</span>t Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
<div class="sourceCode" id="cb534"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb534-1"><a href="#cb534-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
-<span id="cb534-2"><a href="#cb534-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererTildePrototype</span>{<span class="co">%</span></span>
-<span id="cb534-3"><a href="#cb534-3" aria-hidden="true" tabindex="-1"></a> Packages can specify token renderer prototypes.<span class="co">%</span></span>
-<span id="cb534-4"><a href="#cb534-4" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb534-5"><a href="#cb534-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
-<span id="cb534-6"><a href="#cb534-6" aria-hidden="true" tabindex="-1"></a>~</span>
-<span id="cb534-7"><a href="#cb534-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb534-1"><a href="#cb534-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
+<span id="cb534-2"><a href="#cb534-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererThematicBreak</span>{<span class="fu">\page</span>[yes]}</span>
+<span id="cb534-3"><a href="#cb534-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
+<span id="cb534-4"><a href="#cb534-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb534-5"><a href="#cb534-5" aria-hidden="true" tabindex="-1"></a>This is the first page.</span>
+<span id="cb534-6"><a href="#cb534-6" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb534-7"><a href="#cb534-7" aria-hidden="true" tabindex="-1"></a>***</span>
<span id="cb534-8"><a href="#cb534-8" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb534-9"><a href="#cb534-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererTilde</span>{<span class="co">%</span></span>
-<span id="cb534-10"><a href="#cb534-10" aria-hidden="true" tabindex="-1"></a> User-defined token renderers take precedence.<span class="co">%</span></span>
-<span id="cb534-11"><a href="#cb534-11" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb534-12"><a href="#cb534-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
-<span id="cb534-13"><a href="#cb534-13" aria-hidden="true" tabindex="-1"></a>~</span>
-<span id="cb534-14"><a href="#cb534-14" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
-<span id="cb534-15"><a href="#cb534-15" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
+<span id="cb534-9"><a href="#cb534-9" aria-hidden="true" tabindex="-1"></a>This is the second page.</span>
+<span id="cb534-10"><a href="#cb534-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb534-11"><a href="#cb534-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
<div class="sourceCode" id="cb535"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb535-1"><a href="#cb535-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb535-1"><a href="#cb535-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
-<p>Packages can specify token renderer prototypes.</p>
-<p>User-defined token renderers take precedence.</p>
+<p>This is the first page.</p>
+<hr />
+<p>This is the second page.</p>
</blockquote>
-<h5 class="unnumbered" id="latex-example-76"><span
+<h4 data-number="2.3.1.33" id="tickbox-renderers"><span
+class="header-section-number">2.3.1.33</span> Tickbox Renderers</h4>
+<p>The macros named <code>\markdownRendererTickedBox</code>,
+<code>\markdownRendererHalfTickedBox</code>, and
+<code>\markdownRendererUntickedBox</code> represent ticked and unticked
+boxes, respectively. These macros will either be produced, when the
+<strong><code>taskLists</code></strong> option is enabled, or when the
+Ballot Box with X (☒, U+2612), Hourglass (⌛, U+231B) or Ballot Box (☐,
+U+2610) Unicode characters are encountered in the markdown input,
+respectively.</p>
+<h5 class="unnumbered" id="latex-example-79"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
<div class="sourceCode" id="cb536"><pre
class="sourceCode tex"><code class="sourceCode latex"><span id="cb536-1"><a href="#cb536-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb536-2"><a href="#cb536-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span>
+<span id="cb536-2"><a href="#cb536-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[taskLists]{<span class="ex">markdown</span>}</span>
<span id="cb536-3"><a href="#cb536-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
-<span id="cb536-4"><a href="#cb536-4" aria-hidden="true" tabindex="-1"></a> rendererPrototypes = {</span>
-<span id="cb536-5"><a href="#cb536-5" aria-hidden="true" tabindex="-1"></a> tilde = {Packages can specify token renderer prototypes.},</span>
-<span id="cb536-6"><a href="#cb536-6" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb536-7"><a href="#cb536-7" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb536-8"><a href="#cb536-8" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb536-9"><a href="#cb536-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb536-10"><a href="#cb536-10" aria-hidden="true" tabindex="-1"></a>~</span>
-<span id="cb536-11"><a href="#cb536-11" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb536-12"><a href="#cb536-12" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb536-13"><a href="#cb536-13" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span>
-<span id="cb536-14"><a href="#cb536-14" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
-<span id="cb536-15"><a href="#cb536-15" aria-hidden="true" tabindex="-1"></a> tilde = {User-defined token renderers take precedence.},</span>
-<span id="cb536-16"><a href="#cb536-16" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb536-17"><a href="#cb536-17" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb536-18"><a href="#cb536-18" aria-hidden="true" tabindex="-1"></a>~</span>
-<span id="cb536-19"><a href="#cb536-19" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span>
-<span id="cb536-20"><a href="#cb536-20" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<span id="cb536-4"><a href="#cb536-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
+<span id="cb536-5"><a href="#cb536-5" aria-hidden="true" tabindex="-1"></a> untickedBox = No,</span>
+<span id="cb536-6"><a href="#cb536-6" aria-hidden="true" tabindex="-1"></a> tickedBox = Yes,</span>
+<span id="cb536-7"><a href="#cb536-7" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb536-8"><a href="#cb536-8" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb536-9"><a href="#cb536-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb536-10"><a href="#cb536-10" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb536-11"><a href="#cb536-11" aria-hidden="true" tabindex="-1"></a>- [ ] you can&#39;t.</span>
+<span id="cb536-12"><a href="#cb536-12" aria-hidden="true" tabindex="-1"></a>- [x] I can!</span>
+<span id="cb536-13"><a href="#cb536-13" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb536-14"><a href="#cb536-14" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
<div class="sourceCode" id="cb537"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb537-1"><a href="#cb537-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
-<p>Packages can specify token renderer prototypes.</p>
-<p>User-defined token renderers take precedence.</p>
+<ul>
+<li>No you can’t.</li>
+<li>Yes I can!</li>
+</ul>
</blockquote>
-<h5 class="unnumbered" id="context-example-52">Con<span
+<h5 class="unnumbered" id="context-example-50">Con<span
class="tex">T<sub>e</sub>X</span>t Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
<div class="sourceCode" id="cb538"><pre
class="sourceCode tex"><code class="sourceCode latex"><span id="cb538-1"><a href="#cb538-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
-<span id="cb538-2"><a href="#cb538-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererTildePrototype</span>{<span class="co">%</span></span>
-<span id="cb538-3"><a href="#cb538-3" aria-hidden="true" tabindex="-1"></a> Packages can specify token renderer prototypes.<span class="co">%</span></span>
-<span id="cb538-4"><a href="#cb538-4" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb538-2"><a href="#cb538-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[taskLists = yes]</span>
+<span id="cb538-3"><a href="#cb538-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererUntickedBox</span>{No}</span>
+<span id="cb538-4"><a href="#cb538-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererTickedBox</span>{Yes}</span>
<span id="cb538-5"><a href="#cb538-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
<span id="cb538-6"><a href="#cb538-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb538-7"><a href="#cb538-7" aria-hidden="true" tabindex="-1"></a>~</span>
-<span id="cb538-8"><a href="#cb538-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb538-9"><a href="#cb538-9" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb538-10"><a href="#cb538-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererTilde</span>{<span class="co">%</span></span>
-<span id="cb538-11"><a href="#cb538-11" aria-hidden="true" tabindex="-1"></a> User-defined token renderers take precedence.<span class="co">%</span></span>
-<span id="cb538-12"><a href="#cb538-12" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb538-13"><a href="#cb538-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb538-14"><a href="#cb538-14" aria-hidden="true" tabindex="-1"></a>~</span>
-<span id="cb538-15"><a href="#cb538-15" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb538-16"><a href="#cb538-16" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
+<span id="cb538-7"><a href="#cb538-7" aria-hidden="true" tabindex="-1"></a>- [ ] you can&#39;t.</span>
+<span id="cb538-8"><a href="#cb538-8" aria-hidden="true" tabindex="-1"></a>- [x] I can!</span>
+<span id="cb538-9"><a href="#cb538-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb538-10"><a href="#cb538-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
<div class="sourceCode" id="cb539"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb539-1"><a href="#cb539-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
<p>A PDF document named <code>document.pdf</code> should be produced and
contain the following text:</p>
<blockquote>
-<p>Packages can specify token renderer prototypes.</p>
-<p>User-defined token renderers take precedence.</p>
+<ul>
+<li>No you can’t.</li>
+<li>Yes I can!</li>
+</ul>
</blockquote>
-<h4 data-number="2.3.2.1" id="expl3yamlmetadata"><span
-class="header-section-number">2.3.2.1</span> YAML Metadata Renderer
-Prototypes</h4>
-<p>By default, the renderer prototypes for YAML metadata provide a
-high-level interface that can be programmed using the
-<code>markdown/jekyllData</code> key–values from the l3keys module of
-the <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span>3 kernel.</p>
-<h5 class="unnumbered" id="plain-tex-example-38">Plain <span
+<h4 data-number="2.3.1.34" id="yamlmetadatarenderers"><span
+class="header-section-number">2.3.1.34</span> YAML Metadata
+Renderers</h4>
+<p>The <code>\markdownRendererJekyllDataBegin</code> macro represents
+the beginning of a <abbr>yaml</abbr> document. This macro will only be
+produced when the <strong><code>jekyllData</code></strong> option is
+enabled. The macro receives no arguments.</p>
+<p>The <code>\markdownRendererJekyllDataEnd</code> macro represents the
+end of a <abbr>yaml</abbr> document. This macro will only be produced
+when the <strong><code>jekyllData</code></strong> option is enabled. The
+macro receives no arguments.</p>
+<p>The <code>\markdownRendererJekyllDataMappingBegin</code> macro
+represents the beginning of a mapping in a <abbr>yaml</abbr> document.
+This macro will only be produced when the
+<strong><code>jekyllData</code></strong> option is enabled. The macro
+receives two arguments: the scalar key in the parent structure, cast to
+a string following <abbr>yaml</abbr> serialization rules, and the number
+of items in the mapping.</p>
+<p>The <code>\markdownRendererJekyllDataMappingEnd</code> macro
+represents the end of a mapping in a <abbr>yaml</abbr> document. This
+macro will only be produced when the
+<strong><code>jekyllData</code></strong> option is enabled. The macro
+receives no arguments.</p>
+<p>The <code>\markdownRendererJekyllDataSequenceBegin</code> macro
+represents the beginning of a sequence in a <abbr>yaml</abbr> document.
+This macro will only be produced when the
+<strong><code>jekyllData</code></strong> option is enabled. The macro
+receives two arguments: the scalar key in the parent structure, cast to
+a string following <abbr>yaml</abbr> serialization rules, and the number
+of items in the sequence.</p>
+<p>The <code>\markdownRendererJekyllDataSequenceEnd</code> macro
+represents the end of a sequence in a <abbr>yaml</abbr> document. This
+macro will only be produced when the
+<strong><code>jekyllData</code></strong> option is enabled. The macro
+receives no arguments.</p>
+<p>The <code>\markdownRendererJekyllDataBoolean</code> macro represents
+a boolean scalar value in a <abbr>yaml</abbr> document. This macro will
+only be produced when the <strong><code>jekyllData</code></strong>
+option is enabled. The macro receives two arguments: the scalar key in
+the parent structure, and the scalar value, both cast to a string
+following <abbr>yaml</abbr> serialization rules.</p>
+<p>The <code>\markdownRendererJekyllDataNumber</code> macro represents a
+numeric scalar value in a <abbr>yaml</abbr> document. This macro will
+only be produced when the <strong><code>jekyllData</code></strong>
+option is enabled. The macro receives two arguments: the scalar key in
+the parent structure, and the scalar value, both cast to a string
+following <abbr>yaml</abbr> serialization rules.</p>
+<p>The <code>\markdownRendererJekyllDataString</code> macro represents a
+string scalar value in a <abbr>yaml</abbr> document. This macro will
+only be produced when the <strong><code>jekyllData</code></strong>
+option is enabled. The macro receives two arguments: the scalar key in
+the parent structure, cast to a string following <abbr>yaml</abbr>
+serialization rules, and the scalar value.</p>
+<p>The <code>\markdownRendererJekyllDataEmpty</code> macro represents an
+empty scalar value in a <abbr>yaml</abbr> document. This macro will only
+be produced when the <strong><code>jekyllData</code></strong> option is
+enabled. The macro receives one argument: the scalar key in the parent
+structure, cast to a string following <abbr>yaml</abbr> serialization
+rules.</p>
+<h5 class="unnumbered" id="plain-tex-example-36">Plain <span
class="tex">T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
<div class="sourceCode" id="cb540"><pre
class="sourceCode tex"><code class="sourceCode latex"><span id="cb540-1"><a href="#cb540-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
<span id="cb540-2"><a href="#cb540-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionJekyllData</span>{true}</span>
-<span id="cb540-3"><a href="#cb540-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\ExplSyntaxOn</span></span>
-<span id="cb540-4"><a href="#cb540-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\keys</span>_define:nn</span>
-<span id="cb540-5"><a href="#cb540-5" aria-hidden="true" tabindex="-1"></a> { markdown/jekyllData }</span>
-<span id="cb540-6"><a href="#cb540-6" aria-hidden="true" tabindex="-1"></a> {</span>
-<span id="cb540-7"><a href="#cb540-7" aria-hidden="true" tabindex="-1"></a> name .code:n = { <span class="fu">\gdef\name</span>{#1} },</span>
-<span id="cb540-8"><a href="#cb540-8" aria-hidden="true" tabindex="-1"></a> age .code:n = { <span class="fu">\gdef\age</span>{#1} },</span>
-<span id="cb540-9"><a href="#cb540-9" aria-hidden="true" tabindex="-1"></a> }</span>
-<span id="cb540-10"><a href="#cb540-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\ExplSyntaxOff</span></span>
-<span id="cb540-11"><a href="#cb540-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererJekyllDataEnd</span>{<span class="co">%</span></span>
-<span id="cb540-12"><a href="#cb540-12" aria-hidden="true" tabindex="-1"></a> <span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.}</span>
-<span id="cb540-13"><a href="#cb540-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
-<span id="cb540-14"><a href="#cb540-14" aria-hidden="true" tabindex="-1"></a>---</span>
-<span id="cb540-15"><a href="#cb540-15" aria-hidden="true" tabindex="-1"></a>name: Jane Doe</span>
-<span id="cb540-16"><a href="#cb540-16" aria-hidden="true" tabindex="-1"></a>age: 99</span>
-<span id="cb540-17"><a href="#cb540-17" aria-hidden="true" tabindex="-1"></a>---</span>
-<span id="cb540-18"><a href="#cb540-18" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
-<span id="cb540-19"><a href="#cb540-19" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
+<span id="cb540-3"><a href="#cb540-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererJekyllDataString</span>#1#2{<span class="fu">\gdef\name</span>{#2}}</span>
+<span id="cb540-4"><a href="#cb540-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererJekyllDataNumber</span>#1#2{<span class="fu">\gdef\age</span>{#2}}</span>
+<span id="cb540-5"><a href="#cb540-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererJekyllDataEnd</span>{<span class="co">%</span></span>
+<span id="cb540-6"><a href="#cb540-6" aria-hidden="true" tabindex="-1"></a> <span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.}</span>
+<span id="cb540-7"><a href="#cb540-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
+<span id="cb540-8"><a href="#cb540-8" aria-hidden="true" tabindex="-1"></a>---</span>
+<span id="cb540-9"><a href="#cb540-9" aria-hidden="true" tabindex="-1"></a>name: Jane Doe</span>
+<span id="cb540-10"><a href="#cb540-10" aria-hidden="true" tabindex="-1"></a>age: 99</span>
+<span id="cb540-11"><a href="#cb540-11" aria-hidden="true" tabindex="-1"></a>---</span>
+<span id="cb540-12"><a href="#cb540-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
+<span id="cb540-13"><a href="#cb540-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
<div class="sourceCode" id="cb541"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb541-1"><a href="#cb541-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
@@ -9927,7 +10012,7 @@ contain the following text:</p>
<blockquote>
<p>Jane Doe is 99 years old.</p>
</blockquote>
-<h5 class="unnumbered" id="latex-example-77"><span
+<h5 class="unnumbered" id="latex-example-80"><span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
@@ -9935,24 +10020,22 @@ class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
class="sourceCode tex"><code class="sourceCode latex"><span id="cb542-1"><a href="#cb542-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
<span id="cb542-2"><a href="#cb542-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[jekyllData]{<span class="ex">markdown</span>}</span>
<span id="cb542-3"><a href="#cb542-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
-<span id="cb542-4"><a href="#cb542-4" aria-hidden="true" tabindex="-1"></a> jekyllDataRenderers = {</span>
-<span id="cb542-5"><a href="#cb542-5" aria-hidden="true" tabindex="-1"></a> name = {<span class="fu">\gdef\name</span>{#1}},</span>
-<span id="cb542-6"><a href="#cb542-6" aria-hidden="true" tabindex="-1"></a> code = {<span class="fu">\gdef\age</span>{#1}},</span>
-<span id="cb542-7"><a href="#cb542-7" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb542-8"><a href="#cb542-8" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
-<span id="cb542-9"><a href="#cb542-9" aria-hidden="true" tabindex="-1"></a> jekyllDataEnd = {<span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.},</span>
-<span id="cb542-10"><a href="#cb542-10" aria-hidden="true" tabindex="-1"></a> }</span>
-<span id="cb542-11"><a href="#cb542-11" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb542-12"><a href="#cb542-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb542-13"><a href="#cb542-13" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb542-14"><a href="#cb542-14" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb542-15"><a href="#cb542-15" aria-hidden="true" tabindex="-1"></a>---</span>
-<span id="cb542-16"><a href="#cb542-16" aria-hidden="true" tabindex="-1"></a>name: Jane Doe</span>
-<span id="cb542-17"><a href="#cb542-17" aria-hidden="true" tabindex="-1"></a>age: 99</span>
-<span id="cb542-18"><a href="#cb542-18" aria-hidden="true" tabindex="-1"></a>---</span>
-<span id="cb542-19"><a href="#cb542-19" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb542-20"><a href="#cb542-20" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb542-21"><a href="#cb542-21" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<span id="cb542-4"><a href="#cb542-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
+<span id="cb542-5"><a href="#cb542-5" aria-hidden="true" tabindex="-1"></a> jekyllDataString = {<span class="fu">\gdef\name</span>{#2}},</span>
+<span id="cb542-6"><a href="#cb542-6" aria-hidden="true" tabindex="-1"></a> jekyllDataNumber = {<span class="fu">\gdef\age</span>{#2}},</span>
+<span id="cb542-7"><a href="#cb542-7" aria-hidden="true" tabindex="-1"></a> jekyllDataEnd = {<span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.},</span>
+<span id="cb542-8"><a href="#cb542-8" aria-hidden="true" tabindex="-1"></a> }</span>
+<span id="cb542-9"><a href="#cb542-9" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb542-10"><a href="#cb542-10" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb542-11"><a href="#cb542-11" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb542-12"><a href="#cb542-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb542-13"><a href="#cb542-13" aria-hidden="true" tabindex="-1"></a>---</span>
+<span id="cb542-14"><a href="#cb542-14" aria-hidden="true" tabindex="-1"></a>name: Jane Doe</span>
+<span id="cb542-15"><a href="#cb542-15" aria-hidden="true" tabindex="-1"></a>age: 99</span>
+<span id="cb542-16"><a href="#cb542-16" aria-hidden="true" tabindex="-1"></a>---</span>
+<span id="cb542-17"><a href="#cb542-17" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb542-18"><a href="#cb542-18" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb542-19"><a href="#cb542-19" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
<div class="sourceCode" id="cb543"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb543-1"><a href="#cb543-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
@@ -9961,33 +10044,27 @@ contain the following text:</p>
<blockquote>
<p>Jane Doe is 99 years old.</p>
</blockquote>
-<h5 class="unnumbered" id="context-example-53">Con<span
+<h5 class="unnumbered" id="context-example-51">Con<span
class="tex">T<sub>e</sub>X</span>t Example</h5>
<p>Using a text editor, create a text document named
<code>document.tex</code> with the following content:</p>
<div class="sourceCode" id="cb544"><pre
class="sourceCode tex"><code class="sourceCode latex"><span id="cb544-1"><a href="#cb544-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
<span id="cb544-2"><a href="#cb544-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[jekyllData = yes]</span>
-<span id="cb544-3"><a href="#cb544-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\ExplSyntaxOn</span></span>
-<span id="cb544-4"><a href="#cb544-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\keys</span>_define:nn</span>
-<span id="cb544-5"><a href="#cb544-5" aria-hidden="true" tabindex="-1"></a> { markdown/jekyllData }</span>
-<span id="cb544-6"><a href="#cb544-6" aria-hidden="true" tabindex="-1"></a> {</span>
-<span id="cb544-7"><a href="#cb544-7" aria-hidden="true" tabindex="-1"></a> name .code:n = { <span class="fu">\gdef\name</span>{#1} },</span>
-<span id="cb544-8"><a href="#cb544-8" aria-hidden="true" tabindex="-1"></a> age .code:n = { <span class="fu">\gdef\age</span>{#1} },</span>
-<span id="cb544-9"><a href="#cb544-9" aria-hidden="true" tabindex="-1"></a> }</span>
-<span id="cb544-10"><a href="#cb544-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\ExplSyntaxOff</span></span>
-<span id="cb544-11"><a href="#cb544-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererJekyllDataEnd</span>{<span class="co">%</span></span>
-<span id="cb544-12"><a href="#cb544-12" aria-hidden="true" tabindex="-1"></a> <span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.}</span>
-<span id="cb544-13"><a href="#cb544-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
-<span id="cb544-14"><a href="#cb544-14" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb544-15"><a href="#cb544-15" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
-<span id="cb544-16"><a href="#cb544-16" aria-hidden="true" tabindex="-1"></a>---</span>
-<span id="cb544-17"><a href="#cb544-17" aria-hidden="true" tabindex="-1"></a>name: Jane Doe</span>
-<span id="cb544-18"><a href="#cb544-18" aria-hidden="true" tabindex="-1"></a>age: 99</span>
-<span id="cb544-19"><a href="#cb544-19" aria-hidden="true" tabindex="-1"></a>---</span>
-<span id="cb544-20"><a href="#cb544-20" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
-<span id="cb544-21"><a href="#cb544-21" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb544-22"><a href="#cb544-22" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
+<span id="cb544-3"><a href="#cb544-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererJekyllDataString</span>#1#2{<span class="fu">\gdef\name</span>{#2}}</span>
+<span id="cb544-4"><a href="#cb544-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererJekyllDataNumber</span>#1#2{<span class="fu">\gdef\age</span>{#2}}</span>
+<span id="cb544-5"><a href="#cb544-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererJekyllDataEnd</span>{<span class="co">%</span></span>
+<span id="cb544-6"><a href="#cb544-6" aria-hidden="true" tabindex="-1"></a> <span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.}</span>
+<span id="cb544-7"><a href="#cb544-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
+<span id="cb544-8"><a href="#cb544-8" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb544-9"><a href="#cb544-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb544-10"><a href="#cb544-10" aria-hidden="true" tabindex="-1"></a>---</span>
+<span id="cb544-11"><a href="#cb544-11" aria-hidden="true" tabindex="-1"></a>name: Jane Doe</span>
+<span id="cb544-12"><a href="#cb544-12" aria-hidden="true" tabindex="-1"></a>age: 99</span>
+<span id="cb544-13"><a href="#cb544-13" aria-hidden="true" tabindex="-1"></a>---</span>
+<span id="cb544-14"><a href="#cb544-14" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb544-15"><a href="#cb544-15" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb544-16"><a href="#cb544-16" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
<div class="sourceCode" id="cb545"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb545-1"><a href="#cb545-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
@@ -9996,36 +10073,243 @@ contain the following text:</p>
<blockquote>
<p>Jane Doe is 99 years old.</p>
</blockquote>
+<h3 data-number="2.3.2" id="texrendererprototypes"><span
+class="header-section-number">2.3.2</span> Token Renderer
+Prototypes</h3>
+<p>By default, token renderers point to package-defined <span
+class="tex">T<sub>e</sub>X</span> macros, further referred to as
+<em>prototypes</em>, which provide useful default definitions.</p>
+<h5 class="unnumbered" id="plain-tex-example-37">Plain <span
+class="tex">T<sub>e</sub>X</span> Example</h5>
+<p>Using a text editor, create a text document named
+<code>document.tex</code> with the following content:</p>
+<div class="sourceCode" id="cb546"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb546-1"><a href="#cb546-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
+<span id="cb546-2"><a href="#cb546-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererTildePrototype</span>{<span class="co">%</span></span>
+<span id="cb546-3"><a href="#cb546-3" aria-hidden="true" tabindex="-1"></a> Packages can specify token renderer prototypes.<span class="co">%</span></span>
+<span id="cb546-4"><a href="#cb546-4" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb546-5"><a href="#cb546-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
+<span id="cb546-6"><a href="#cb546-6" aria-hidden="true" tabindex="-1"></a>~</span>
+<span id="cb546-7"><a href="#cb546-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
+<span id="cb546-8"><a href="#cb546-8" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb546-9"><a href="#cb546-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererTilde</span>{<span class="co">%</span></span>
+<span id="cb546-10"><a href="#cb546-10" aria-hidden="true" tabindex="-1"></a> User-defined token renderers take precedence.<span class="co">%</span></span>
+<span id="cb546-11"><a href="#cb546-11" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb546-12"><a href="#cb546-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
+<span id="cb546-13"><a href="#cb546-13" aria-hidden="true" tabindex="-1"></a>~</span>
+<span id="cb546-14"><a href="#cb546-14" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
+<span id="cb546-15"><a href="#cb546-15" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
+<p>Next, invoke LuaTeX from the terminal:</p>
+<div class="sourceCode" id="cb547"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb547-1"><a href="#cb547-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
+<p>A PDF document named <code>document.pdf</code> should be produced and
+contain the following text:</p>
+<blockquote>
+<p>Packages can specify token renderer prototypes.</p>
+<p>User-defined token renderers take precedence.</p>
+</blockquote>
+<h5 class="unnumbered" id="latex-example-81"><span
+class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
+<p>Using a text editor, create a text document named
+<code>document.tex</code> with the following content:</p>
+<div class="sourceCode" id="cb548"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb548-1"><a href="#cb548-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb548-2"><a href="#cb548-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span>
+<span id="cb548-3"><a href="#cb548-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
+<span id="cb548-4"><a href="#cb548-4" aria-hidden="true" tabindex="-1"></a> rendererPrototypes = {</span>
+<span id="cb548-5"><a href="#cb548-5" aria-hidden="true" tabindex="-1"></a> tilde = {Packages can specify token renderer prototypes.},</span>
+<span id="cb548-6"><a href="#cb548-6" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb548-7"><a href="#cb548-7" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb548-8"><a href="#cb548-8" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb548-9"><a href="#cb548-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb548-10"><a href="#cb548-10" aria-hidden="true" tabindex="-1"></a>~</span>
+<span id="cb548-11"><a href="#cb548-11" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb548-12"><a href="#cb548-12" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb548-13"><a href="#cb548-13" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span>
+<span id="cb548-14"><a href="#cb548-14" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
+<span id="cb548-15"><a href="#cb548-15" aria-hidden="true" tabindex="-1"></a> tilde = {User-defined token renderers take precedence.},</span>
+<span id="cb548-16"><a href="#cb548-16" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb548-17"><a href="#cb548-17" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb548-18"><a href="#cb548-18" aria-hidden="true" tabindex="-1"></a>~</span>
+<span id="cb548-19"><a href="#cb548-19" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span>
+<span id="cb548-20"><a href="#cb548-20" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<p>Next, invoke LuaTeX from the terminal:</p>
+<div class="sourceCode" id="cb549"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb549-1"><a href="#cb549-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+<p>A PDF document named <code>document.pdf</code> should be produced and
+contain the following text:</p>
+<blockquote>
+<p>Packages can specify token renderer prototypes.</p>
+<p>User-defined token renderers take precedence.</p>
+</blockquote>
+<h5 class="unnumbered" id="context-example-52">Con<span
+class="tex">T<sub>e</sub>X</span>t Example</h5>
+<p>Using a text editor, create a text document named
+<code>document.tex</code> with the following content:</p>
+<div class="sourceCode" id="cb550"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb550-1"><a href="#cb550-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
+<span id="cb550-2"><a href="#cb550-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererTildePrototype</span>{<span class="co">%</span></span>
+<span id="cb550-3"><a href="#cb550-3" aria-hidden="true" tabindex="-1"></a> Packages can specify token renderer prototypes.<span class="co">%</span></span>
+<span id="cb550-4"><a href="#cb550-4" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb550-5"><a href="#cb550-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
+<span id="cb550-6"><a href="#cb550-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb550-7"><a href="#cb550-7" aria-hidden="true" tabindex="-1"></a>~</span>
+<span id="cb550-8"><a href="#cb550-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb550-9"><a href="#cb550-9" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb550-10"><a href="#cb550-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererTilde</span>{<span class="co">%</span></span>
+<span id="cb550-11"><a href="#cb550-11" aria-hidden="true" tabindex="-1"></a> User-defined token renderers take precedence.<span class="co">%</span></span>
+<span id="cb550-12"><a href="#cb550-12" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb550-13"><a href="#cb550-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb550-14"><a href="#cb550-14" aria-hidden="true" tabindex="-1"></a>~</span>
+<span id="cb550-15"><a href="#cb550-15" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb550-16"><a href="#cb550-16" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
+<p>Next, invoke LuaTeX from the terminal:</p>
+<div class="sourceCode" id="cb551"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb551-1"><a href="#cb551-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
+<p>A PDF document named <code>document.pdf</code> should be produced and
+contain the following text:</p>
+<blockquote>
+<p>Packages can specify token renderer prototypes.</p>
+<p>User-defined token renderers take precedence.</p>
+</blockquote>
+<h4 data-number="2.3.2.1" id="expl3yamlmetadata"><span
+class="header-section-number">2.3.2.1</span> YAML Metadata Renderer
+Prototypes</h4>
+<p>By default, the renderer prototypes for YAML metadata provide a
+high-level interface that can be programmed using the
+<code>markdown/jekyllData</code> key–values from the l3keys module of
+the <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span>3 kernel.</p>
+<h5 class="unnumbered" id="plain-tex-example-38">Plain <span
+class="tex">T<sub>e</sub>X</span> Example</h5>
+<p>Using a text editor, create a text document named
+<code>document.tex</code> with the following content:</p>
+<div class="sourceCode" id="cb552"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb552-1"><a href="#cb552-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
+<span id="cb552-2"><a href="#cb552-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionJekyllData</span>{true}</span>
+<span id="cb552-3"><a href="#cb552-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\ExplSyntaxOn</span></span>
+<span id="cb552-4"><a href="#cb552-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\keys</span>_define:nn</span>
+<span id="cb552-5"><a href="#cb552-5" aria-hidden="true" tabindex="-1"></a> { markdown/jekyllData }</span>
+<span id="cb552-6"><a href="#cb552-6" aria-hidden="true" tabindex="-1"></a> {</span>
+<span id="cb552-7"><a href="#cb552-7" aria-hidden="true" tabindex="-1"></a> name .code:n = { <span class="fu">\gdef\name</span>{#1} },</span>
+<span id="cb552-8"><a href="#cb552-8" aria-hidden="true" tabindex="-1"></a> age .code:n = { <span class="fu">\gdef\age</span>{#1} },</span>
+<span id="cb552-9"><a href="#cb552-9" aria-hidden="true" tabindex="-1"></a> }</span>
+<span id="cb552-10"><a href="#cb552-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\ExplSyntaxOff</span></span>
+<span id="cb552-11"><a href="#cb552-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererJekyllDataEnd</span>{<span class="co">%</span></span>
+<span id="cb552-12"><a href="#cb552-12" aria-hidden="true" tabindex="-1"></a> <span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.}</span>
+<span id="cb552-13"><a href="#cb552-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
+<span id="cb552-14"><a href="#cb552-14" aria-hidden="true" tabindex="-1"></a>---</span>
+<span id="cb552-15"><a href="#cb552-15" aria-hidden="true" tabindex="-1"></a>name: Jane Doe</span>
+<span id="cb552-16"><a href="#cb552-16" aria-hidden="true" tabindex="-1"></a>age: 99</span>
+<span id="cb552-17"><a href="#cb552-17" aria-hidden="true" tabindex="-1"></a>---</span>
+<span id="cb552-18"><a href="#cb552-18" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
+<span id="cb552-19"><a href="#cb552-19" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
+<p>Next, invoke LuaTeX from the terminal:</p>
+<div class="sourceCode" id="cb553"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb553-1"><a href="#cb553-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
+<p>A PDF document named <code>document.pdf</code> should be produced and
+contain the following text:</p>
+<blockquote>
+<p>Jane Doe is 99 years old.</p>
+</blockquote>
+<h5 class="unnumbered" id="latex-example-82"><span
+class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
+<p>Using a text editor, create a text document named
+<code>document.tex</code> with the following content:</p>
+<div class="sourceCode" id="cb554"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb554-1"><a href="#cb554-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb554-2"><a href="#cb554-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[jekyllData]{<span class="ex">markdown</span>}</span>
+<span id="cb554-3"><a href="#cb554-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
+<span id="cb554-4"><a href="#cb554-4" aria-hidden="true" tabindex="-1"></a> jekyllDataRenderers = {</span>
+<span id="cb554-5"><a href="#cb554-5" aria-hidden="true" tabindex="-1"></a> name = {<span class="fu">\gdef\name</span>{#1}},</span>
+<span id="cb554-6"><a href="#cb554-6" aria-hidden="true" tabindex="-1"></a> code = {<span class="fu">\gdef\age</span>{#1}},</span>
+<span id="cb554-7"><a href="#cb554-7" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb554-8"><a href="#cb554-8" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
+<span id="cb554-9"><a href="#cb554-9" aria-hidden="true" tabindex="-1"></a> jekyllDataEnd = {<span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.},</span>
+<span id="cb554-10"><a href="#cb554-10" aria-hidden="true" tabindex="-1"></a> }</span>
+<span id="cb554-11"><a href="#cb554-11" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb554-12"><a href="#cb554-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb554-13"><a href="#cb554-13" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb554-14"><a href="#cb554-14" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb554-15"><a href="#cb554-15" aria-hidden="true" tabindex="-1"></a>---</span>
+<span id="cb554-16"><a href="#cb554-16" aria-hidden="true" tabindex="-1"></a>name: Jane Doe</span>
+<span id="cb554-17"><a href="#cb554-17" aria-hidden="true" tabindex="-1"></a>age: 99</span>
+<span id="cb554-18"><a href="#cb554-18" aria-hidden="true" tabindex="-1"></a>---</span>
+<span id="cb554-19"><a href="#cb554-19" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb554-20"><a href="#cb554-20" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb554-21"><a href="#cb554-21" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div>
+<p>Next, invoke LuaTeX from the terminal:</p>
+<div class="sourceCode" id="cb555"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb555-1"><a href="#cb555-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div>
+<p>A PDF document named <code>document.pdf</code> should be produced and
+contain the following text:</p>
+<blockquote>
+<p>Jane Doe is 99 years old.</p>
+</blockquote>
+<h5 class="unnumbered" id="context-example-53">Con<span
+class="tex">T<sub>e</sub>X</span>t Example</h5>
+<p>Using a text editor, create a text document named
+<code>document.tex</code> with the following content:</p>
+<div class="sourceCode" id="cb556"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb556-1"><a href="#cb556-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span>
+<span id="cb556-2"><a href="#cb556-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[jekyllData = yes]</span>
+<span id="cb556-3"><a href="#cb556-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\ExplSyntaxOn</span></span>
+<span id="cb556-4"><a href="#cb556-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\keys</span>_define:nn</span>
+<span id="cb556-5"><a href="#cb556-5" aria-hidden="true" tabindex="-1"></a> { markdown/jekyllData }</span>
+<span id="cb556-6"><a href="#cb556-6" aria-hidden="true" tabindex="-1"></a> {</span>
+<span id="cb556-7"><a href="#cb556-7" aria-hidden="true" tabindex="-1"></a> name .code:n = { <span class="fu">\gdef\name</span>{#1} },</span>
+<span id="cb556-8"><a href="#cb556-8" aria-hidden="true" tabindex="-1"></a> age .code:n = { <span class="fu">\gdef\age</span>{#1} },</span>
+<span id="cb556-9"><a href="#cb556-9" aria-hidden="true" tabindex="-1"></a> }</span>
+<span id="cb556-10"><a href="#cb556-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\ExplSyntaxOff</span></span>
+<span id="cb556-11"><a href="#cb556-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererJekyllDataEnd</span>{<span class="co">%</span></span>
+<span id="cb556-12"><a href="#cb556-12" aria-hidden="true" tabindex="-1"></a> <span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.}</span>
+<span id="cb556-13"><a href="#cb556-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span>
+<span id="cb556-14"><a href="#cb556-14" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb556-15"><a href="#cb556-15" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span>
+<span id="cb556-16"><a href="#cb556-16" aria-hidden="true" tabindex="-1"></a>---</span>
+<span id="cb556-17"><a href="#cb556-17" aria-hidden="true" tabindex="-1"></a>name: Jane Doe</span>
+<span id="cb556-18"><a href="#cb556-18" aria-hidden="true" tabindex="-1"></a>age: 99</span>
+<span id="cb556-19"><a href="#cb556-19" aria-hidden="true" tabindex="-1"></a>---</span>
+<span id="cb556-20"><a href="#cb556-20" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span>
+<span id="cb556-21"><a href="#cb556-21" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb556-22"><a href="#cb556-22" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div>
+<p>Next, invoke LuaTeX from the terminal:</p>
+<div class="sourceCode" id="cb557"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb557-1"><a href="#cb557-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div>
+<p>A PDF document named <code>document.pdf</code> should be produced and
+contain the following text:</p>
+<blockquote>
+<p>Jane Doe is 99 years old.</p>
+</blockquote>
<section class="footnotes footnotes-end-of-document"
role="doc-endnotes">
<hr />
<ol>
-<li id="fn1" role="doc-endnote"><p>Here is the note.<a href="#fnref1"
+<li id="fn1" role="doc-endnote"><p>Inlines notes are easier to write,
+since you don’t have to pick an identifier and move down to type the
+note.<a href="#fnref1" class="footnote-back"
+role="doc-backlink">↩︎</a></p></li>
+<li id="fn2" role="doc-endnote"><p>Inlines notes are easier to write,
+since you don’t have to pick an identifier and move down to type the
+note.<a href="#fnref2" class="footnote-back"
+role="doc-backlink">↩︎</a></p></li>
+<li id="fn3" role="doc-endnote"><p>Here is the note.<a href="#fnref3"
class="footnote-back" role="doc-backlink">↩︎</a></p></li>
-<li id="fn2" role="doc-endnote"><p>Here’s one with multiple blocks.</p>
+<li id="fn4" role="doc-endnote"><p>Here’s one with multiple blocks.</p>
<p>Subsequent paragraphs are indented to show that they belong to the
previous note.</p>
<pre><code>{ some.code }</code></pre>
<p>The whole paragraph can be indented, or just the first line. In this
way, multi-paragraph notes work like multi-paragraph list items.<a
-href="#fnref2" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
-<li id="fn3" role="doc-endnote"><p>Here is the note.<a href="#fnref3"
+href="#fnref4" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
+<li id="fn5" role="doc-endnote"><p>Here is the note.<a href="#fnref5"
class="footnote-back" role="doc-backlink">↩︎</a></p></li>
-<li id="fn4" role="doc-endnote"><p>Here’s one with multiple blocks.</p>
+<li id="fn6" role="doc-endnote"><p>Here’s one with multiple blocks.</p>
<p>Subsequent paragraphs are indented to show that they belong to the
previous note.</p>
<pre><code>{ some.code }</code></pre>
<p>The whole paragraph can be indented, or just the first line. In this
way, multi-paragraph notes work like multi-paragraph list items.<a
-href="#fnref4" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
-<li id="fn5" role="doc-endnote"><p>Inlines notes are easier to write,
-since you don’t have to pick an identifier and move down to type the
-note.<a href="#fnref5" class="footnote-back"
-role="doc-backlink">↩︎</a></p></li>
-<li id="fn6" role="doc-endnote"><p>Inlines notes are easier to write,
-since you don’t have to pick an identifier and move down to type the
-note.<a href="#fnref6" class="footnote-back"
-role="doc-backlink">↩︎</a></p></li>
+href="#fnref6" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn7" role="doc-endnote"><p>Filenames other than
<code>markdown-languages.json</code> may be specified using the
<code>contentBlocksLanguageMap</code> Lua option.<a href="#fnref7"
diff --git a/macros/generic/markdown/markdown.pdf b/macros/generic/markdown/markdown.pdf
index fc5af6e745..e213c16aa0 100644
--- a/macros/generic/markdown/markdown.pdf
+++ b/macros/generic/markdown/markdown.pdf
Binary files differ
diff --git a/macros/latex/contrib/pythonimmediate/DEPENDS.txt b/macros/latex/contrib/pythonimmediate/DEPENDS.txt
new file mode 100644
index 0000000000..74052c8330
--- /dev/null
+++ b/macros/latex/contrib/pythonimmediate/DEPENDS.txt
@@ -0,0 +1,4 @@
+saveenv
+currfile
+l3keys2e
+precattl
diff --git a/macros/latex/contrib/pythonimmediate/README b/macros/latex/contrib/pythonimmediate/README
new file mode 100644
index 0000000000..c164e2ca9b
--- /dev/null
+++ b/macros/latex/contrib/pythonimmediate/README
@@ -0,0 +1,24 @@
+pythonimmediate -- Library to run Python code
+ \fileinfo.
+
+Released under the LaTeX Project Public License v1.3c or later
+See http://www.latex-project.org/lppl.txt
+
+Report bugs at https://github.com/user202729/TeXlib
+
+========
+
+Copyright 2022 user202729
+
+This work may be distributed and/or modified under the conditions of the
+LaTeX Project Public License (LPPL), either version 1.3c of this license or
+(at your option) any later version. The latest version of this license is in
+the file:
+
+ http://www.latex-project.org/lppl.txt
+
+This work has the LPPL maintenance status `maintained'.
+
+The Current Maintainer of this work is user202729.
+
+This work consists of the files pythonimmediate.sty, pythonimmediate_script_pytotex.py, pythonimmediate_script_textopy.py.
diff --git a/macros/latex/contrib/pythonimmediate/pythonimmediate.pdf b/macros/latex/contrib/pythonimmediate/pythonimmediate.pdf
new file mode 100644
index 0000000000..67bb6f1259
--- /dev/null
+++ b/macros/latex/contrib/pythonimmediate/pythonimmediate.pdf
Binary files differ
diff --git a/macros/latex/contrib/pythonimmediate/pythonimmediate.sty b/macros/latex/contrib/pythonimmediate/pythonimmediate.sty
new file mode 100644
index 0000000000..6ed72780bf
--- /dev/null
+++ b/macros/latex/contrib/pythonimmediate/pythonimmediate.sty
@@ -0,0 +1,183 @@
+% File: pythonimmediate.sty
+% Copyright 2022 user202729
+%
+% This work may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this license or
+% (at your option) any later version. The latest version of this license is in
+% the file:
+%
+% http://www.latex-project.org/lppl.txt
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is user202729.
+
+\ProvidesExplPackage{pythonimmediate}{2022/12/23}{0.0.0}{Library to run Python code}
+
+\RequirePackage{saveenv}
+\RequirePackage{currfile}
+\RequirePackage{l3keys2e}
+\RequirePackage{precattl}
+
+
+\cs_generate_variant:Nn \str_set:Nn {NV}
+\cs_generate_variant:Nn \str_if_eq:nnT {VnT}
+\cs_generate_variant:Nn \msg_error:nnn {nnV}
+\cs_generate_variant:Nn \str_if_eq:nnF {xnF}
+\cs_generate_variant:Nn \str_range:nnn {Vnn}
+\cs_generate_variant:Nn \str_if_eq:nnF {VnF}
+\cs_generate_variant:Nn \str_if_in:nnF {VnF}
+\cs_generate_variant:Nn \tl_build_put_right:Nn {NV}
+
+%\bench before~rescan.
+%\bench after~rescan.
+
+%\GenerateVariantsFile:n{\rescansynclastfilename}
+
+\str_set:Nn \_pythonimmediate_outputdir{.}
+\tl_set:Nn \_pythonimmediate_textopy_script_path{}
+\str_set:Nn \_pythonimmediate_mode{multiprocessing-network}
+\str_set:Nn \_pythonimmediate_python_executable{python3}
+\keys_define:nn{pythonimmediate}{
+ outputdir.tl_set_x:N=\_pythonimmediate_outputdir,
+ %outputdir.default:n={.}, % huh does not work?
+
+ mode.tl_set:N=\_pythonimmediate_mode,
+ scriptpath.tl_set_x:N=\_pythonimmediate_textopy_script_path,
+
+ python-executable.tl_set:N=\_pythonimmediate_python_executable,
+}
+\ProcessKeysOptions{pythonimmediate}
+
+\str_set:NV \_pythonimmediate_outputdir \_pythonimmediate_outputdir
+\str_set:NV \_pythonimmediate_mode \_pythonimmediate_mode
+\str_set:NV \_pythonimmediate_textopy_script_path \_pythonimmediate_textopy_script_path
+
+\msg_new:nnn {pythonimmediate} {shell-fail} {Shell~command~execution~failed!}
+\msg_new:nnn {pythonimmediate} {cannot-determine-script-path} {Cannot~determine~script~path!}
+\msg_new:nnn {pythonimmediate} {cannot-read-line} {Cannot~read~line!}
+\msg_new:nnn {pythonimmediate} {internal-error} {Internal~error!}
+\msg_new:nnn {pythonimmediate} {invalid-mode} {Invalid~mode:~'#1'.}
+
+
+\bool_new:N \_pythonimmediate_mode_multiprocessing_network
+\bool_new:N \_pythonimmediate_mode_unnamed_pipe
+\str_if_eq:VnT \_pythonimmediate_mode {multiprocessing-network} {\bool_set_true:N \_pythonimmediate_mode_multiprocessing_network}
+\str_if_eq:VnT \_pythonimmediate_mode {unnamed-pipe} {\bool_set_true:N \_pythonimmediate_mode_unnamed_pipe}
+\bool_if:nF {\_pythonimmediate_mode_multiprocessing_network || \_pythonimmediate_mode_unnamed_pipe} {
+ \msg_error:nnV {pythonimmediate} {invalid-mode} \_pythonimmediate_mode
+}
+
+% we need to persistently open the file anyway, so using LaTeX3 stream reference counting doesn't help
+\newread \_pythonimmediate_read_file
+
+
+
+
+%\bench before~setup.
+
+\begingroup
+ \endlinechar=-1~
+ \tl_if_empty:NT \_pythonimmediate_textopy_script_path {
+ % ======== first use kpsewhich to get the _pythonimmediate_script_path here ========
+ % (abuse \_pythonimmediate_read_file variable for this purpose)
+ \openin \_pythonimmediate_read_file=|"kpsewhich~ pythonimmediate_script_textopy.py"~
+ \readline \_pythonimmediate_read_file to \_pythonimmediate_textopy_script_path
+ %\bench after~get~textopy~path.
+ \ifeof \_pythonimmediate_read_file
+ \msg_error:nn {pythonimmediate} {cannot-determine-script-path}
+ \fi
+ }
+
+ \str_if_eq:xnF {\str_range:Vnn \_pythonimmediate_textopy_script_path {-10} {-1}} {textopy.py} {
+ \msg_error:nn {pythonimmediate} {cannot-determine-script-path}
+ }
+
+ \newwrite \_pythonimmediate_write_file
+
+ %\bench before~openin.
+
+ % ======== open persistent pipes to the child processes
+ \bool_if:NTF \_pythonimmediate_mode_unnamed_pipe { % in this case make sure the pipe remains open...
+ \openin \_pythonimmediate_read_file=|"sleep~ 0.5s|\_pythonimmediate_python_executable \space \str_range:Vnn \_pythonimmediate_textopy_script_path {1} {-11} pytotex.py \space \_pythonimmediate_mode"~ % we must use the primitive here to use the pipe file path
+ % TODO sleep infinity causes some resource leak (the process will not exit after TeX exits). Need to fix
+ % but sleep too little might be problematic that it exits before the setup is done
+ % we can just assume machines are not that slow
+ } {
+ \openin \_pythonimmediate_read_file=|"\_pythonimmediate_python_executable \space \str_range:Vnn \_pythonimmediate_textopy_script_path {1} {-11} pytotex.py \space \_pythonimmediate_mode"~ % we must use the primitive here to use the pipe file path
+ }
+
+ %\bench after~openin.
+
+ %\bench before~openout.
+ \immediate\openout \_pythonimmediate_write_file=|"\_pythonimmediate_python_executable \space \_pythonimmediate_textopy_script_path \space \_pythonimmediate_mode"~
+ % both processes must be before the \readline above so that the 2 Python processes are started "in parallel"
+ %\bench after~openout.
+
+ \readline \_pythonimmediate_read_file to \_pythonimmediate_dummy_line % endlinechar still -1
+ %\bench after~read~line.
+ \bool_if:NT \_pythonimmediate_mode_multiprocessing_network {
+ \str_if_eq:VnF \_pythonimmediate_dummy_line {listener-setup-done} {
+ \msg_error:nn {pythonimmediate} {cannot-read-line}
+ }
+ }
+ \bool_if:NT \_pythonimmediate_mode_unnamed_pipe {
+ \str_if_in:VnF \_pythonimmediate_dummy_line {pytotex_pid=} {
+ \msg_error:nn {pythonimmediate} {cannot-read-line}
+ }
+ }
+ \bool_if:NT \_pythonimmediate_mode_unnamed_pipe {
+ \immediate\write\_pythonimmediate_write_file {\_pythonimmediate_dummy_line} % which contains pytotex's pid
+ }
+\endgroup
+
+%\bench after~setup.
+
+
+% read one block of \TeX\ code from Python, store into the specified variable
+% the block is delimited using |surround_delimiter()| in Python i.e. the first and last line are identical
+% new lines are represented with ^^J
+\cs_new_protected:Npn \_pythonimmediate_gread_block:N #1 {
+ \begingroup
+ \endlinechar=10~ % affect \readline
+ \readline \_pythonimmediate_read_file to \_pythonimmediate_delimiter
+
+ \tl_build_gbegin:N #1
+ \readline \_pythonimmediate_read_file to \_pythonimmediate_line
+
+ %\bench read~first~line.
+
+ \bool_do_until:nn {\tl_if_eq_p:NN \_pythonimmediate_delimiter \_pythonimmediate_line} {
+ \tl_build_gput_right:NV #1 \_pythonimmediate_line
+ \ifeof \_pythonimmediate_read_file
+ \msg_error:nn {pythonimmediate} {internal-error}
+ \fi
+ \readline \_pythonimmediate_read_file to \_pythonimmediate_line
+ }
+ \tl_build_gend:N #1
+ \endgroup
+}
+\cs_generate_variant:Nn \tl_build_gput_right:Nn {NV}
+
+\cs_new_protected:Npn \_pythonimmediate_read_block:N #1 {
+ \_pythonimmediate_gread_block:N \_pythonimmediate_block
+ \tl_set_eq:NN #1 \_pythonimmediate_block
+}
+
+
+% read one block of \TeX\ code from Python and |\scantokens|-run it
+% the content inside is the actual TeX code to be executed
+\cs_new_protected:Npn \_pythonimmediate_run_block: {
+ \_pythonimmediate_gread_block:N \_pythonimmediate_code
+ \begingroup
+ \newlinechar=10~
+ \expandafter
+ \endgroup
+ \scantokens \expandafter{\_pythonimmediate_code}
+} % trick described in https://tex.stackexchange.com/q/640274 to scantokens the code with \newlinechar=10
+
+% bootstrap code
+%\bench before~bootstrap.
+\_pythonimmediate_run_block:
+%\bench after~bootstrap.
+
diff --git a/macros/latex/contrib/pythonimmediate/pythonimmediate.tex b/macros/latex/contrib/pythonimmediate/pythonimmediate.tex
new file mode 100644
index 0000000000..877bc3a05e
--- /dev/null
+++ b/macros/latex/contrib/pythonimmediate/pythonimmediate.tex
@@ -0,0 +1,535 @@
+\ProvidesFile{pythonimmediate.tex}[2022/12/23 0.0.0 Library to run Python code]
+\RequirePackage{fvextra}
+\documentclass{l3doc}
+\usepackage{tikz}
+\usetikzlibrary{calc}
+\usetikzlibrary{arrows.meta}
+\EnableCrossrefs
+\CodelineIndex
+\fvset{breaklines=true,gobble=0,tabsize=4,frame=single,numbers=left,numbersep=3pt}
+
+\AtBeginDocument{\DeleteShortVerb\"} % https://tex.stackexchange.com/a/650966/250119
+\MakeOuterQuote{"}
+
+\newcommand\reg{régime}
+\newcommand\DescribePython{\DescribeMacro} % hack
+
+
+\begin{document}
+
+
+% hack to make quotes inside |...| straight
+\edef\temp{\def\noexpand|{\noexpand\Verb\string|}}\temp
+% basically execute \def| { \Verb ⟨catcode other |⟩ }
+
+\GetFileInfo{\jobname.tex}
+
+\title{\pkg{\jobname} --- \fileinfo
+\thanks{This file describes version \fileversion, last revised \filedate.}
+}
+\author{user202729}
+\date{Released \filedate}
+
+\maketitle
+
+\begin{abstract}
+ \fileinfo.
+\end{abstract}
+
+\section{Motivation}
+
+Just like \pkg{Perl\TeX} or \pkg{PyLua\TeX} (and unlike \pkg{Python\TeX} or \pkg{lt3luabridge}),
+this only requires a single run, and variables are persistent throughout the run.
+
+Unlike \pkg{Perl\TeX} or \pkg{PyLua\TeX}, there's no restriction on compiler or script required to run the code.
+
+There's also debugging functionalities -- \TeX\ errors results in Python traceback, and Python error results in \TeX\ traceback.
+Errors in code executed with the |pycode| environment gives the correct traceback point to the Python line of code in the \TeX\ file.
+
+For advanced users, this package allows the user to manipulate the \TeX\ state directly from within Python,
+so you don't need to write a single line of \TeX\ code.
+
+\section{Installation}
+
+%You need to install Python \pkg{daemoniker} and \pkg{psutil} package.
+
+The package should work out of the box with no additional Python package needed.
+
+\subsection{Installation on Overleaf}
+
+At the point of writing, this package can be used on Overleaf.
+
+Instruction:
+
+\begin{itemize}
+ \item Download the following files and place it in the root folder of Overleaf:
+ \begin{itemize}
+ \item \file{saveenv.sty}
+ \item \file{precattl.sty}
+ \item \file{pythonimmediate.sty}
+ \item \file{pythonimmediate_script_textopy.py}
+ \item \file{pythonimmediate_script_pytotex.py}
+ \end{itemize}
+ \item Write the following in the preamble:
+\begin{verbatim}
+\usepackage[abspath]{currfile}
+\usepackage[mode=unnamed-pipe]{pythonimmediate}
+\end{verbatim}
+Refer to \ref{troubleshoot-source-file-not-found} for explanation of the |abspath| option.
+\end{itemize}
+
+For some unknown reason in the default mode on Overleaf (|\nonstopmode|), when there's an error
+the log file might be truncated,
+so in that case consider writing |\errorstopmode|.
+
+Refer to \ref{troubleshoot-Python-error} to read the error traceback in case of Python error.
+
+\section{Usage}
+
+\subsection{Package options}
+
+\DescribeOption{outputdir=}
+Specify the output directory if it's not the default value.
+
+\begin{texnote}
+ The value will be |x|-expanded.
+\end{texnote}
+
+Using the \pkg{outputdir} package, it's possible to determine the output directory automatically, subject to restrictions.
+
+An usage example, if you invoked |pdflatex| with the command
+\begin{verbatim}
+pdflatex --output-directory=/tmp/ a.tex
+\end{verbatim}
+then in the file \file{a.tex} you should have
+\begin{verbatim}
+\usepackage[outputdir=/tmp/]{pythonimmediate}
+\end{verbatim}
+
+\DescribeOption{mode=}
+Method to communicate between \TeX\ and Python. Usually the method will be automatically detected.
+
+Possible values include |multiprocessing-network| and |unnamed-pipe|.
+
+\subsection{\TeX\ interface}
+
+The interface mimics those in popular packages such as \pkg{Python\TeX} or \pkg{PyLua\TeX}.
+
+\subsubsection{Inline commands}
+
+\DescribeMacro{\py}\label{py-command}
+Evaluate some Python expression, consider the result as a string, then execute the result as \TeX\ command.
+
+\begin{texnote}
+ The command is not expandable, and the argument will be fully expanded with the active |~| set to |\relax|,
+ |\set@display@protect| executed and |\escapechar=-1|, then the result
+ passed to Python as a string.
+\end{texnote}
+
+Which, for the users who are not familiar with \TeX\ terminology, roughly means the following:
+\begin{itemize}
+ \item the value can only be used to typeset text,
+ it must not be used to pass "values" to other \LaTeX\ commands.
+
+ The following is legal:
+\begin{verbatim}
+The value of $1+1$ is $\py{1+1}$.
+\end{verbatim}
+The following is illegal, as the result (2) can only be used to typeset text, not passed to another command that expect a "value":
+\begin{verbatim}
+\setcounter{abc}{\py{1+1}}
+\end{verbatim}
+A possible workaround is:
+\begin{verbatim}
+\py{ r'\\setcounter{abc}{' + str(1+1) + '}' }
+\end{verbatim}
+In this example it works without escaping the |{}| characters, but if the Python code has those unbalanced then you can escape them as mentioned below.
+
+ \item Special characters can be "escaped" simply by prefixing the character with backslash.
+
+ For example
+\begin{verbatim}
+\pyc{assert len('\ \ ')==2}
+\pyc{assert ord('\\\\')==0x5c}
+\pyc{assert ord('\%') ==0x25}
+\end{verbatim}
+In the examples above, Python "sees" (i.e. the Python code being executed is)
+\begin{verbatim}
+assert len(' ')==2
+assert ord('\\')==0x5c
+assert ord('%') ==0x25
+\end{verbatim}
+respectively.
+
+ \item Macros will be expanded.
+\begin{verbatim}
+\def\mycode{1+1}
+The value of $1+1$ is $\py{\mycode}$.
+\end{verbatim}
+\end{itemize}
+
+
+\DescribeMacro{\pyc}
+Execute some Python code provided as an argument (the argument will be interpreted as described above).
+
+The command is not expandable -- roughly speaking, you can only use this at "top level".
+
+Any output (as described in \ref{print-to-TeX}) will be typesetted.
+
+The difference between |\py| and |\pyc| is that the argument of |\py| should be a Python expression
+(suitable for passing into |eval()| Python function) while the argument of |\pyc| should be a Python
+statement (suitable for passing into |exec()| Python function).
+
+Therefore,
+\begin{itemize}
+ \item |\py{1+1}| will typeset 2.
+ \item |\pyc{1+1}| is valid, but will do nothing just like |exec("1+1")|.
+ \item |\py{x=1}| is invalid.
+ \item |\pyc{x=1}| is valid and assigns the variable |x| to be 1.
+\end{itemize}
+
+\DescribeMacro{\pycq}
+Same as above, but output (\ref{print-to-TeX}) will not be typesetted.
+
+\DescribeMacro{\pyfile}
+Given an argument being the file name, execute that file.
+
+\DescribeMacro{\pys}
+Performs "string interpolation", the same way as \pkg{Python\TeX}.
+(not yet implemented)
+
+\subsubsection{Environments}
+
+\DescribeEnv{pycode}
+Verbatim-like environment that executes the code inside as Python.
+
+Example usage: The following will typeset |123|
+\begin{verbatim}
+\begin{pycode}
+pythonimmediate.print("123")
+\end{pycode}
+\end{verbatim}
+
+Special note: white spaces at the end of lines are preserved.
+
+Any output (as described in \ref{print-to-TeX}) will be typesetted.
+
+\DescribeEnv{pycodeq}
+Same as above, but output will not be typesetted.
+
+\DescribeEnv{pysub}
+Not yet implemented.
+
+\subsection{Python interface}
+
+The \TeX\ interface is only used to call Python. Apart from that, all the work can be done on the Python side.
+
+All functions in this section should be imported from |pythonimmediate| package, unless specified otherwise.
+
+\subsubsection{Print to \TeX}\label{print-to-TeX}
+
+\DescribePython{.print()}
+\DescribePython{.file}
+These functions are used in |\pyc| command or |pycode| environment.
+
+Unlike most other packages, using |print()| function in Python will print to the console (\TeX\ standard output).
+In order to print \TeX\ code to be executed, you can do one of
+\begin{verbatim}
+pythonimmediate.print(...)
+print(..., file=pythonimmediate.file)
+with contextlib.redirect_stdout(pythonimmediate.file):
+ print(...)
+\end{verbatim}
+Note that in quiet environments, |pythonimmediate.file| is None, the second variant using |print()| will print to stdout
+instead of suppress output. The third variant works as expected.
+
+All output will be buffered until the whole Python code finishes executing.
+In order to typeset the text immediately use one of the advanced commands.
+
+
+
+\DescribePython{.newcommand()}
+\DescribePython{.renewcommand()}
+Same as \LaTeX's |\newcommand| and |\renewcommand|. Can be used as follows:
+
+\begin{verbatim}
+from pythonimmediate import newcommand, renewcommand
+
+@newcommand
+def function():
+ ...
+# define |\function| in TeX
+
+@newcommand("controlsequencename")
+def function():
+ ...
+# define |\controlsequencename| in TeX
+
+def function():
+ ...
+newcommand("controlsequencename", function)
+\end{verbatim}
+
+\DescribePython{.get_arg_str()}
+\DescribePython{.get_optional_arg_str()}
+\DescribePython{.get_verb_arg()}
+\DescribePython{.get_multiline_verb_arg()}
+\DescribePython{.peek_next_char()}
+\DescribePython{.get_next_char()}
+There are those functions that is mostly understandable to an inexperienced \LaTeX\ user,
+and should be sufficient for a lot of programming works.
+
+This is an example of how the functions could be used. The name should be mostly self-explanatory.
+
+\begin{verbatim}
+\documentclass{article}
+\usepackage{pythonimmediate}
+\begin{document}
+\begin{pycode}
+from pythonimmediate import newcommand, peek_next_char, get_next_char, get_arg_str, print
+@newcommand
+def innerproduct():
+ s = get_arg_str() # in the example below this will have the value '\mathbf{a},\mathbf{b}'
+ x, y = s.split(",") # it's just a Python string, manipulate normally (but be careful of comma inside braces, parse the string yourself)
+ print(r"\left\langle" + x + r"\middle|" + y + r"\right\rangle")
+
+@newcommand
+def fx():
+ if peek_next_char() == "_":
+ get_next_char()
+ subscript = get_arg_str()
+ print("f_{" + subscript + "}(x)")
+ else:
+ print("f(x)")
+
+@newcommand
+def sumManyArgs():
+ s = 0
+ while peek_next_char() == "{":
+ i = get_arg_str()
+ s += int(i)
+ print(str(s))
+\end{pycode}
+$1+2+3 = \sumManyArgs{1}{2}{3}$
+
+$\innerproduct{\mathbf{a},\mathbf{b}}=1$
+
+$\fx = 1$, $\fx_i = 2$, $\fx_{ij} = 3$
+\end{document}
+\end{verbatim}
+
+It will typeset:
+
+\begin{quote}
+$1+2+3=6$
+
+$\left\langle\mathbf{a}\middle\vert\mathbf{b}\right\rangle=1$
+
+$f(x)=1$, $f_i(x)=2$, $f_{ij}(x)=3$
+\end{quote}
+
+\DescribePython{.get_arg_estr()}
+\DescribePython{.get_optional_arg_estr()}
+Similar to some functions above, except that the argument is fully expanded and "escapes" of common characters are handled correctly,
+similar to how |\py| command (\ref{py-command}) reads its arguments.
+
+\DescribePython{.execute()}
+Takes a string and execute it immediately. (so that any |.execute()| will be executed before any |.print()|)
+
+Assuming \TeX\ is in errorstopmode (i.e. errors halt \TeX\ execution),
+any error in \TeX\ will create an error in Python and the traceback should point to the correct line of code.
+
+For example, in the following code
+
+\begin{verbatim}
+\documentclass{article}
+\usepackage{tikz}
+\usepackage{pythonimmediate}
+\begin{document}
+
+\begin{tikzpicture}
+\begin{pycode}
+from pythonimmediate import execute
+execute(r'\draw (0, 0) to (1, 1);')
+execute(r'\draw (2, 2) to (p);')
+execute(r'\draw (3, 3) to (4, 4);')
+\end{pycode}
+\end{tikzpicture}
+
+\end{document}
+\end{verbatim}
+each |\draw| command will be executed immediately when the Python |.execute()| function is executed,
+and as the second line throws an error, the Python traceback will point to that line.
+
+\section{Troubleshooting}
+
+\subsection{"Source file not found!" error message}\label{troubleshoot-source-file-not-found}
+
+In order to obtain the exact code with trailing spaces and produce error traceback
+point to the correct \TeX\ file, the Python code need to know the full path to the current
+\TeX\ file for the |pycode| environment.
+
+Nevertheless, this is difficult and does not always work
+(refer to the documentation of \pkg{currfile} for details), so this message is issued
+when the file cannot be found.
+
+In that case try the following fixes:
+
+\begin{itemize}
+ \item Include |\usepackage[abspath]{currfile}| at the start of the document, after the |\documentclass| line.
+ (this option is not included by default because it's easy to get package clash, and usually \pkg{currfile} without
+ the |abspath| option works fine -- unless custom |jobname| is used)
+ \item Explicitly override |currfilename| or |currfileabspath| -- for example
+\begin{verbatim}
+\def\currfilename{main.tex}
+\end{verbatim}
+ Technically this is an abuse of the \pkg{currfile} package API, but it usually works regardless.
+\end{itemize}
+
+\subsection{"Python error" error message}\label{troubleshoot-Python-error}
+
+In case of Python error, the Python traceback is included in the terminal and \TeX\ log file.
+
+Search for "Python error traceback" before the error line in the log file.
+
+On Overleaf, you can either view the log file ("Raw logs" section)
+or the traceback on stderr (download \file{output.stderr} file)
+
+\subsection{"\TeX\ error" error message}\label{troubleshoot-TeX-error}
+
+If an error occur in \TeX, traceback cannot be included in the log file.
+
+Besides, this can only be detected in |\errorstopmode|. Such an error will always halt \TeX,
+and Python will be force-exited after printing the error traceback.
+
+On Overleaf, download \file{output.stderr} file to read the traceback.
+
+\section{Implementation note}
+
+Communication between \TeX\ and Python are done by opening two pseudo-files from the output of a Python process |textopy|
+(similar to |\ior_shell_open:Nn|)
+and to the input of another Python process |pytotex| (this would be |\iow_shell_open:Nn|, if \LaTeX3 have such a function).
+
+There are various methods for the 2 Python child processes to communicate with each other.
+After some initial bootstrapping to setup the communication, we can consider only the |textopy| script, the other
+merely serves as the bridge to send input to \TeX.
+
+The communication protocol is a little complicated, since it must support nesting bidirectional execution of \TeX\ and Python.
+
+Besides, I believe it's not possible to make a "background listener" on the \TeX\ side, so it must keep track of whether a command should be read from Python and executed.
+
+Currently, exception handling (throwing a Python exception in a nested Python function, catch it in the outer Python function) is not supported.
+
+These are some examples of what could happen in the communication protocol.
+
+\ExplSyntaxOn
+\let\fpEval\fp_eval:n
+\ExplSyntaxOff
+
+\begingroup
+
+\tikzset{myarrow/.style={-{Latex[length=2mm]}}}
+
+\def\blockWidth{1}
+\def\blockHeight{7}
+\def\separation{10.5}
+\def\step{0.7}
+
+\def\left #1{
+ \draw [myarrow] (p) ++(\separation, 0) -- node [above] {\small #1} ++(-\separation, 0);
+ \path (p) ++ (0, -\step) coordinate (p);
+}
+\def\right #1{
+ \draw [myarrow] (p) -- node [above] {\small #1} ++(\separation, 0);
+ \path (p) ++ (0, -\step) coordinate (p);
+}
+
+\def\initDrawing{
+ \path (\blockWidth, \fpEval{-\step}) coordinate (p);
+}
+
+\newdimen \tempx
+\newdimen \tempy
+
+\ExplSyntaxOn
+\let \dimToDecimalInUnit \dim_to_decimal_in_unit:nn
+\ExplSyntaxOff
+
+\def\drawBlocks{
+ \path [transform canvas] (p);
+ \pgfgetlastxy{\tempx}{\tempy}
+ \edef\blockHeight{ \fpEval{ - \dimToDecimalInUnit{\tempy}{1cm} } }
+
+ \draw (0, \fpEval{-\blockHeight}) rectangle node [rotate=90] {\TeX} (\blockWidth, 0);
+ \draw (\fpEval{\blockWidth+\separation}, \fpEval{-\blockHeight}) rectangle node [rotate=270] {Python} (\fpEval{\separation+2*\blockWidth}, 0);
+}
+
+\vspace{5pt}
+\begin{tikzpicture}
+\edef\blockHeight{\fpEval{\step*3}}
+\initDrawing
+\right{execute Python code: print(1)}
+\left{execute \TeX\ code: 1}
+\drawBlocks
+\end{tikzpicture}
+
+Nevertheless, there may be more complicated cases where the Python code itself may call \TeX\ code before actually returns:
+
+\vspace{5pt}
+\begin{tikzpicture}
+\edef\blockHeight{\fpEval{\step*5}}
+\initDrawing
+\right{execute Python code: print(var(a)*2)}
+\left{execute \TeX\ code: sendtopy(a); execute another command}
+\right{123}
+\left{execute \TeX\ code: 123123}
+\drawBlocks
+\end{tikzpicture}
+
+Or:
+
+\vspace{5pt}
+\begin{tikzpicture}
+\edef\blockHeight{\fpEval{\step*7}}
+\initDrawing
+\right{execute Python code: tex.exec(a=456); print(var(a)*2)}
+\left{execute \TeX\ code: a=456; sendtopy(done); execute another command}
+\right{done}
+\left{execute \TeX\ code: sendtopy(a); execute another command}
+\right{456}
+\left{456456}
+\drawBlocks
+\end{tikzpicture}
+
+\endgroup
+
+The Python side must not just listen for "done" command back, but must potentially call a nested loop.
+
+The exact protocol is:
+\begin{itemize}
+ \item "execute Python code" sends from \TeX\ to Python has a single line "|i|\meta{handler name}",
+ followed by any number of arguments (depends on the handler).
+
+ Refer to the |define_TeX_call_Python| internal function for details.
+
+ \item "done" sends from \TeX\ to Python has the format "|r|\meta{optional return value as a string in a single line}".
+
+ This is sent by executing \TeX\ command |\pythonimmediatecontinue|, which takes a single argument to be e-expanded using |\write|
+ as the "return value".
+
+ \item "execute \TeX\ code" sends from Python to \TeX\ must only be sent when the \TeX\ side listens for a command.
+ It consist of a single line specify the "command name", which \TeX\ will
+ execute the command named
+ |\__run_|\meta{command name}|:|
+ which must already be defined on the \TeX\ side.
+
+ The command itself might contain additional code to execute more code, e.g. by reading more lines from Python.
+
+ Refer to the |define_Python_call_TeX| internal function for details.
+\end{itemize}
+
+
+
+\PrintIndex
+
+\end{document}
diff --git a/macros/latex/contrib/pythonimmediate/pythonimmediate_script_pytotex.py b/macros/latex/contrib/pythonimmediate/pythonimmediate_script_pytotex.py
new file mode 100755
index 0000000000..abb71a2631
--- /dev/null
+++ b/macros/latex/contrib/pythonimmediate/pythonimmediate_script_pytotex.py
@@ -0,0 +1,57 @@
+#!/bin/python3
+"""
+======== Py-to-TeX half ========
+
+receive things that should be passed to TeX from TeX-to-Py half,
+then pass to TeX.
+
+the things that are sent should already be newline-terminated if necessary.
+
+user code are not executed here.
+"""
+
+import sys
+import signal
+signal.signal(signal.SIGINT, signal.SIG_IGN) # when the other half terminates this one will terminates "gracefully"
+
+#debug_file=open(Path(tempfile.gettempdir())/"pythonimmediate_debug_pytotex.txt", "w", encoding='u8', buffering=2)
+#debug=functools.partial(print, file=debug_file, flush=True)
+debug=lambda *args, **kwargs: None
+
+import argparse
+parser=argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)
+parser.add_argument("mode", choices=["multiprocessing-network", "unnamed-pipe"])
+args=parser.parse_args()
+
+
+# ======== setup communication method. Just an infinite loop print whatever being sent.
+
+if args.mode=="multiprocessing-network":
+ from multiprocessing.connection import Listener
+
+ address=("localhost", 7348)
+ #address="./pythonimmediate.socket"
+ with Listener(address) as listener:
+ print("listener-setup-done", flush=True)
+ with listener.accept() as connection:
+ debug("accepted a connection")
+ while True:
+ try:
+ data=connection.recv_bytes()
+ debug(" data=", data)
+ sys.__stdout__.buffer.write(data) # will go to TeX
+ sys.__stdout__.buffer.flush()
+ except EOFError: break
+
+elif args.mode=="unnamed-pipe":
+ import os
+ sys.stdout.write("pytotex_pid=" + str(os.getpid()) + "\n")
+ sys.stdout.flush()
+ for line in sys.stdin:
+ sys.stdout.write(line)
+ sys.stdout.flush()
+
+else:
+ assert False
+
+# ========
diff --git a/macros/latex/contrib/pythonimmediate/pythonimmediate_script_textopy.py b/macros/latex/contrib/pythonimmediate/pythonimmediate_script_textopy.py
new file mode 100755
index 0000000000..7e4f4a7de9
--- /dev/null
+++ b/macros/latex/contrib/pythonimmediate/pythonimmediate_script_textopy.py
@@ -0,0 +1,2295 @@
+#!/bin/python3
+"""
+======== TeX-to-Py half ========
+
+receive commands from TeX, then execute it here
+"""
+
+
+#from __future__ import annotations
+import sys
+import os
+import inspect
+import contextlib
+import io
+import functools
+from typing import Optional, Union, Callable, Any, Iterator, Protocol, Iterable, Sequence, Type, Tuple, List, Dict
+import typing
+from abc import ABC, abstractmethod
+from pathlib import Path
+from dataclasses import dataclass
+import tempfile
+import signal
+import traceback
+import re
+import collections
+import enum
+
+
+def user_documentation(x: Union[Callable, str])->Any:
+ return x
+
+
+
+#debug=functools.partial(print, file=sys.stderr, flush=True) # unfortunately this is async ... or so it seems...?
+#debug_file=open(Path(tempfile.gettempdir())/"pythonimmediate_debug_textopy.txt", "w", encoding='u8', buffering=2)
+#debug=functools.partial(print, file=debug_file, flush=True)
+debug=lambda *args, **kwargs: None
+
+
+import argparse
+parser=argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)
+parser.add_argument("mode", choices=["multiprocessing-network", "unnamed-pipe"])
+args=parser.parse_args()
+
+expansion_only_can_call_Python=False # normally. May be different in LuaTeX etc.
+
+# ======== setup communication method. Requires raw_readline() and send_raw() methods.
+
+if True:
+ sys.stdin=None # type: ignore
+ # avoid user mistakenly read
+
+ raw_readline=sys.__stdin__.readline # raw_readline() should return "⟨line⟩\n" or "" (if EOF) on each call
+
+if args.mode=="multiprocessing-network":
+ address=("localhost", 7348) # this must be identical to that of the other half-script
+ #address="./pythonimmediate.socket"
+
+ from multiprocessing.connection import Client
+ connection=Client(address)
+ debug("connected")
+
+ def send_raw(s: str)->None: # send_raw() should get pass the s = "⟨line⟩\n"
+ global connection
+ connection.send_bytes(s.encode('u8'))
+
+elif args.mode=="unnamed-pipe":
+ pytotex_pid_line=raw_readline()
+ match_=re.fullmatch("pytotex_pid=(\d+)\n", pytotex_pid_line)
+ assert match_
+ pytotex_pid=int(match_[1])
+
+ connection_=open("/proc/" + str(pytotex_pid) + "/fd/0", "w", encoding='u8',
+ buffering=1 # line buffering
+ )
+
+ def send_raw(s: str)->None:
+ global connection_
+ connection_.write(s)
+ connection_.flush() # just in case
+
+else:
+ assert False
+
+# ======== done.
+
+# https://stackoverflow.com/questions/5122465/can-i-fake-a-package-or-at-least-a-module-in-python-for-testing-purposes
+from types import ModuleType
+pythonimmediate: Any=ModuleType("pythonimmediate")
+pythonimmediate.__file__="pythonimmediate.py"
+sys.modules["pythonimmediate"]=pythonimmediate
+
+pythonimmediate.debugging=True
+
+def export_function_to_module(f: Callable)->Callable:
+ """
+ the functions decorated with this decorator are accessible from user code with
+
+ import pythonimmediate
+ pythonimmediate.⟨function name⟩(...)
+ """
+ setattr(pythonimmediate, f.__name__, f)
+ return f
+
+action_done=False
+
+
+def check_not_finished()->None:
+ global action_done
+ if action_done:
+ raise RuntimeError("can only do one action per block!")
+
+def send_finish(s: str)->None:
+ check_not_finished()
+ global action_done
+ action_done=True
+ send_raw(s)
+
+
+import random
+def surround_delimiter(block: str)->str:
+ while True:
+ delimiter=str(random.randint(0, 10**12))
+ if delimiter not in block: break
+ return delimiter + "\n" + block + "\n" + delimiter + "\n"
+
+bootstrap_code: Optional[str]=""
+def mark_bootstrap(code: str)->None:
+ global bootstrap_code
+ assert bootstrap_code is not None
+ bootstrap_code+=code
+
+def substitute_private(code: str)->str:
+ return (code
+ #.replace("\n", ' ') # because there are comments in code, cannot
+ .replace("__", "_" + "pythonimmediate" + "_")
+ )
+
+def send_bootstrap_code()->None:
+ global bootstrap_code
+ assert bootstrap_code is not None
+ send_raw(surround_delimiter(substitute_private(bootstrap_code)))
+ bootstrap_code = None
+
+# ========
+
+
+# as the name implies, this reads one "command" from Python side and execute it.
+# the command might do additional tasks e.g. read more \TeX\ code.
+#
+# e.g. if `block' is read from the communication channel, run |\__run_block:|.
+
+mark_bootstrap(
+r"""
+\cs_new_protected:Npn \__read_do_one_command: {
+ \begingroup
+ \endlinechar=-1~
+ \readline \__read_file to \__line
+ \expandafter
+ \endgroup % also this will give an error instead of silently do nothing when command is invalid
+ \csname __run_ \__line :\endcsname
+}
+
+% read documentation of |_peek| commands for details what this command does.
+\cs_new_protected:Npn \pythonimmediatecontinue #1 {
+ \immediate\write \__write_file {r #1}
+ \__read_do_one_command:
+}
+
+\cs_new_protected:Npn \pythonimmediatecontinuenoarg {
+ \pythonimmediatecontinue {}
+}
+
+% internal function. Just send an arbitrary block of data to Python.
+\cs_new_protected:Npn \__send_block:e #1 {
+ \immediate\write \__write_file {
+ #1 ^^J
+ pythonimm?""" + '"""' + r"""?'''? % following character will be newline
+ }
+}
+
+\cs_new_protected:Npn \__send_block:n #1 {
+ \__send_block:e {\unexpanded{#1}}
+}
+
+\AtEndDocument{
+ \immediate\write \__write_file {r}
+}
+""")
+
+
+# ========
+
+# when 'i⟨string⟩' is sent from TeX to Python, the function with index ⟨string⟩ in this dict is called
+TeX_handlers: Dict[str, Callable[[], None]]={}
+
+TeXToPyObjectType=Optional[str]
+
+def run_main_loop()->TeXToPyObjectType:
+ while True:
+ line=readline()
+ if not line: return None
+
+ if line[0]=="i":
+ TeX_handlers[line[1:]]()
+ elif line[0]=="r":
+ return line[1:]
+ else:
+ raise RuntimeError("Internal error: unexpected line "+line)
+
+def run_main_loop_get_return_one()->str:
+ line=readline()
+ assert line[0]=="r"
+ return line[1:]
+
+
+
+user_documentation(
+"""
+All exported functions can be accessed through the module as |import pythonimmediate|.
+
+The |_finish| functions are internal functions, which must be called \emph{at most} once in each
+|\pythonimmediate:n| call from \TeX\ to tell \TeX\ what to do.
+
+The |_local| functions simply execute the code. These functions will only return when
+the \TeX\ code finishes executing; nevertheless, the \TeX\ code might recursively execute some Python code
+inside it.
+
+A simple example is |pythonimmediate.run_block_local('123')| which simply typesets |123|.
+
+The |_peek| functions is the same as above; however, the \TeX\ code must contain an explicit command
+|\pythonimmediatecontinue{...}|.
+
+The argument of |\pythonimmediatecontinue| will be |e|-expanded
+by |\write| (note that the written content must not contain any newline character,
+otherwise the behavior is undefined), then returned as a string by the Python code.
+The Python function will only return when |\pythonimmediatecontinue| is called.
+
+In other words, |run_*_local(code)| is almost identical to |run_*_peek(code + "\pythonimmediatecontinue {}")|.
+""")
+
+@export_function_to_module
+def run_block_finish(block: str)->None:
+ send_finish("block\n" + surround_delimiter(block))
+
+
+@user_documentation
+@export_function_to_module
+def execute(block: str)->None:
+ """
+ Run a block of \TeX\ code (might consist of multiple lines).
+ Catcode-changing commands are allowed inside.
+
+ A simple example is |pythonimmediate.run_block_local('123')| which simply typesets |123|.
+
+ A more complicated example is |pythonimmediate.run_block_local(r'\verb+%+')|.
+ """
+ run_block_local(block)
+
+def check_line(line: str, *, braces: bool, newline: bool, continue_: Optional[bool])->None:
+ """
+ check user-provided line before sending to TeX for execution
+ """
+ if braces:
+ assert line.count("{") == line.count("}")
+ if newline:
+ assert '\n' not in line
+ assert '\r' not in line # this is not the line separator but just in case
+ if continue_==True: assert "pythonimmediatecontinue" in line
+ elif continue_==False: assert "pythonimmediatecontinue" not in line
+
+
+
+
+do_run_error_finish=True
+
+
+
+
+
+user_scope: Dict[str, Any]={} # consist of user's local variables etc.
+
+def readline()->str:
+ line=raw_readline()
+ if not line:
+ sys.stderr.write("\n\nTraceback (most recent call last):\n")
+ traceback.print_stack(file=sys.stderr)
+ sys.stderr.write("RuntimeError: Fatal irrecoverable TeX error\n\n")
+ os._exit(1)
+
+
+ assert line[-1]=='\n'
+ line=line[:-1]
+ debug("======== saw line", line)
+ return line
+
+block_delimiter: str="pythonimm?\"\"\"?'''?"
+
+def read_block()->str:
+ """
+ Internal function to read one block sent from \TeX\ (including the final delimiter line,
+ but the delimiter line is not returned)
+ """
+ lines: List[str]=[]
+ while True:
+ line=readline()
+ if line==block_delimiter:
+ return '\n'.join(lines)
+ else:
+ lines.append(line)
+
+
+@export_function_to_module
+class NToken(ABC):
+ """
+ Represent a possibly-notexpanded token.
+ For convenience, a notexpanded token is called a blue token.
+ It's not always possible to determine the notexpanded status of a following token in the input stream.
+ Remark: Token objects must be frozen.
+ """
+
+ @abstractmethod
+ def __str__(self)->str: ...
+
+ @abstractmethod
+ def repr1(self)->str: ...
+
+ @property
+ @abstractmethod
+ def assignable(self)->bool: ...
+
+ def assign(self, other: "NToken")->None:
+ assert self.assignable
+ NTokenList([T.let, self, C.other("="), C.space(' '), other]).execute()
+
+ def assign_future(self)->None:
+ assert self.assignable
+ futurelet_(PTTBalancedTokenList(BalancedTokenList([self.no_blue])))
+
+ def assign_futurenext(self)->None:
+ assert self.assignable
+ futureletnext_(PTTBalancedTokenList(BalancedTokenList([self.no_blue])))
+
+ def meaning_str(self)->str:
+ """
+ get the meaning of this token as a string.
+ """
+ return NTokenList([T.meaning, self]).expand_x().str()
+
+ @property
+ @abstractmethod
+ def blue(self)->"BlueToken": ...
+
+ @property
+ @abstractmethod
+ def no_blue(self)->"Token": ...
+
+ def meaning_equal(self, other: "Token")->bool:
+ return NTokenList([T.ifx, self, other, Catcode.other("1"), T["else"], Catcode.other("0"), T.fi]).expand_x().bool()
+
+ def str(self)->str:
+ """
+ self must represent a character of a TeX string. (i.e. equal to itself when detokenized)
+ return the string content.
+
+ default implementation below. Not necessarily correct.
+ """
+ raise ValueError("Token does not represent a string!")
+
+ def degree(self)->int:
+ """
+ return the imbalance degree for this token ({ -> 1, } -> -1, everything else -> 0)
+
+ default implementation below. Not necessarily correct.
+ """
+ return 0
+
+
+@export_function_to_module
+class Token(NToken):
+ """
+ Represent a TeX token, excluding the notexpanded possibility.
+ See also documentation of NToken.
+ """
+
+ @abstractmethod
+ def serialize(self)->str: ...
+
+ @property
+ def blue(self)->"BlueToken": return BlueToken(self)
+
+ @property
+ def no_blue(self)->"Token": return self
+
+ def __repr__(self)->str:
+ return f"<Token: {self.repr1()}>"
+
+ @staticmethod
+ def deserialize(s: str)->"Token":
+ t=TokenList.deserialize(s)
+ assert len(t)==1
+ return t[0]
+
+ @staticmethod
+ def get_next()->"Token":
+ """
+ Get the following token.
+
+ Note: in LaTeX3 versions without the commit |https://github.com/latex3/latex3/commit/24f7188904d6|
+ sometimes this may error out.
+
+ Note: because of the internal implementation of |\peek_analysis_map_inline:n|, this may
+ tokenize up to 2 tokens ahead (including the returned token),
+ as well as occasionally return the wrong token in unavoidable cases.
+ """
+ return Token.deserialize(str(get_next_()[0]))
+
+ @staticmethod
+ def peek_next()->"Token":
+ """
+ Get the following token without removing it from the input stream.
+
+ Equivalent to get_next() then put_next() immediately. See documentation of get_next() for some notes.
+ """
+ return Token.deserialize(
+ typing.cast(Callable[[], TTPLine], Python_call_TeX_local(
+ r"""
+ \cs_new_protected:Npn \__peek_next_callback: #1 {
+ \immediate\write \__write_file { r^^J #1 }
+ \expandafter % expand the ##1 in (*)
+ \__read_do_one_command:
+ }
+
+ \cs_new_protected:Npn %name% {
+ \peek_analysis_map_inline:n {
+ \peek_analysis_map_break:n {
+ \__tlserialize_char_unchecked:nnNN {##1}{##2}##3 \__peek_next_callback: ##1 % (*)
+ }
+ }
+ }
+ """, recursive=False))()
+ )
+
+ def put_next(self)->None:
+ d=self.degree()
+ if d==0:
+ BalancedTokenList([self]).put_next()
+ else:
+ assert isinstance(self, CharacterToken)
+ if d==1:
+ put_next_bgroup(PTTInt(self.index))
+ else:
+ assert d==-1
+ put_next_egroup(PTTInt(self.index))
+
+
+
+
+
+
+"""
+TeX code for serializing and deserializing a token list.
+Convert a token list from/to a string.
+"""
+
+
+mark_bootstrap(
+r"""
+\precattl_exec:n {
+
+% here #1 is the target token list to store the result to, #2 is a string with the final '.'.
+\cs_new_protected:Npn \__tldeserialize_dot:Nn #1 #2 {
+ \begingroup
+ \tl_set:Nn \__tmp {#2}
+ \tl_replace_all:Nnn \__tmp {~} {\cO\ }
+
+ \def \start ##1 { \csname ##1 \endcsname }
+
+ \def \> ##1 ##2 \cO\ { \csname ##1 \endcsname ##2 \cU\ }
+ \def \\ ##1 \cO\ ##2 { \expandafter \noexpand \csname ##1 \endcsname \csname ##2 \endcsname }
+ \def \1 ##1 ##2 { \char_generate:nn {`##1} {1} \csname ##2 \endcsname }
+ \def \2 ##1 ##2 { \char_generate:nn {`##1} {2} \csname ##2 \endcsname }
+ \def \3 ##1 ##2 { \char_generate:nn {`##1} {3} \csname ##2 \endcsname }
+ \def \4 ##1 ##2 { \char_generate:nn {`##1} {4} \csname ##2 \endcsname }
+ \def \6 ##1 ##2 { #### \char_generate:nn {`##1} {6} \csname ##2 \endcsname }
+ \def \7 ##1 ##2 { \char_generate:nn {`##1} {7} \csname ##2 \endcsname }
+ \def \8 ##1 ##2 { \char_generate:nn {`##1} {8} \csname ##2 \endcsname }
+ \def \A ##1 ##2 { \char_generate:nn {`##1} {10} \csname ##2 \endcsname }
+ \def \B ##1 ##2 { \char_generate:nn {`##1} {11} \csname ##2 \endcsname }
+ \def \C ##1 ##2 { \char_generate:nn {`##1} {12} \csname ##2 \endcsname }
+ \def \D ##1 ##2 { \expandafter \expandafter \expandafter \noexpand \char_generate:nn {`##1} {13} \csname ##2 \endcsname }
+ \def \R ##1 { \cFrozenRelax \csname ##1 \endcsname }
+
+ \let \. \empty
+
+ \exp_args:NNNx
+ \endgroup \tl_set:Nn #1 {\expandafter \start \__tmp}
+}
+
+\cs_new_protected:Npn \__tlserialize_char_unchecked:nnNN #1 #2 #3 #4 {
+ % #1=token, #2=char code, #3=catcode, #4: callback (will be called exactly once and with nothing following the input stream)
+ \int_compare:nNnTF {#2} = {-1} {
+ % token is control sequence
+ \tl_if_eq:onTF {#1} {\cFrozenRelax} {
+ #4 {\cStr{ R }}
+ } {
+ \tl_if_eq:onTF {#1} { \cC{} } {
+ #4 {\cStr{ \\\ }}
+ } {
+ \tl_set:Nx \__name { \expandafter \cs_to_str:N #1 }
+ \exp_args:Nx #4 { \prg_replicate:nn {\str_count_spaces:N \__name} {>} \cStr\\ \__name \cStr\ }
+ }
+ }
+ } {
+ % token is not control sequence
+ % (hex catcode) (character) (or escape sequence with that character)
+ \exp_args:Nx #4 { #3 \expandafter \string #1 }
+ }
+}
+
+}
+
+% deserialize as above but #2 does not end with '.'.
+\cs_new_protected:Npn \__tldeserialize_nodot:Nn #1 #2 {
+ \__tldeserialize_dot:Nn #1 {#2 .}
+}
+
+% serialize token list in #2 store to #1.
+\cs_new_protected:Npn \__tlserialize_nodot_unchecked:Nn #1 #2 {
+ \tl_build_begin:N #1
+ \tl_set:Nn \__tlserialize_callback { \tl_build_put_right:Nn #1 }
+ \tl_analysis_map_inline:nn {#2} {
+ \__tlserialize_char_unchecked:nnNN {##1}{##2}##3 \__tlserialize_callback
+ }
+ \tl_build_end:N #1
+}
+
+% serialize token list in #2 store to #1. Call T or F branch depends on whether serialize is successful.
+% #1 must be different from \__tlserialize_tmp.
+\cs_new_protected:Npn \__tlserialize_nodot:NnTF #1 #2 {
+ \__tlserialize_nodot_unchecked:Nn #1 {#2}
+ \__tldeserialize_nodot:NV \__tlserialize_nodot_tmp #1
+
+ \tl_if_eq:NnTF \__tlserialize_nodot_tmp {#2} % dangling
+}
+
+\cs_new_protected:Npn \__tlserialize_nodot:NnF #1 #2 {
+ \__tlserialize_nodot:NnTF #1 {#2} {} % dangling
+}
+
+\cs_new_protected:Npn \__tlserialize_nodot:NnT #1 #2 #3 { \__tlserialize_nodot:NnTF #1 {#2} {#3} {} }
+
+\msg_new:nnn {pythonimmediate} {cannot-serialize} {Token~list~cannot~be~serialized}
+
+\cs_new_protected:Npn \__tlserialize_nodot:Nn #1 #2{
+ \__tlserialize_nodot:NnF #1 {#2} {
+ \msg_error:nn {pythonimmediate} {cannot-serialize}
+ }
+}
+
+\cs_generate_variant:Nn \__tldeserialize_dot:Nn {NV}
+\cs_generate_variant:Nn \__tldeserialize_nodot:Nn {NV}
+\cs_generate_variant:Nn \__tlserialize_nodot:Nn {NV}
+""")
+
+
+class ControlSequenceTokenMaker:
+ """
+ shorthand to create control sequence objects in Python easier.
+ """
+ def __init__(self, prefix: str)->None:
+ self.prefix=prefix
+ def __getattribute__(self, a: str)->"ControlSequenceToken":
+ return ControlSequenceToken(object.__getattribute__(self, "prefix")+a)
+ def __getitem__(self, a: str)->"ControlSequenceToken":
+ return ControlSequenceToken(object.__getattribute__(self, "prefix")+a)
+
+
+@export_function_to_module
+@dataclass(repr=False, frozen=True)
+class ControlSequenceToken(Token):
+ make=typing.cast(ControlSequenceTokenMaker, None) # some interference makes this incorrect. Manually assign below
+ csname: str
+ @property
+ def assignable(self)->bool:
+ return True
+ def __str__(self)->str:
+ if self.csname=="": return r"\csname\endcsname"
+ return "\\"+self.csname
+ def serialize(self)->str:
+ return ">"*self.csname.count(" ") + "\\" + self.csname + " "
+ def repr1(self)->str:
+ return f"\\{self.csname}"
+
+
+ControlSequenceToken.make=ControlSequenceTokenMaker("")
+
+T=ControlSequenceToken.make
+P=ControlSequenceTokenMaker("_pythonimmediate_") # create private tokens
+
+@export_function_to_module
+class Catcode(enum.Enum):
+ begin_group=bgroup=1
+ end_group=egroup=2
+ math_toggle=math=3
+ alignment=4
+ parameter=param=6
+ math_superscript=superscript=7
+ math_subscript=subscript=8
+ space=10
+ letter=11
+ other=12
+ active=13
+
+ escape=0
+ end_of_line=paragraph=line=5
+ ignored=9
+ comment=14
+ invalid=15
+
+ @property
+ def for_token(self)->bool:
+ """
+ Return whether a token may have this catcode.
+ """
+ return self not in (Catcode.escape, Catcode.line, Catcode.ignored, Catcode.comment, Catcode.invalid)
+
+ def __call__(self, ch: Union[str, int])->"CharacterToken":
+ """
+ Shorthand:
+ Catcode.letter("a") = Catcode.letter(97) = CharacterToken(index=97, catcode=Catcode.letter)
+ """
+ if isinstance(ch, str): ch=ord(ch)
+ return CharacterToken(ch, self)
+
+C=Catcode
+
+@export_function_to_module
+@dataclass(repr=False, frozen=True) # must be frozen because bgroup and egroup below are reused
+class CharacterToken(Token):
+ index: int
+ catcode: Catcode
+ @property
+ def chr(self)->str:
+ return chr(self.index)
+ def __post_init__(self)->None:
+ assert self.catcode.for_token
+ def __str__(self)->str:
+ return self.chr
+ def serialize(self)->str:
+ return f"{self.catcode.value:X}{self.chr}"
+ def repr1(self)->str:
+ cat=str(self.catcode.value).translate(str.maketrans("0123456789", "₀₁₂₃₄₅₆₇₈₉"))
+ return f"{self.chr}{cat}"
+ @property
+ def assignable(self)->bool:
+ return self.catcode==Catcode.active
+ def degree(self)->int:
+ if self.catcode==Catcode.bgroup:
+ return 1
+ elif self.catcode==Catcode.egroup:
+ return -1
+ else:
+ return 0
+ def str(self)->str:
+ catcode=Catcode.space if self.index==32 else Catcode.other
+ if catcode!=self.catcode:
+ raise ValueError("this CharacterToken does not represent a string!")
+ return self.chr
+
+class FrozenRelaxToken(Token):
+ def __str__(self)->str:
+ return r"\relax"
+ def serialize(self)->str:
+ return "R"
+ def repr1(self)->str:
+ return r"[frozen]\relax"
+ @property
+ def assignable(self)->bool:
+ return False
+
+frozen_relax_token=FrozenRelaxToken()
+pythonimmediate.frozen_relax_token=frozen_relax_token
+
+# other special tokens later...
+
+bgroup=Catcode.bgroup("{")
+egroup=Catcode.egroup("}")
+space=Catcode.space(" ")
+
+
+
+@export_function_to_module
+@dataclass(frozen=True)
+class BlueToken(NToken):
+ token: Token
+
+ @property
+ def blue(self)->"BlueToken": return self
+
+ @property
+ def no_blue(self)->"Token": return self.token
+
+ def __str__(self)->str: return str(self.token)
+
+ def repr1(self)->str: return "notexpanded:"+self.token.repr1()
+
+ @property
+ def assignable(self)->bool: return self.token.assignable
+
+ def put_next(self)->None:
+ put_next_blue(PTTBalancedTokenList(BalancedTokenList([self.token])))
+
+
+doc_catcode_table: Dict[int, Catcode]={}
+doc_catcode_table[ord("{")]=Catcode.begin_group
+doc_catcode_table[ord("}")]=Catcode.end_group
+doc_catcode_table[ord("$")]=Catcode.math_toggle
+doc_catcode_table[ord("&")]=Catcode.alignment
+doc_catcode_table[ord("#")]=Catcode.parameter
+doc_catcode_table[ord("^")]=Catcode.math_superscript
+doc_catcode_table[ord("_")]=Catcode.math_subscript
+doc_catcode_table[ord(" ")]=Catcode.space
+doc_catcode_table[ord("~")]=Catcode.active
+for ch in range(ord('a'), ord('z')+1): doc_catcode_table[ch]=Catcode.letter
+for ch in range(ord('A'), ord('Z')+1): doc_catcode_table[ch]=Catcode.letter
+doc_catcode_table[ord("\\")]=Catcode.escape
+doc_catcode_table[ord("%")]=Catcode.comment
+
+e3_catcode_table=dict(doc_catcode_table)
+e3_catcode_table[ord("_")]=Catcode.letter
+e3_catcode_table[ord(":")]=Catcode.letter
+e3_catcode_table[ord(" ")]=Catcode.ignored
+e3_catcode_table[ord("~")]=Catcode.space
+
+
+TokenListType = typing.TypeVar("TokenListType", bound="TokenList")
+
+if typing.TYPE_CHECKING:
+ TokenListBaseClass = collections.UserList[Token]
+else: # Python 3.8 compatibility
+ TokenListBaseClass = collections.UserList
+
+@export_function_to_module
+class TokenList(TokenListBaseClass):
+ @staticmethod
+ def force_token_list(a: Iterable)->Iterable[Token]:
+ for x in a:
+ if isinstance(x, Token):
+ yield x
+ elif isinstance(x, Sequence):
+ yield bgroup
+ child=BalancedTokenList(x)
+ assert child.is_balanced()
+ yield from child
+ yield egroup
+ else:
+ raise RuntimeError(f"Cannot make TokenList from object {x} of type {type(x)}")
+
+ def is_balanced(self)->bool:
+ """
+ check if this is balanced.
+ """
+ degree=0
+ for x in self:
+ degree+=x.degree()
+ if degree<0: return False
+ return degree==0
+
+ def check_balanced(self)->None:
+ """
+ ensure that this is balanced.
+ """
+ if not self.is_balanced():
+ raise ValueError("Token list is not balanced")
+
+ def balanced_parts(self)->"List[Union[BalancedTokenList, Token]]":
+ """
+ split this TokenList into a list of balanced parts and unbalanced {/}tokens
+ """
+ degree=0
+ min_degree=0, 0
+ for i, token in enumerate(self):
+ degree+=token.degree()
+ min_degree=min(min_degree, (degree, i+1))
+ min_degree_pos=min_degree[1]
+
+ left_half: List[Union[BalancedTokenList, Token]]=[]
+ degree=0
+ last_pos=0
+ for i in range(min_degree_pos):
+ d=self[i].degree()
+ degree+=d
+ if degree<0:
+ degree=0
+ if last_pos!=i:
+ left_half.append(BalancedTokenList(self[last_pos:i]))
+ left_half.append(self[i])
+ last_pos=i+1
+ if min_degree_pos!=last_pos:
+ left_half.append(BalancedTokenList(self[last_pos:min_degree_pos]))
+
+ right_half: List[Union[BalancedTokenList, Token]]=[]
+ degree=0
+ last_pos=len(self)
+ for i in range(len(self)-1, min_degree_pos-1, -1):
+ d=self[i].degree()
+ degree-=d
+ if degree<0:
+ degree=0
+ if i+1!=last_pos:
+ right_half.append(BalancedTokenList(self[i+1:last_pos]))
+ right_half.append(self[i])
+ last_pos=i
+ if min_degree_pos!=last_pos:
+ right_half.append(BalancedTokenList(self[min_degree_pos:last_pos]))
+
+ return left_half+right_half[::-1]
+
+ def put_next(self)->None:
+ for part in reversed(self.balanced_parts()): part.put_next()
+
+ @property
+ def balanced(self)->"BalancedTokenList":
+ """
+ return a BalancedTokenList containing the content of this object.
+ it must be balanced.
+ """
+ return BalancedTokenList(self)
+
+ def __init__(self, a: Iterable=())->None:
+ super().__init__(TokenList.force_token_list(a))
+
+ @staticmethod
+ def iterable_from_string(s: str, get_catcode: Callable[[int], Catcode])->Iterable[Token]:
+ """
+ refer to documentation of from_string() for details.
+ """
+ i=0
+ while i<len(s):
+ ch=s[i]
+ i+=1
+ cat=get_catcode(ord(ch))
+ if cat==Catcode.space:
+ yield space
+ # special case: collapse multiple spaces into one but only if character code is space
+ if get_catcode(32) in (Catcode.space, Catcode.ignored):
+ while i<len(s) and s[i]==' ':
+ i+=1
+ elif cat.for_token:
+ yield cat(ch)
+ elif cat==Catcode.ignored:
+ continue
+ else:
+ assert cat==Catcode.escape, f"cannot create TokenList from string containing catcode {cat}"
+ cat=get_catcode(ord(s[i]))
+ if cat!=Catcode.letter:
+ yield ControlSequenceToken(s[i])
+ i+=1
+ else:
+ csname=s[i]
+ i+=1
+ while i<len(s) and get_catcode(ord(s[i]))==Catcode.letter:
+ csname+=s[i]
+ i+=1
+ yield ControlSequenceToken(csname)
+ # special case: remove spaces after control sequence but only if character code is space
+ if get_catcode(32) in (Catcode.space, Catcode.ignored):
+ while i<len(s) and s[i]==' ':
+ i+=1
+
+ @classmethod
+ def from_string(cls: Type[TokenListType], s: str, get_catcode: Callable[[int], Catcode])->TokenListType:
+ """
+ convert a string to a TokenList approximately.
+ The tokenization algorithm is slightly different from TeX's in the following respect:
+
+ * multiple spaces are collapsed to one space, but only if it has character code space (32).
+ * spaces with character code different from space (32) after a control sequence is not ignored.
+ * ^^ syntax are not supported. Use Python's escape syntax as usual.
+ """
+ return cls(TokenList.iterable_from_string(s, get_catcode))
+
+ @classmethod
+ def e3(cls: Type[TokenListType], s: str)->TokenListType:
+ """
+ approximate tokenizer in expl3 catcode, implemented in Python.
+ refer to documentation of from_string() for details.
+ """
+ return cls.from_string(s, lambda x: e3_catcode_table.get(x, Catcode.other))
+
+ @classmethod
+ def doc(cls: Type[TokenListType], s: str)->TokenListType:
+ """
+ approximate tokenizer in document catcode, implemented in Python.
+ refer to documentation of from_string() for details.
+ """
+ return cls.from_string(s, lambda x: doc_catcode_table.get(x, Catcode.other))
+
+ def serialize(self)->str:
+ return "".join(t.serialize() for t in self)
+
+ @classmethod
+ def deserialize(cls: Type[TokenListType], data: str)->TokenListType:
+ result: List[Token]=[]
+ i=0
+ cs_skip_space_count=0
+ while i<len(data):
+ if data[i]==">":
+ cs_skip_space_count+=1
+ i+=1
+ elif data[i]=="\\":
+ j=data.index(' ', i+1)
+ for __ in range(cs_skip_space_count):
+ j=data.index(' ', j+1)
+ cs_skip_space_count=0
+ result.append(ControlSequenceToken(data[i+1:j]))
+ i=j+1
+ elif data[i]=="R":
+ result.append(frozen_relax_token)
+ i+=1
+ else:
+ result.append(CharacterToken(index=ord(data[i+1]), catcode=Catcode(int(data[i], 16))))
+ i+=2
+ return cls(result)
+
+ def __repr__(self)->str:
+ return '<' + type(self).__name__ + ': ' + ' '.join(t.repr1() for t in self) + '>'
+
+ def execute(self)->None:
+ NTokenList(self).execute()
+
+ def expand_x(self)->"BalancedTokenList":
+ return NTokenList(self).expand_x()
+
+ def bool(self)->bool:
+ return NTokenList(self).bool()
+
+ def str(self)->str:
+ return NTokenList(self).str()
+
+
+
+@export_function_to_module
+class BalancedTokenList(TokenList):
+ """
+ Represents a balanced token list.
+ Note that runtime checking is not strictly enforced,
+ use `is_balanced()` method explicitly if you need to check.
+ """
+
+ def __init__(self, a: Iterable=())->None:
+ """
+ constructor. This must check for balanced-ness as balanced() method depends on this.
+ """
+ super().__init__(a)
+ self.check_balanced()
+
+ def expand_o(self)->"BalancedTokenList":
+ return BalancedTokenList(expand_o_(PTTBalancedTokenList(self))[0]) # type: ignore
+ def expand_x(self)->"BalancedTokenList":
+ return BalancedTokenList(expand_x_(PTTBalancedTokenList(self))[0]) # type: ignore
+ def execute(self)->None:
+ execute_(PTTBalancedTokenList(self))
+
+ def put_next(self)->None:
+ put_next_tokenlist(PTTBalancedTokenList(self))
+
+ @staticmethod
+ def get_next()->"BalancedTokenList":
+ """
+ get an (undelimited) argument from the TeX input stream.
+ """
+ return BalancedTokenList(get_argument_tokenlist_()[0]) # type: ignore
+
+
+
+if typing.TYPE_CHECKING:
+ NTokenListBaseClass = collections.UserList[NToken]
+else: # Python 3.8 compatibility
+ NTokenListBaseClass = collections.UserList
+
+@export_function_to_module
+class NTokenList(NTokenListBaseClass):
+ @staticmethod
+ def force_token_list(a: Iterable)->Iterable[NToken]:
+ for x in a:
+ if isinstance(x, NToken):
+ yield x
+ elif isinstance(x, Sequence):
+ yield bgroup
+ child=NTokenList(x)
+ assert child.is_balanced()
+ yield from child
+ yield egroup
+ else:
+ raise RuntimeError(f"Cannot make NTokenList from object {x} of type {type(x)}")
+
+ def __init__(self, a: Iterable=())->None:
+ super().__init__(NTokenList.force_token_list(a))
+
+ def is_balanced(self)->bool:
+ return TokenList(self).is_balanced() # a bit inefficient (need to construct a TokenList) but good enough
+
+ def simple_parts(self)->List[Union[BalancedTokenList, Token, BlueToken]]:
+ """
+ Split this NTokenList into a list of balanced non-blue parts, unbalanced {/} tokens, and blue tokens.
+ """
+ parts: List[Union[TokenList, BlueToken]]=[TokenList()]
+ for i in self:
+ if isinstance(i, BlueToken):
+ parts+=i, TokenList()
+ else:
+ assert isinstance(i, Token)
+ last_part=parts[-1]
+ assert isinstance(last_part, TokenList)
+ last_part.append(i)
+ result: List[Union[BalancedTokenList, Token, BlueToken]]=[]
+ for large_part in parts:
+ if isinstance(large_part, BlueToken):
+ result.append(large_part)
+ else:
+ result+=large_part.balanced_parts()
+ return result
+
+ def put_next(self)->None:
+ for part in reversed(self.simple_parts()): part.put_next()
+
+ def execute(self)->None:
+ """
+ Execute self.
+ """
+ parts=self.simple_parts()
+ if len(parts)==1:
+ x=parts[0]
+ if isinstance(x, BalancedTokenList):
+ x.execute()
+ return
+ NTokenList([*self, T.pythonimmediatecontinue, []]).put_next()
+ continue_until_passed_back()
+
+ def expand_x(self)->BalancedTokenList:
+ """
+ x-expand self. The result must be balanced.
+ """
+ NTokenList([T.edef, P.tmp, bgroup, *self, egroup]).execute()
+ return BalancedTokenList([P.tmp]).expand_o()
+
+ def str(self)->str:
+ """
+ self must represent a TeX string. (i.e. equal to itself when detokenized)
+ return the string content.
+ """
+ return "".join(t.str() for t in self)
+
+ def bool(self)->bool:
+ s=self.str()
+ return {"0": False, "1": True}[s]
+
+
+class TeXToPyData(ABC):
+ @staticmethod
+ @abstractmethod
+ def read()->"TeXToPyData":
+ ...
+ @staticmethod
+ @abstractmethod
+ def send_code(arg: str)->str:
+ pass
+ @staticmethod
+ @abstractmethod
+ def send_code_var(var: str)->str:
+ pass
+
+# tried and failed
+#@typing.runtime_checkable
+#class TeXToPyData(Protocol):
+# @staticmethod
+# def read()->"TeXToPyData":
+# ...
+#
+# #send_code: str
+#
+# #@staticmethod
+# #@property
+# #def send_code()->str:
+# # ...
+
+
+class TTPLine(TeXToPyData, str):
+ send_code=r"\immediate \write \__write_file {{\unexpanded{{ {} }}}}".format
+ send_code_var=r"\immediate \write \__write_file {{\unexpanded{{ {} }}}}".format
+ @staticmethod
+ def read()->"TTPLine":
+ return TTPLine(readline())
+
+# some old commands e.g. \$, \^, \_, \~ require \set@display@protect to be robust.
+# ~ needs to be redefined directly.
+mark_bootstrap(
+r"""
+\precattl_exec:n {
+ \cs_new_protected:Npn \__begingroup_setup_estr: {
+ \begingroup
+ \escapechar=-1~
+ \cC{set@display@protect}
+ \let \cA\~ \relax
+ }
+}
+""")
+
+class TTPELine(TeXToPyData, str):
+ """
+ Same as TTPEBlock, but for a single line only.
+ """
+ send_code=r"\__begingroup_setup_estr: \immediate \write \__write_file {{ {} }} \endgroup".format
+ send_code_var=r"\__begingroup_setup_estr: \immediate \write \__write_file {{ {} }} \endgroup".format
+ @staticmethod
+ def read()->"TTPELine":
+ return TTPELine(readline())
+
+class TTPEmbeddedLine(TeXToPyData, str):
+ @staticmethod
+ def send_code(self)->str:
+ raise RuntimeError("Must be manually handled")
+ @staticmethod
+ def send_code_var(self)->str:
+ raise RuntimeError("Must be manually handled")
+ @staticmethod
+ def read()->"TTPEmbeddedLine":
+ raise RuntimeError("Must be manually handled")
+
+class TTPBlock(TeXToPyData, str):
+ send_code=r"\__send_block:n {{ {} }}".format
+ send_code_var=r"\__send_block:V {}".format
+ @staticmethod
+ def read()->"TTPBlock":
+ return TTPBlock(read_block())
+
+class TTPEBlock(TeXToPyData, str):
+ """
+ A kind of argument that interprets "escaped string" and fully expand anything inside.
+ For example, {\\} sends a single backslash to Python, {\{} sends a single '{' to Python.
+ Done by fully expand the argument in \escapechar=-1 and convert it to a string.
+ Additional precaution is needed, see the note above.
+ """
+ send_code=r"\__begingroup_setup_estr: \__send_block:e {{ {} }} \endgroup".format
+ send_code_var=r"\__begingroup_setup_estr: \__send_block:e {} \endgroup".format
+ @staticmethod
+ def read()->"TTPEBlock":
+ return TTPEBlock(read_block())
+
+class TTPBalancedTokenList(TeXToPyData, BalancedTokenList):
+ send_code=r"\__tlserialize_nodot:Nn \__tmp {{ {} }} \immediate \write \__write_file {{\unexpanded\expandafter{{ \__tmp }}}}".format
+ send_code_var=r"\__tlserialize_nodot:NV \__tmp {} \immediate \write \__write_file {{\unexpanded\expandafter{{ \__tmp }}}}".format
+ @staticmethod
+ def read()->"TTPBalancedTokenList":
+ return TTPBalancedTokenList(BalancedTokenList.deserialize(readline()))
+
+
+class PyToTeXData(ABC):
+ @staticmethod
+ @abstractmethod
+ def read_code(var: str)->str:
+ ...
+ @abstractmethod
+ def write(self)->None:
+ ...
+
+@dataclass
+class PTTVerbatimLine(PyToTeXData):
+ """
+ Represents a line to be tokenized verbatim. Internally the |\readline| primitive is used, as such, any trailing spaces are stripped.
+ The trailing newline is not included, i.e. it's read under |\endlinechar=-1|.
+ """
+ data: str
+ read_code=r"\ior_str_get:NN \__read_file {} ".format
+ def write(self)->None:
+ assert "\n" not in self.data
+ assert self.data.rstrip()==self.data, "Cannot send verbatim line with trailing spaces!"
+ send_raw(self.data+"\n")
+
+@dataclass
+class PTTInt(PyToTeXData):
+ data: int
+ read_code=PTTVerbatimLine.read_code
+ def write(self)->None:
+ PTTVerbatimLine(str(self.data)).write()
+
+@dataclass
+class PTTTeXLine(PyToTeXData):
+ """
+ Represents a line to be tokenized in \TeX's current catcode regime.
+ The trailing newline is not included, i.e. it's tokenized under |\endlinechar=-1|.
+ """
+ data: str
+ read_code=r"\ior_get:NN \__read_file {} ".format
+ def write(self)->None:
+ assert "\n" not in self.data
+ send_raw(self.data+"\n")
+
+@dataclass
+class PTTBlock(PyToTeXData):
+ data: str
+ read_code=r"\__read_block:N {}".format
+ def write(self)->None:
+ send_raw(surround_delimiter(self.data))
+
+@dataclass
+class PTTBalancedTokenList(PyToTeXData):
+ data: BalancedTokenList
+ read_code=r"\ior_str_get:NN \__read_file {0} \__tldeserialize_dot:NV {0} {0}".format
+ def write(self)->None:
+ PTTVerbatimLine(self.data.serialize()+".").write()
+
+
+# ======== define TeX functions that execute Python code ========
+# ======== implementation of |\py| etc. Doesn't support verbatim argument yet. ========
+
+import itertools
+import string
+
+def random_identifiers()->Iterator[str]: # do this to avoid TeX hash collision while keeping the length short
+ for len_ in itertools.count(0):
+ for value in range(1<<len_):
+ for initial in string.ascii_letters:
+ yield initial + f"{value:0{len_}b}".translate({ord("0"): "a", ord("1"): "b"})
+
+random_identifier_iterable=random_identifiers()
+
+def get_random_identifier()->str:
+ return next(random_identifier_iterable)
+
+
+def define_TeX_call_Python(f: Callable[..., None], name: Optional[str]=None, argtypes: Optional[List[Type[TeXToPyData]]]=None, identifier: Optional[str]=None)->str:
+ """
+ This function setups some internal data structure, and
+ returns the \TeX\ code to be executed on the \TeX\ side to define the macro.
+
+ f: the Python function to be executed.
+ It should take some arguments and eventually (optionally) call one of the |_finish| functions.
+
+ name: the macro name on the \TeX\ side. This should only consist of letter characters in |expl3| catcode regime.
+
+ argtypes: list of argument types. If it's None it will be automatically deduced from the function |f|'s signature.
+
+ Returns: some code (to be executed in |expl3| catcode regime) as explained above.
+ """
+ if argtypes is None: argtypes=[p.annotation for p in inspect.signature(f).parameters.values()]
+ if name is None: name=f.__name__
+
+ if identifier is None: identifier=get_random_identifier()
+ assert identifier not in TeX_handlers
+
+ @functools.wraps(f)
+ def g()->None:
+ assert argtypes is not None
+ args=[argtype.read() for argtype in argtypes]
+
+
+ global action_done
+ old_action_done=action_done
+
+ action_done=False
+ try:
+ f(*args)
+ except:
+ if action_done:
+ # error occurred after 'finish' is called, cannot signal the error to TeX, will just ignore (after printing out the traceback)...
+ pass
+ else:
+ # TODO what should be done here? What if the error raised below is caught
+ action_done=True
+ raise
+ finally:
+ if not action_done:
+ run_none_finish()
+
+ action_done=old_action_done
+
+
+ TeX_handlers[identifier]=g
+
+ TeX_argspec = ""
+ TeX_send_input_commands = ""
+ for i, argtype in enumerate(argtypes):
+ if isinstance(argtype, str):
+ raise RuntimeError("string annotation or `from __future__ import annotations' not yet supported")
+ if not issubclass(argtype, TeXToPyData):
+ raise RuntimeError(f"Argument type {argtype} is incorrect, should be a subclass of TeXToPyData")
+ arg = f"#{i+1}"
+ TeX_send_input_commands += argtype.send_code(arg)
+ TeX_argspec += arg
+
+ return """
+ \\cs_new_protected:Npn \\""" + name + TeX_argspec + """ {
+ \immediate \write \__write_file { i """ + identifier + """ }
+ """ + TeX_send_input_commands + """
+ \__read_do_one_command:
+ }
+ """
+
+
+def define_internal_handler(f: Callable)->Callable:
+ mark_bootstrap(define_TeX_call_Python(f))
+ return f
+
+
+import linecache
+
+# https://stackoverflow.com/questions/47183305/file-string-traceback-with-line-preview
+def exec_or_eval_with_linecache(code: str, globals: dict, mode: str)->Any:
+ sourcename: str="<usercode>"
+ i=0
+ while sourcename in linecache.cache:
+ sourcename="<usercode" + str(i) + ">"
+ i+=1
+
+ lines=code.splitlines(keepends=True)
+ linecache.cache[sourcename] = len(code), None, lines, sourcename
+
+ compiled_code=compile(code, sourcename, mode)
+ return (exec if mode=="exec" else eval)(compiled_code, globals)
+
+ #del linecache.cache[sourcename]
+ # we never delete the cache, in case some function is defined here then later are called...
+
+def exec_with_linecache(code: str, globals: Dict[str, Any])->None:
+ exec_or_eval_with_linecache(code, globals, "exec")
+
+def eval_with_linecache(code: str, globals: Dict[str, Any])->Any:
+ return exec_or_eval_with_linecache(code, globals, "eval")
+
+
+@define_internal_handler
+def py(code: TTPEBlock)->None:
+ pythonimmediate.run_block_finish(str(eval_with_linecache(code, user_scope))+"%")
+
+@define_internal_handler
+def pyfile(filename: TTPELine)->None:
+ with open(filename, "r") as f:
+ source=f.read()
+ exec(compile(source, filename, "exec"), user_scope)
+
+def print_TeX(*args, **kwargs)->None:
+ if not hasattr(pythonimmediate, "file"):
+ raise RuntimeError("Internal error: attempt to print to TeX outside any environment!")
+ if pythonimmediate.file is not None:
+ functools.partial(print, file=pythonimmediate.file)(*args, **kwargs) # allow user to override `file` kwarg
+pythonimmediate.print=print_TeX
+
+class RedirectPrintTeX:
+ def __init__(self, t)->None:
+ self.t=t
+
+ def __enter__(self)->None:
+ if hasattr(pythonimmediate, "file"):
+ self.old=pythonimmediate.file
+ pythonimmediate.file=self.t
+
+ def __exit__(self, exc_type, exc_value, tb)->None:
+ if hasattr(self, "old"):
+ pythonimmediate.file=self.old
+ else:
+ del pythonimmediate.file
+
+def run_code_redirect_print_TeX(f: Callable[[], Any])->None:
+ with io.StringIO() as t:
+ with RedirectPrintTeX(t):
+ result=f()
+ if result is not None:
+ t.write(str(result)+"%")
+ content=t.getvalue()
+ if content.endswith("\n"):
+ content=content[:-1]
+ else:
+ #content+=r"\empty" # this works too
+ content+="%"
+ pythonimmediate.run_block_finish(content)
+
+@define_internal_handler
+def pyc(code: TTPEBlock)->None:
+ run_code_redirect_print_TeX(lambda: exec_with_linecache(code, user_scope))
+
+@define_internal_handler
+def pycq(code: TTPEBlock)->None:
+ with RedirectPrintTeX(None):
+ exec_with_linecache(code, user_scope)
+ run_none_finish()
+
+mark_bootstrap(
+r"""
+\NewDocumentCommand\pyv{v}{\py{#1}}
+\NewDocumentCommand\pycv{v}{\pyc{#1}}
+""")
+
+# ======== implementation of |pycode| environment
+mark_bootstrap(
+r"""
+\NewDocumentEnvironment{pycode}{}{
+ \saveenvreinsert \__code {
+ \exp_last_unbraced:Nx \__pycodex {{\__code} {\the\inputlineno} {
+ \ifdefined\currfilename \currfilename \fi
+ } {
+ \ifdefined\currfileabspath \currfileabspath \fi
+ }}
+ }
+}{
+ \endsaveenvreinsert
+}
+""")
+
+def normalize_lines(lines: List[str])->List[str]:
+ return [line.rstrip() for line in lines]
+
+@define_internal_handler
+def __pycodex(code: TTPBlock, lineno_: TTPLine, filename: TTPLine, fileabspath: TTPLine)->None:
+ if not code: return
+
+ lineno=int(lineno_)
+ # find where the code comes from... (for easy meaningful traceback)
+ target_filename: Optional[str] = None
+
+ code_lines_normalized=normalize_lines(code.splitlines(keepends=True))
+
+ for f in (fileabspath, filename):
+ if not f: continue
+ p=Path(f)
+ if not p.is_file(): continue
+ file_lines=p.read_text().splitlines(keepends=True)[lineno-len(code_lines_normalized)-1:lineno-1]
+ if normalize_lines(file_lines)==code_lines_normalized:
+ target_filename=f
+ break
+
+ if not target_filename:
+ raise RuntimeError("Source file not found! (attempted {})".format((fileabspath, filename)))
+
+ with io.StringIO() as t:
+ with RedirectPrintTeX(t):
+ if target_filename:
+ code_=''.join(file_lines) # restore missing trailing spaces
+ code_="\n"*(lineno-len(code_lines_normalized)-1)+code_
+ if target_filename:
+ compiled_code=compile(code_, target_filename, "exec")
+ exec(compiled_code, user_scope)
+ else:
+ exec(code_, user_scope)
+ pythonimmediate.run_block_finish(t.getvalue())
+
+# ======== Python-call-TeX functions
+# ======== additional functions...
+
+user_documentation(
+r"""
+These functions get an argument in the input stream and returns it detokenized.
+
+Which means, for example, |#| are doubled, multiple spaces might be collapsed into one, spaces might be introduced
+after a control sequence.
+
+It's undefined behavior if the message's "string representation" contains a "newline character".
+""")
+
+def template_substitute(template: str, pattern: str, substitute: Union[str, Callable[[re.Match], str]], optional: bool=False)->str:
+ """
+ pattern is a regex
+ """
+ if not optional:
+ #assert template.count(pattern)==1
+ assert len(re.findall(pattern, template))==1
+ return re.sub(pattern, substitute, template)
+
+#typing.TypeVarTuple(PyToTeXData)
+
+#PythonCallTeXFunctionType=Callable[[PyToTeXData], Optional[Tuple[TeXToPyData, ...]]]
+
+class PythonCallTeXFunctionType(Protocol): # https://stackoverflow.com/questions/57658879/python-type-hint-for-callable-with-variable-number-of-str-same-type-arguments
+ def __call__(self, *args: PyToTeXData)->Optional[Tuple[TeXToPyData, ...]]: ...
+
+class PythonCallTeXSyncFunctionType(PythonCallTeXFunctionType, Protocol): # https://stackoverflow.com/questions/57658879/python-type-hint-for-callable-with-variable-number-of-str-same-type-arguments
+ def __call__(self, *args: PyToTeXData)->Tuple[TeXToPyData, ...]: ...
+
+
+@dataclass(frozen=True)
+class Python_call_TeX_data:
+ TeX_code: str
+ recursive: bool
+ finish: bool
+ sync: Optional[bool]
+
+@dataclass(frozen=True)
+class Python_call_TeX_extra:
+ ptt_argtypes: Tuple[Type[PyToTeXData], ...]
+ ttp_argtypes: Union[Type[TeXToPyData], Tuple[Type[TeXToPyData], ...]]
+
+Python_call_TeX_defined: Dict[Python_call_TeX_data, Tuple[Python_call_TeX_extra, Callable]]={}
+
+def Python_call_TeX_local(TeX_code: str, *, recursive: bool=True, sync: Optional[bool]=None, finish: bool=False)->Callable:
+ data=Python_call_TeX_data(
+ TeX_code=TeX_code, recursive=recursive, sync=sync, finish=finish
+ )
+ return Python_call_TeX_defined[data][1]
+
+def build_Python_call_TeX(T: Type, TeX_code: str, *, recursive: bool=True, sync: Optional[bool]=None, finish: bool=False)->None:
+ assert T.__origin__ == typing.Callable[[], None].__origin__ # type: ignore
+ # might be typing.Callable or collections.abc.Callable depends on Python version
+ data=Python_call_TeX_data(
+ TeX_code=TeX_code, recursive=recursive, sync=sync, finish=finish
+ )
+
+ tmp: Any = T.__args__[-1]
+ ttp_argtypes: Union[Type[TeXToPyData], Tuple[Type[TeXToPyData], ...]]
+ if tmp is type(None):
+ ttp_argtypes = ()
+ elif isinstance(tmp, type) and issubclass(tmp, TeXToPyData):
+ # special case, return a single object instead of a tuple of length 1
+ ttp_argtypes = tmp
+ else:
+ ttp_argtypes = tmp.__args__ # type: ignore
+
+ extra=Python_call_TeX_extra(
+ ptt_argtypes=T.__args__[:-1],
+ ttp_argtypes=ttp_argtypes
+ ) # type: ignore
+ if data in Python_call_TeX_defined:
+ assert Python_call_TeX_defined[data][0]==extra
+ else:
+ if isinstance(ttp_argtypes, type) and issubclass(ttp_argtypes, TeXToPyData):
+ # special case, return a single object instead of a tuple of length 1
+ code, result1=define_Python_call_TeX(TeX_code=TeX_code, ptt_argtypes=[*extra.ptt_argtypes], ttp_argtypes=[ttp_argtypes],
+ recursive=recursive, sync=sync, finish=finish,
+ )
+ def result(*args):
+ [tmp]=result1(*args)
+ return tmp
+ else:
+ code, result=define_Python_call_TeX(TeX_code=TeX_code, ptt_argtypes=[*extra.ptt_argtypes], ttp_argtypes=[*ttp_argtypes],
+ recursive=recursive, sync=sync, finish=finish,
+ )
+ mark_bootstrap(code)
+ Python_call_TeX_defined[data]=extra, result
+
+def scan_Python_call_TeX(filename: str)->None:
+ """
+ scan the file in filename for occurrences of typing.cast(T, Python_call_TeX_local(...)), then call build_Python_call_TeX(T, ...) for each occurrence.
+
+ Don't use on untrusted code.
+ """
+ import ast
+ from copy import deepcopy
+ for node in ast.walk(ast.parse(Path(filename).read_text(), mode="exec")):
+ try:
+ if isinstance(node, ast.Call):
+ if (
+ isinstance(node.func, ast.Attribute) and
+ isinstance(node.func.value, ast.Name) and
+ node.func.value.id == "typing" and
+ node.func.attr == "cast"
+ ):
+ T = node.args[0]
+ if isinstance(node.args[1], ast.Call):
+ f_call = node.args[1]
+ if isinstance(f_call.func, ast.Name):
+ if f_call.func.id == "Python_call_TeX_local":
+ f_call=deepcopy(f_call)
+ assert isinstance(f_call.func, ast.Name)
+ f_call.func.id="build_Python_call_TeX"
+ f_call.args=[T]+f_call.args
+ eval(compile(ast.Expression(body=f_call), "<string>", "eval"))
+ except:
+ print("======== error on line", node.lineno, "========", file=sys.stderr)
+ raise
+
+def define_Python_call_TeX(TeX_code: str, ptt_argtypes: List[Type[PyToTeXData]], ttp_argtypes: List[Type[TeXToPyData]],
+ *,
+ recursive: bool=True,
+ sync: Optional[bool]=None,
+ finish: bool=False,
+ )->Tuple[str, PythonCallTeXFunctionType]:
+ r"""
+ |TeX_code| should be some expl3 code that defines a function with name |%name%| that when called should:
+ * run some \TeX\ code (which includes reading the arguments, if any)
+ * do the following if |sync|:
+ * send |r| to Python (equivalently write %sync%)
+ * send whatever needed for the output (as in |ttp_argtypes|)
+ * call |\__read_do_one_command:| iff not |finish|.
+
+ This is allowed to contain the following:
+ * %name%: the name of the function to be defined as explained above.
+ * %read_arg0(\var_name)%, %read_arg1(...)%: will be expanded to code that reads the input.
+ * %send_arg0(...)%, %send_arg1(...)%: will be expanded to code that sends the content.
+ * %send_arg0_var(\var_name)%, %send_arg1_var(...)%: will be expanded to code that sends the content in the variable.
+ * %optional_sync%: expanded to code that writes |r| (to sync), if |sync| is True.
+
+ ptt_argtypes: list of argument types to be sent from Python to TeX (i.e. input of the TeX function)
+
+ ttp_argtypes: list of argument types to be sent from TeX to Python (i.e. output of the TeX function)
+
+ recursive: whether the TeX_code might call another Python function. Default to True.
+ It does not hurt to always specify True, but performance would be a bit slower.
+
+ sync: whether the Python function need to wait for the TeX function to finish.
+ Required if |ttp_argtypes| is not empty.
+ This should be left to be the default None most of the time. (which will make it always sync if |debugging|,
+ otherwise only sync if needed i.e. there's some output)
+
+ finish: Include this if and only if |\__read_do_one_command:| is omitted.
+ Normally this is not needed, but it can be used as a slight optimization; and it's needed internally to implement
+ |run_none_finish| among others.
+ For each TeX-call-Python layer, \emph{exactly one} |finish| call can be made. If the function itself doesn't call
+ any |finish| call (which happens most of the time), then the wrapper will call |run_none_finish|.
+
+ Return some TeX code to be executed, and a Python function object that when called will call the TeX function
+ and return the result.
+
+ Possible optimizations:
+ * the |r| is not needed if not recursive and |ttp_argtypes| is nonempty
+ (the output itself tells Python when the \TeX\ code finished)
+ * the first line of the output may be on the same line as the |r| itself (done, use TTPEmbeddedLine type, although a bit hacky)
+ """
+ if ttp_argtypes!=[]:
+ assert sync!=False
+ sync=True
+
+ if sync is None:
+ sync=pythonimmediate.debugging
+
+ TeX_code=template_substitute(TeX_code, "%optional_sync%",
+ lambda _: r'\immediate\write\__write_file { r }' if sync else '',)
+
+ TeX_code=template_substitute(TeX_code, "%sync%",
+ lambda _: r'\immediate\write\__write_file { r }' if sync else '', optional=True)
+
+ assert sync is not None
+ if ttp_argtypes: assert sync
+ assert ttp_argtypes.count(TTPEmbeddedLine)<=1
+ identifier=get_random_identifier() # TODO to be fair it isn't necessary to make the identifier both ways distinct, can reuse
+
+ TeX_code=template_substitute(TeX_code, "%name%", lambda _: r"\__run_" + identifier + ":")
+
+ for i, argtype_ in enumerate(ptt_argtypes):
+ TeX_code=template_substitute(TeX_code, r"%read_arg" + str(i) + r"\(([^)]*)\)%",
+ lambda match: argtype_.read_code(match[1]),
+ optional=True)
+
+ for i, argtype in enumerate(ttp_argtypes):
+ TeX_code=template_substitute(TeX_code, f"%send_arg{i}" + r"\(([^)]*)\)%",
+ lambda match: argtype.send_code(match[1]),
+ optional=True)
+ TeX_code=template_substitute(TeX_code, f"%send_arg{i}_var" + r"\(([^)]*)\)%",
+ lambda match: argtype.send_code_var(match[1]),
+ optional=True)
+
+ def f(*args)->Optional[Tuple[TeXToPyData, ...]]:
+ assert len(args)==len(ptt_argtypes)
+
+ # send function header
+ check_not_finished()
+ if finish:
+ global action_done
+ action_done=True
+ send_raw(identifier+"\n")
+
+ # send function args
+ for arg, argtype in zip(args, ptt_argtypes):
+ assert isinstance(arg, argtype)
+ arg.write()
+
+ if not sync: return None
+
+ # wait for the result
+ if recursive:
+ result_=run_main_loop()
+ else:
+ result_=run_main_loop_get_return_one()
+
+ result: List[TeXToPyData]=[]
+ if TTPEmbeddedLine not in ttp_argtypes:
+ assert not result_
+ for argtype_ in ttp_argtypes:
+ if argtype_==TTPEmbeddedLine:
+ result.append(TTPEmbeddedLine(result_))
+ else:
+ result.append(argtype_.read())
+ return tuple(result)
+
+ return TeX_code, f
+
+scan_Python_call_TeX(__file__)
+
+def define_Python_call_TeX_local(*args, **kwargs)->PythonCallTeXFunctionType:
+ """
+ used to define "local" handlers i.e. used by this library.
+ The code will be included in mark_bootstrap().
+ """
+ code, result=define_Python_call_TeX(*args, **kwargs)
+ mark_bootstrap(code)
+ return result
+
+# essentially this is the same as the above, but just that the return type is guaranteed to be not None to satisfy type checkers
+def define_Python_call_TeX_local_sync(*args, **kwargs)->PythonCallTeXSyncFunctionType:
+ return define_Python_call_TeX_local(*args, **kwargs, sync=True) # type: ignore
+
+run_none_finish=define_Python_call_TeX_local(
+r"""
+\cs_new_eq:NN %name% \relax
+""", [], [], finish=True, sync=False)
+
+
+"""
+|run_error_finish| is fatal to TeX, so we only run it when it's fatal to Python.
+
+We want to make sure the Python traceback is printed strictly before run_error_finish() is called,
+so that the Python traceback is not interleaved with TeX error messages.
+"""
+run_error_finish=define_Python_call_TeX_local(
+r"""
+\msg_new:nnn {pythonimmediate} {python-error} {Python~error.}
+\cs_new_protected:Npn %name% {
+ %read_arg0(\__data)%
+ \wlog{^^JPython~error~traceback:^^J\__data^^J}
+ \msg_error:nn {pythonimmediate} {python-error}
+}
+""", [PTTBlock], [], finish=True, sync=False)
+
+
+put_next_blue=define_Python_call_TeX_local(
+r"""
+\cs_new_protected:Npn \__put_next_blue_tmp {
+ %optional_sync%
+ \expandafter \__read_do_one_command: \noexpand
+}
+\cs_new_protected:Npn %name% {
+ %read_arg0(\__target)%
+ \expandafter \__put_next_blue_tmp \__target
+}
+"""
+ , [PTTBalancedTokenList], [], recursive=False)
+
+
+put_next_tokenlist=define_Python_call_TeX_local(
+r"""
+\cs_new_protected:Npn \__put_next_tmp {
+ %optional_sync%
+ \__read_do_one_command:
+}
+\cs_new_protected:Npn %name% {
+ %read_arg0(\__target)%
+ \expandafter \__put_next_tmp \__target
+}
+"""
+ , [PTTBalancedTokenList], [], recursive=False)
+
+get_next_=define_Python_call_TeX_local_sync(
+r"""
+\cs_new_protected:Npn %name% {
+ \peek_analysis_map_inline:n {
+ \peek_analysis_map_break:n {
+ \__tlserialize_char_unchecked:nnNN {##1}{##2}##3 \pythonimmediatecontinue
+ }
+ }
+}
+""", [], [TTPEmbeddedLine], recursive=False)
+
+put_next_bgroup=define_Python_call_TeX_local_sync(
+r"""
+\cs_new_protected:Npn %name% {
+ %read_arg0(\__index)%
+ \expandafter \expandafter \expandafter \pythonimmediatecontinuenoarg
+ \char_generate:nn {\__index} {1}
+}
+""", [PTTInt], [], recursive=False)
+
+put_next_egroup=define_Python_call_TeX_local_sync(
+r"""
+\cs_new_protected:Npn %name% {
+ %read_arg0(\__index)%
+ \expandafter \expandafter \expandafter \pythonimmediatecontinuenoarg
+ \char_generate:nn {\__index} {2}
+}
+""", [PTTInt], [], recursive=False)
+
+
+get_argument_tokenlist_=define_Python_call_TeX_local_sync(
+r"""
+\cs_new_protected:Npn %name% #1 {
+ %sync%
+ %send_arg0(#1)%
+ \__read_do_one_command:
+}
+""", [], [TTPBalancedTokenList], recursive=False)
+
+
+run_tokenized_line_local_=define_Python_call_TeX_local(
+r"""
+\cs_new_protected:Npn %name% {
+ %read_arg0(\__data)%
+ \__data
+ %optional_sync%
+ \__read_do_one_command:
+}
+""", [PTTTeXLine], [])
+
+@export_function_to_module
+def run_tokenized_line_local(line: str, *, check_braces: bool=True, check_newline: bool=True, check_continue: bool=True)->None:
+ check_line(line, braces=check_braces, newline=check_newline, continue_=(False if check_continue else None))
+ run_tokenized_line_local_(PTTTeXLine(line))
+
+
+
+@export_function_to_module
+def run_tokenized_line_peek(line: str, *, check_braces: bool=True, check_newline: bool=True, check_continue: bool=True)->str:
+ check_line(line, braces=check_braces, newline=check_newline, continue_=(True if check_continue else None))
+ return typing.cast(
+ Callable[[PTTTeXLine], Tuple[TTPEmbeddedLine]],
+ Python_call_TeX_local(
+ r"""
+ \cs_new_protected:Npn %name% {
+ %read_arg0(\__data)%
+ \__data
+ }
+ """)
+ )(PTTTeXLine(line))[0]
+
+
+run_block_local_=define_Python_call_TeX_local(
+r"""
+\cs_new_protected:Npn %name% {
+ %read_arg0(\__data)%
+ \begingroup \newlinechar=10~ \expandafter \endgroup
+ \scantokens \expandafter{\__data}
+ % trick described in https://tex.stackexchange.com/q/640274 to scantokens the code with \newlinechar=10
+
+ %optional_sync%
+ \__read_do_one_command:
+}
+""", [PTTBlock], [])
+
+@export_function_to_module
+def run_block_local(block: str)->None:
+ run_block_local_(PTTBlock(block))
+
+expand_o_=define_Python_call_TeX_local_sync(
+r"""
+\cs_new_protected:Npn %name% {
+ %read_arg0(\__data)%
+ \exp_args:NNV \tl_set:No \__data \__data
+ %sync%
+ %send_arg0_var(\__data)%
+ \__read_do_one_command:
+}
+""", [PTTBalancedTokenList], [TTPBalancedTokenList], recursive=expansion_only_can_call_Python)
+
+expand_x_=define_Python_call_TeX_local_sync(
+r"""
+\cs_new_protected:Npn %name% {
+ %read_arg0(\__data)%
+ \tl_set:Nx \__data {\__data}
+ %sync%
+ %send_arg0_var(\__data)%
+ \__read_do_one_command:
+}
+""", [PTTBalancedTokenList], [TTPBalancedTokenList], recursive=expansion_only_can_call_Python)
+
+execute_=define_Python_call_TeX_local(
+r"""
+\cs_new_protected:Npn %name% {
+ %read_arg0(\__data)%
+ \__data
+ %optional_sync%
+ \__read_do_one_command:
+}
+""", [PTTBalancedTokenList], [])
+
+futurelet_=define_Python_call_TeX_local_sync(
+r"""
+\cs_new_protected:Npn %name% {
+ %read_arg0(\__data)%
+ \expandafter \futurelet \__data \pythonimmediatecontinuenoarg
+}
+""", [PTTBalancedTokenList], [])
+
+futureletnext_=define_Python_call_TeX_local_sync(
+r"""
+\cs_new_protected:Npn %name% {
+ %read_arg0(\__data)%
+ \afterassignment \pythonimmediatecontinuenoarg \expandafter \futurelet \__data
+}
+""", [PTTBalancedTokenList], [])
+
+continue_until_passed_back_=define_Python_call_TeX_local_sync(
+r"""
+\cs_new_eq:NN %name% \relax
+""", [], [TTPEmbeddedLine])
+
+@export_function_to_module
+def continue_until_passed_back_str()->str:
+ """
+ Usage:
+
+ First put some tokens in the input stream that includes |\pythonimmediatecontinue{...}|
+ (or |%sync% \__read_do_one_command:|), then call |continue_until_passed_back()|.
+
+ The function will only return when the |\pythonimmediatecontinue| is called.
+ """
+ return str(continue_until_passed_back_()[0])
+
+@export_function_to_module
+def continue_until_passed_back()->None:
+ """
+ Same as |continue_until_passed_back_str()| but nothing can be returned from TeX to Python.
+ """
+ result=continue_until_passed_back_str()
+ assert not result
+
+
+@export_function_to_module
+def expand_once()->None:
+ typing.cast(Callable[[], None], Python_call_TeX_local(
+ r"""
+ \cs_new_protected:Npn %name% { \expandafter \pythonimmediatecontinuenoarg }
+ """, recursive=False, sync=True))()
+
+
+@export_function_to_module
+@user_documentation
+def get_arg_str()->str:
+ """
+ Get a mandatory argument.
+ """
+ return typing.cast(Callable[[], TTPEmbeddedLine], Python_call_TeX_local(
+ r"""
+ \cs_new_protected:Npn %name% #1 {
+ \immediate\write\__write_file { \unexpanded {
+ r #1
+ }}
+ \__read_do_one_command:
+ }
+ """, recursive=False))()
+
+get_arg_estr_=define_Python_call_TeX_local_sync(
+r"""
+\cs_new_protected:Npn %name% #1 {
+ %sync%
+ %send_arg0(#1)%
+ \__read_do_one_command:
+}
+""", [], [TTPEBlock], recursive=False)
+@export_function_to_module
+@user_documentation
+def get_arg_estr()->str:
+ return str(get_arg_estr_()[0])
+
+
+get_optional_argument_detokenized_=define_Python_call_TeX_local_sync(
+r"""
+\NewDocumentCommand %name% {o} {
+ \immediate\write \__write_file {
+ r ^^J
+ \IfNoValueTF {#1} {
+ 0
+ } {
+ \unexpanded{1 #1}
+ }
+ }
+ \__read_do_one_command:
+}
+""", [], [TTPLine], recursive=False)
+@export_function_to_module
+@user_documentation
+def get_optional_arg_str()->Optional[str]:
+ """
+ Get an optional argument.
+ """
+ [result]=get_optional_argument_detokenized_()
+ result_=str(result)
+ if result_=="0": return None
+ assert result_[0]=="1", result_
+ return result_[1:]
+
+
+get_optional_arg_estr_=define_Python_call_TeX_local_sync(
+r"""
+\NewDocumentCommand %name% {o} {
+ %sync%
+ \IfNoValueTF {#1} {
+ %send_arg0(0)%
+ } {
+ %send_arg0(1 #1)%
+ }
+ \__read_do_one_command:
+}
+""", [], [TTPEBlock], recursive=False)
+
+@export_function_to_module
+@user_documentation
+def get_optional_arg_estr()->Optional[str]:
+ [result]=get_optional_arg_estr_()
+ result_=str(result)
+ if result_=="0": return None
+ assert result_[0]=="1", result_
+ return result_[1:]
+
+
+get_verbatim_argument_=define_Python_call_TeX_local_sync(
+r"""
+\NewDocumentCommand %name% {v} {
+ \immediate\write\__write_file { \unexpanded {
+ r ^^J
+ #1
+ }}
+ \__read_do_one_command:
+}
+""", [], [TTPLine], recursive=False)
+@export_function_to_module
+@user_documentation
+def get_verb_arg()->str:
+ """
+ Get a verbatim argument. Since it's verbatim, there's no worry of |#| being doubled,
+ but it can only be used at top level.
+ """
+ return str(get_verbatim_argument_()[0])
+
+get_multiline_verbatim_argument_=define_Python_call_TeX_local_sync(
+r"""
+\NewDocumentCommand %name% {+v} {
+ \immediate\write\__write_file { r }
+ \begingroup
+ \newlinechar=13~ % this is what +v argument type in xparse uses
+ \__send_block:n { #1 }
+ \endgroup
+ \__read_do_one_command:
+}
+""", [], [TTPBlock], recursive=False)
+@export_function_to_module
+@user_documentation
+def get_multiline_verb_arg()->str:
+ """
+ Get a multi-line verbatim argument.
+ """
+ return str(get_multiline_verbatim_argument_()[0])
+
+newcommand2=define_Python_call_TeX_local(
+r"""
+\cs_new_protected:Npn %name% {
+ \begingroup
+ \endlinechar=-1~
+ %read_arg0(\__line)%
+ %read_arg1(\__identifier)%
+ \cs_new_protected:cpx {\__line} {
+ \unexpanded{\immediate\write \__write_file} { i \__identifier }
+ \unexpanded{\__read_do_one_command:}
+ }
+ \endgroup
+ %optional_sync%
+ \__read_do_one_command:
+}
+""", [PTTVerbatimLine, PTTVerbatimLine], [], recursive=False)
+
+renewcommand2=define_Python_call_TeX_local(
+r"""
+\cs_new_protected:Npn %name% {
+ \begingroup
+ \endlinechar=-1~
+ \readline \__read_file to \__line
+ \readline \__read_file to \__identifier
+ \exp_args:Ncx \renewcommand {\__line} {
+ \unexpanded{\immediate\write \__write_file} { i \__identifier }
+ \unexpanded{\__read_do_one_command:}
+ }
+ \exp_args:Nc \MakeRobust {\__line} % also make the command global
+ \endgroup
+ %optional_sync%
+ \__read_do_one_command:
+}
+""", [PTTVerbatimLine, PTTVerbatimLine], [], recursive=False)
+
+def check_function_name(name: str)->None:
+ if not re.fullmatch("[A-Za-z]+", name) or (len(name)==1 and ord(name)<=0x7f):
+ raise RuntimeError("Invalid function name: "+name)
+
+def newcommand_(name: str, f: Callable)->Callable:
+ identifier=get_random_identifier()
+
+ newcommand2(PTTVerbatimLine(name), PTTVerbatimLine(identifier))
+
+ _code=define_TeX_call_Python(
+ lambda: run_code_redirect_print_TeX(f),
+ name, argtypes=[], identifier=identifier)
+ # ignore _code, already executed something equivalent in the TeX command
+ return f
+
+def renewcommand_(name: str, f: Callable)->Callable:
+ identifier=get_random_identifier()
+
+ renewcommand2(PTTVerbatimLine(name), PTTVerbatimLine(identifier))
+ # TODO remove the redundant entry from TeX_handlers (although technically is not very necessary, just cause slight memory leak)
+ #try: del TeX_handlers["u"+name]
+ #except KeyError: pass
+
+ _code=define_TeX_call_Python(
+ lambda: run_code_redirect_print_TeX(f),
+ name, argtypes=[], identifier=identifier)
+ # ignore _code, already executed something equivalent in the TeX command
+ return f
+
+
+
+@export_function_to_module
+def newcommand(x: Union[str, Callable, None]=None, f: Optional[Callable]=None)->Callable:
+ """
+ Define a new \TeX\ command.
+ If name is not provided, it's automatically deduced from the function.
+ """
+ if f is not None: return newcommand(x)(f)
+ if x is None: return newcommand # weird design but okay (allow |@newcommand()| as well as |@newcommand|)
+ if isinstance(x, str): return functools.partial(newcommand_, x)
+ return newcommand_(x.__name__, x)
+
+@export_function_to_module
+def renewcommand(x: Union[str, Callable, None]=None, f: Optional[Callable]=None)->Callable:
+ """
+ Redefine a \TeX\ command.
+ If name is not provided, it's automatically deduced from the function.
+ """
+ if f is not None: return newcommand(x)(f)
+ if x is None: return newcommand # weird design but okay (allow |@newcommand()| as well as |@newcommand|)
+ if isinstance(x, str): return functools.partial(renewcommand_, x)
+ return renewcommand_(x.__name__, x)
+
+
+# ========
+
+put_next_TeX_line=define_Python_call_TeX_local(
+r"""
+\cs_new_protected:Npn \__put_next_tmpa {
+ %optional_sync%
+ \__read_do_one_command:
+}
+\cs_new_protected:Npn %name% {
+ %read_arg0(\__target)%
+ \expandafter \__put_next_tmpa \__target
+}
+"""
+ , [PTTTeXLine], [], recursive=False)
+
+@export_function_to_module
+@user_documentation
+def put_next(arg: Union[str, Token, BalancedTokenList])->None:
+ """
+ Put some content forward in the input stream.
+
+ arg: has type |str| (will be tokenized in the current catcode regime, must be a single line),
+ or |BalancedTokenList|.
+ """
+ if isinstance(arg, str): put_next_TeX_line(PTTTeXLine(arg))
+ else: arg.put_next()
+
+
+
+# TODO I wonder which one is faster. Need to benchmark...
+@export_function_to_module
+@user_documentation
+def peek_next_meaning()->str:
+ """
+ Get the meaning of the following token, as a string, using the current |\escapechar|.
+
+ This is recommended over |peek_next_token()| as it will not tokenize an extra token.
+
+ It's undefined behavior if there's a newline (|\newlinechar| or |^^J|, the latter is OS-specific)
+ in the meaning string.
+ """
+ return typing.cast(Callable[[], TTPEmbeddedLine], Python_call_TeX_local(
+ r"""
+ \cs_new_protected:Npn \__peek_next_meaning_callback: {
+
+ \edef \__tmp {\meaning \__tmp} % just in case |\__tmp| is outer, |\write| will not be able to handle it
+ %\immediate\write \__write_file { r \unexpanded\expandafter{\__tmp} }
+ \immediate\write \__write_file { r \__tmp }
+
+ \__read_do_one_command:
+ }
+ \cs_new_protected:Npn %name% {
+ \futurelet \__tmp \__peek_next_meaning_callback:
+ }
+ """, recursive=False))()
+
+
+if 0:
+ peek_next_char_=define_Python_call_TeX_local_sync(
+
+ # first attempt. Slower than peek_next_meaning.
+ r"""
+ \cs_new_protected:Npn \__peek_next_char_callback: {
+ \edef \__tmpb { \expandafter\str_item:nn\expandafter{\meaning \__tmp} {-1} } % \expandafter just in case \__tmp is \outer
+ \if \noexpand\__tmp \__tmpb % is a character
+ \immediate\write \__write_file { r^^J \__tmpb . }
+ \else % is not?
+ \immediate\write \__write_file { r^^J }
+ \fi
+ \__read_do_one_command:
+ }
+ \cs_new_protected:Npn %name% {
+ \futurelet \__tmp \__peek_next_char_callback:
+ }
+ """
+
+ # second attempt. Faster than before but still slower than peek_next_meaning.
+ #r"""
+ #\cs_new_protected:Npn %name% {
+ # \futurelet \__tmp \__peek_next_char_callback:
+ #}
+ #
+ #\cs_new_protected:Npn \__peek_next_char_callback: {
+ # %\if \noexpand\__tmp \c_space_token % there's also this case and that \__tmp is some TeX primitive conditional...
+ # \expandafter \__peek_next_char_callback_b: \meaning \__tmp \relax
+ #}
+ #
+ #\cs_new_protected:Npn \__peek_next_char_callback_b: #1 #2 {
+ # \ifx #2 \relax
+ # \if \noexpand\__tmp #1 % is a character
+ # \immediate\write \__write_file { r^^J #1 }
+ # \else % is not?
+ # \immediate\write \__write_file { r^^J }
+ # \fi
+ # \expandafter \__read_do_one_command:
+ # \else
+ # \expandafter \__peek_next_char_callback_b: \expandafter #2
+ # \fi
+ #}
+ #
+ #"""
+
+ , [], [TTPLine], recursive=False)
+
+
+
+meaning_str_to_catcode: Dict[str, Catcode]={
+ "begin-group character ": Catcode.bgroup,
+ "end-group character ": Catcode.egroup,
+ "math shift character ": Catcode.math,
+ "alignment tab character ": Catcode.alignment,
+ "macro parameter character ": Catcode.parameter,
+ "superscript character ": Catcode.superscript,
+ "subscript character ": Catcode.subscript,
+ "blank space ": Catcode.space,
+ "the letter ": Catcode.letter,
+ "the character ": Catcode.other,
+ }
+
+def parse_meaning_str(s: str)->Optional[Tuple[Catcode, str]]:
+ if s and s[:-1] in meaning_str_to_catcode:
+ return meaning_str_to_catcode[s[:-1]], s[-1]
+ return None
+
+@export_function_to_module
+@user_documentation
+def peek_next_char()->str:
+ """
+ Get the character of the following token, or empty string if it's not a character.
+ Will also return nonempty if the next token is an implicit character token.
+
+ Uses peek_next_meaning() under the hood to get the meaning of the following token. See peek_next_meaning() for a warning on undefined behavior.
+ """
+
+ #return str(peek_next_char_()[0])
+ # too slow (marginally slower than peek_next_meaning)
+
+ r=parse_meaning_str(peek_next_meaning())
+ if r is None:
+ return ""
+ return r[1]
+
+@export_function_to_module
+def get_next_char()->str:
+ result=Token.get_next()
+ assert isinstance(result, CharacterToken), "Next token is not a character!"
+ return result.chr
+
+# ========
+
+try:
+ send_bootstrap_code()
+ run_main_loop() # if this returns cleanly TeX has no error. Otherwise some readline() will reach eof and print out a stack trace
+ assert not raw_readline(), "Internal error: TeX sends extra line"
+
+except:
+ # see also documentation of run_error_finish.
+ sys.stderr.write("\n")
+ traceback.print_exc(file=sys.stderr)
+
+ if do_run_error_finish:
+ action_done=False # force run it
+ run_error_finish(PTTBlock("".join(traceback.format_exc())))
+
+ os._exit(0)
+
diff --git a/macros/latex/contrib/saveenv/saveenv.pdf b/macros/latex/contrib/saveenv/saveenv.pdf
index 20bf11c9fd..f93c230efa 100644
--- a/macros/latex/contrib/saveenv/saveenv.pdf
+++ b/macros/latex/contrib/saveenv/saveenv.pdf
Binary files differ
diff --git a/macros/latex/contrib/saveenv/saveenv.sty b/macros/latex/contrib/saveenv/saveenv.sty
index 454275c878..9a694a5f4d 100644
--- a/macros/latex/contrib/saveenv/saveenv.sty
+++ b/macros/latex/contrib/saveenv/saveenv.sty
@@ -12,7 +12,7 @@
%
% The Current Maintainer of this work is user202729.
-\ProvidesExplPackage{saveenv}{2022/07/08}{0.0.0}{Save environment content verbatim}
+\ProvidesExplPackage{saveenv}{2022/12/23}{0.0.1}{Save environment content verbatim}
\RequirePackage{precattl}
\msg_new:nnn {saveenv} {trailing-content-or-pretokenized}
{Trailing~content~found~on~line,~or~content~pretokenized!}
@@ -51,14 +51,11 @@
\tl_build_gbegin:N #1
- \prg_replicate:nn {\the\inputlineno-\_senv_firstline-2} {
+ \prg_replicate:nn {\the\inputlineno-\_senv_firstline-1} {
\ior_str_get:NN \_senv_file \_senv_line
- \exp_args:NNo \tl_build_gput_right:Nn #1 {\_senv_line \cO\^^J}
+ \exp_args:NNo \tl_build_gput_right:Nn #1 {\_senv_line ^^J}
}
- \ior_str_get:NN \_senv_file \_senv_line
- \exp_args:NNo \tl_build_gput_right:Nn #1 {\_senv_line}
-
\ior_close:N \_senv_file
\tl_build_gend:N #1
@@ -67,16 +64,19 @@
% #1: target macro
-\NewDocumentEnvironment {saveenvkeeplast} {m} {
+% #2: content to be inserted after the \end
+\NewDocumentEnvironment {saveenvkeeplastreinsert} {mm} {
\begingroup
\edef \_senv_old_endlinechar {\the\endlinechar}
+ %\bench before cctab.
\cctab_select:N \c_other_cctab % note that this changes the value of \endlinechar as well
+ %\bench after cctab.
\int_compare:nNnTF {\_senv_old_endlinechar} < {0} {
- \_senv_start_get_body:N #1
+ \_senv_start_get_body:Nn #1 {#2}
} {
\exp_last_unbraced:Nf \peek_meaning_remove:NTF { \char_generate:nn{\_senv_old_endlinechar}{12} } %12 is other
{
- \_senv_start_get_body:N #1
+ \_senv_start_get_body:Nn #1 {#2}
}
{
\msg_error:nn {saveenv} {trailing-content-or-pretokenized}
@@ -85,24 +85,33 @@
} {
}
+
% #1: target macro
-\cs_new_protected:Npn \_senv_start_get_body:N #1 {
+% #2: content to be inserted after the \end
+\cs_new_protected:Npn \_senv_start_get_body:Nn #1 #2 {
\endlinechar=10~
\str_set:NV \_senv_env \@currenvir
\tl_replace_all:Nnn \_senv_env {~} {\cO\ }
- \exp_args:NNVV \_senv_helper #1 \_senv_env \@currenvir
+ \_senv_helper:NVVn #1 \_senv_env \@currenvir {#2}
}
% #1: target macro
% #2: value of \@currenvir but with all tokens catcode 12 (other)
% #3: value of \@currenvir
-\def \_senv_helper #1 #2 #3 {
+% #4 content to be inserted after the \end
+\cs_new_protected:Npn \_senv_helper:Nnnn #1 #2 #3 #4 {
\cs_set_protected:cpn {[saveenv]~verbatim~body~scanner~for~#2} ##1 \cO{ \\end\{ } #2 \cO\} {
+ %\bench X3.
% ##1: the body
- \peek_meaning_remove:NTF \cO\^^J {
+ \peek_meaning_remove:NTF ^^J {
+ %\bench inside peek.
\endgroup
+ %\bench after endgroup.
\str_gset:Nn #1 {##1}
+ %\bench X5.
\end{#3}
+ %\bench X6.
+ #4
} {
\msg_error:nn {saveenv} {trailing-content-end-line}
}
@@ -110,14 +119,23 @@
\use:c {[saveenv]~verbatim~body~scanner~for~#2}
}
+\cs_generate_variant:Nn \_senv_helper:Nnnn {NVVn}
+
+\NewDocumentEnvironment {saveenvkeeplast} {m} {
+ \saveenvkeeplastreinsert #1 {}
+} {
+ \endsaveenvkeeplastreinsert
+}
% set variable #1 to have content of #2, but with last line dropped.
% lines are separated by \^^J.
+\cs_new:Npn \_senv_append_newline:n #1 { #1 ^^J }
+
\cs_new_protected:Npn \saveenv_set_drop_last:Nn #1 #2 {
\tl_set:Nn \_senv_body {#2}
\tl_replace_all:Nnn \_senv_body {~} {\cO\ } % keep spaces in seq_set_split (support older expl3 versions)
- \seq_set_split:NnV \_senv_lines {\cO\^^J} \_senv_body
+ \seq_set_split:NnV \_senv_lines {^^J} \_senv_body
\seq_pop_right:NN \_senv_lines \_senv_lastline
\tl_map_inline:Nn \_senv_lastline { % debug check, ensure last line is empty
\int_case:nnF {`##1} {
@@ -128,17 +146,24 @@
\msg_error:nnoVV {saveenv} {leading-content-last-line} {\number`##1} \_senv_lastline \@currenvir
}
}
- \str_gset:Nx #1 {\seq_use:Nn \_senv_lines {\cO\^^J}}
+ %\str_gset:Nx #1 {\seq_use:Nn \_senv_lines {^^J}} % this is extremely slow because \seq_use:Nn is ⋆-expandable
+ \str_gset:Nx #1 {\seq_map_function:NN \_senv_lines \_senv_append_newline:n }
}
\cs_generate_variant:Nn \saveenv_set_drop_last:Nn {NV}
+\NewDocumentEnvironment {saveenvreinsert} {mm} {
+ \saveenvkeeplastreinsert #1 {#2}
+} {
+ \endsaveenvkeeplastreinsert
+ \saveenv_set_drop_last:NV #1 #1
+}
\NewDocumentEnvironment {saveenv} {m} {
- \saveenvkeeplast \_senv_content
+ \saveenvkeeplast #1
} {
\endsaveenvkeeplast
- \saveenv_set_drop_last:NV #1 \_senv_content
+ \saveenv_set_drop_last:NV #1 #1
}
diff --git a/macros/latex/contrib/saveenv/saveenv.tex b/macros/latex/contrib/saveenv/saveenv.tex
index c6d4ba87bb..5a5f741a25 100644
--- a/macros/latex/contrib/saveenv/saveenv.tex
+++ b/macros/latex/contrib/saveenv/saveenv.tex
@@ -1,5 +1,5 @@
%%! TEX program = lualatex
-\ProvidesFile{saveenv.tex} [2022/07/08 v0.0.0 ]
+\ProvidesFile{saveenv.tex} [2022/12/23 v0.0.1 ]
\documentclass{l3doc}
\EnableCrossrefs
\CodelineIndex
@@ -41,8 +41,8 @@ This package provides tools to create your own verbatim environments, and works
\begin{itemize}
\item \pkg{scontents} package is similar; however it does not allow programmer to programmatically retrieve the macro content, only do a limited number of actions with them (execute, typeset as verbatim code, etc.).
- \item \pkg{fancyvrb} and \pkg{verbatimcopy} provides some internal macro for defining similar environments, however they're internal.
- \item \pkg{filecontentsdef} and \pkg{newverbs} provides very similar facilities (\env{filecontentsdefmacro} environment and \tn{Collectverbenv} command respectively); however it requires \verb+\endlinechar=13+ and does not support \cs{ExplSyntaxOn} environment.
+ \item \pkg{fancyvrb}, \pkg{xsimverb} and \pkg{verbatimcopy} provides some internal macro for defining similar environments, however they're internal and/or too specialized (writes to file etc.).
+ \item \pkg{filecontentsdef} and \pkg{newverbs} provides very similar facilities (\env{filecontentsdefmacro} environment and |\Collectverbenv| command respectively); however it requires |\endlinechar=13| and does not support |\ExplSyntaxOn| environment.
\item \pkg{verbatim} provides facilities to define custom verbatim environment that processes the content line-by-line, however the interface is more complicated.
For comparison, the following code
@@ -80,7 +80,7 @@ This package provides tools to create your own verbatim environments, and works
\end{verbatim}
defines an environment that saves the data similar to \env{saveenv} environment described below (with the overhead of |\tl_build_*| functions),
-but inside \cs{ExplSyntaxOn} environment it generates a spurious space at the beginning of the string.
+but inside |\ExplSyntaxOn| environment it generates a spurious space at the beginning of the string.
\end{itemize}
@@ -91,17 +91,28 @@ but inside \cs{ExplSyntaxOn} environment it generates a spurious space at the be
Environment that saves its body.
For example, the following code
-
\begin{verbatim}
\begin{saveenv}{\data}
123
456
\end{saveenv}
\end{verbatim}
+will save the string \texttt{123\meta{newline}456\meta{newline}} globally into |\data|.
+
+Remark: it is consistent to keep the trailing newline, as
+\begin{verbatim}
+\begin{saveenv}{\data}
+\end{saveenv}
+\end{verbatim}
+will make |\data| empty, and
+\begin{verbatim}
+\begin{saveenv}{\data}
-will save the string \texttt{123\meta{newline}456} globally into \cs{data}.
+\end{saveenv}
+\end{verbatim}
+will make |\data| consist of a single \meta{newline}.
-The braces around \verb+{\data}+ is optional; however, in the unlikely case if \cs{endlinechar} has the \enquote{letter} catcode, it might be absorbed and gives unexpected result.
+The braces around |{\data}| is optional; however, in the unlikely case if \cs{endlinechar} has the \enquote{letter} catcode, it might be absorbed and gives unexpected result.
A newline is represented as a token with charcode 10 (|^^J|) and catcode other.
@@ -116,7 +127,7 @@ The assignment is global, and done before the macro \cs{endsaveenv} is executed.
The data is represented as an \pkg{expl3}-string, that is, a sequence of tokens with catcode 12 (for non-space characters) or 10 (for space character).
-In other words, the token list is equal to its own \cs{detokenize}.
+In other words, the token list is equal to its own |\detokenize|.
\DescribeEnv{saveenvghost}
Similar to above; however the content inside is still typesetted/executed, and the Sync\TeX\ information is preserved.
@@ -127,7 +138,43 @@ Note that this environment is implemented by reading the whole file from the beg
Similar to above; however the final newline and the space characters before \texttt{\cs{end}\{\meta{environment name}\}} are preserved.
For example, the example above with \texttt{saveenv} replaced with \texttt{saveenvkeeplast}
-will save the string \texttt{123\meta{newline}456\meta{newline}} into \cs{data} instead.
+will save the string \texttt{123\meta{newline}456\meta{newline}} into |\data| instead.
+
+\section{Reinsert environments}
+
+Sometimes it's desirable to execute something (e.g. do some local assignments) after the group ends.
+
+There are a few options:
+\begin{itemize}
+ \item use |\aftergroup|,
+ \item close the group, execute the code and open a new one (remember to preserve the value of |\@currenvir|),
+ \item use one of the environments below.
+\end{itemize}
+
+\DescribeEnv{saveenvreinsert}
+Environment that takes two arguments, the \meta{str var} to be set and the code to be put after the group end.
+
+Usage example: If the following code is executed
+\begin{verbatim}
+\begin{saveenvreinsert}{\data}{\myfunction {args etc.}}
+123
+456
+\end{saveenvreinsert}
+some other content
+\end{verbatim}
+the effect would be identical to as if |\data| is set to \texttt{123\meta{newline}456\meta{newline}},
+then the following code is executed
+\begin{verbatim}
+\myfunction {args etc.}some other content
+\end{verbatim}
+If the second argument is empty, this environment is identical to the \env{saveenv} environment.
+
+Note that in the example above |\myfunction| is executed after the group ends,
+while any code in the second block of the |\NewDocumentEnvironment| definition
+would be executed before the group ends (such as in the example below), thus any local assignment will not persist.
+
+\DescribeEnv{saveenvkeeplastreinsert}
+Same as above, but the trailing whitespaces (after the last newline) are preserved.
\section{Extending the environments}
@@ -148,6 +195,8 @@ For example, the following definition
\end{verbatim}
will define an environment \env{custom} that prints out the content inside the environment using |\tl_show:N|.
+Note that in this case |\tl_show:N \data| is executed before the group ends.
+
\section{Limitation}
\begin{itemize}
@@ -157,13 +206,15 @@ will define an environment \env{custom} that prints out the content inside the e
Nevertheless, in modern computers, the overhead is negligible.
\item In case it's desired to typeset the content afterwards, it's difficult to preserve the Sync\TeX\ data.
+
+ (although with Lua\LaTeX\ it's possible, see \pkg{rescansync} package)
\end{itemize}
\item Currently nested environments with the same name are not supported (unlike \pkg{scontents} package).
- \item Note that there must be nothing after the \texttt{\cs{begin}\{\meta{environment name}\}} or the \texttt{\cs{end}\{\meta{environment name}\}} line.
+ \item Note that there must be nothing after the |\begin|\texttt{\{\meta{environment name}\}} or the |\end|\texttt{\{\meta{environment name}\}} line.
- \item Note that \texttt{\cs{end}\{\meta{environment name}\}} must not be in the middle of any line.
+ \item Note that |\end|\texttt{\{\meta{environment name}\}} must not be in the middle of any line.
\item The \cs{endlinechar} must not be tokenized in advance (or if it is, its catcode must be 12/other).
This might happen when for example your environment looks ahead for optional argument.
@@ -172,10 +223,9 @@ will define an environment \env{custom} that prints out the content inside the e
Alternatively, you can
\begin{itemize}
\item manually remove the end line token,
- \item set \verb+\endlinechar=-1\relax+ before calling \cs{saveenv}
- \item (optional) reset the value of \cs{endlinechar} afterwards.
-
+ \item set |\endlinechar=-1\relax| inside the environment before calling \cs{saveenv}.
\end{itemize}
+ The value of |\endlinechar| will automatically be reset after the group of the environment is closed.
\end{itemize}
diff --git a/macros/latex/contrib/tagpdf/README.md b/macros/latex/contrib/tagpdf/README.md
index 265428377f..dc8ac843f8 100644
--- a/macros/latex/contrib/tagpdf/README.md
+++ b/macros/latex/contrib/tagpdf/README.md
@@ -1,6 +1,6 @@
#tagpdf — A package to create tagged pdf
-Packageversion: 0.97
-Packagedate: 2022/08/24
+Packageversion: 0.98
+Packagedate: 2022/12/22
Author: Ulrike Fischer
## License
diff --git a/macros/latex/contrib/tagpdf/tagpdf-backend.dtx b/macros/latex/contrib/tagpdf/tagpdf-backend.dtx
index 800a6bfa46..47369b519b 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-backend.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-backend.dtx
@@ -47,13 +47,13 @@
% }^^A
% }
%
-% \date{Version 0.97, released 2022-08-24}
+% \date{Version 0.98, released 2022-12-22}
% \maketitle
% \begin{implementation}
% \begin{macrocode}
%<@@=tag>
%<*luatex>
-\ProvidesExplFile {tagpdf-luatex.def} {2022-08-24} {0.97}
+\ProvidesExplFile {tagpdf-luatex.def} {2022-12-22} {0.98}
{tagpdf~driver~for~luatex}
% \end{macrocode}
% \section{Loading the lua}
@@ -146,6 +146,7 @@
}
% \end{macrocode}
% \end{macro}
+%
% \begin{macrocode}
%</luatex>
% \end{macrocode}
@@ -157,8 +158,8 @@
local ProvidesLuaModule = {
name = "tagpdf",
- version = "0.97", --TAGVERSION
- date = "2022-08-24", --TAGDATE
+ version = "0.98", --TAGVERSION
+ date = "2022-12-22", --TAGDATE
description = "tagpdf lua code",
license = "The LATEX Project Public License 1.3c"
}
@@ -282,6 +283,7 @@ ltx.@@.struct = ltx.@@.struct or { } -- struct data
ltx.@@.tables = ltx.@@.tables or { } -- tables created with new prop and new seq.
-- wasn't a so great idea ...
-- g_@@_role_tags_seq used by tag<-> is in this tables!
+ -- used for pure lua tables too now!
ltx.@@.page = ltx.@@.page or { } -- page data, currently only i->{0->mcnum,1->mcnum,...}
ltx.@@.trace = ltx.@@.trace or { } -- show commands
ltx.@@.func = ltx.@@.func or { } -- functions
@@ -437,7 +439,28 @@ local function @@_get_mathsubtype (mathnode)
end
% \end{macrocode}
% \end{macro}
-
+%
+% \begin{variable}{ltx.@@.tables.role_tag_attribute,ltx.@@.tables.role_tag_attribute}
+% The first is a table with key a tag and value a number (the attribute)
+% The second is an array with the attribute value as key.
+% \begin{macrocode}
+ltx.@@.tables.role_tag_attribute = {}
+ltx.@@.tables.role_attribute_tag = {}
+% \end{macrocode}
+% \end{variable}
+% \begin{macro}{ltx.@@.func.alloctag}
+% \begin{macrocode}
+local @@_alloctag =
+ function (tag)
+ if not ltx.@@.tables.role_tag_attribute[tag] then
+ table.insert(ltx.@@.tables.role_attribute_tag,tag)
+ ltx.@@.tables.role_tag_attribute[tag]=#ltx.@@.tables.role_attribute_tag
+ @@_log ("Add "..tag.." "..ltx.@@.tables.role_tag_attribute[tag],3)
+ end
+ end
+ltx.@@.func.alloctag = @@_alloctag
+% \end{macrocode}
+% \end{macro}
% \begin{macro}
% {
% @@_get_num_from,
@@ -451,8 +474,8 @@ end
% \begin{macrocode}
local @@_get_num_from =
function (tag)
- if ltx.@@.tables["g_@@_role_tags_prop"][tag] then
- a= ltx.@@.tables["g_@@_role_tags_prop"][tag]
+ if ltx.@@.tables.role_tag_attribute[tag] then
+ a= ltx.@@.tables.role_tag_attribute[tag]
else
a= -1
end
@@ -479,13 +502,13 @@ end
% }
% These functions are the opposites to the previous function:
% they take as argument a number (the attribute value) and return the string |tag|.
-% The first function outputs the number for lua, while the |output| function
+% The first function outputs the string for lua, while the |output| function
% outputs to tex.
% \begin{macrocode}
local @@_get_tag_from =
function (num)
- if ltx.@@.tables["g_@@_role_tags_seq"][num] then
- a = ltx.@@.tables["g_@@_role_tags_seq"][num]
+ if ltx.@@.tables.role_attribute_tag[num] then
+ a = ltx.@@.tables.role_attribute_tag[num]
else
a= "UNKNOWN"
end
@@ -924,7 +947,7 @@ function ltx.@@.func.mark_page_elements (box,mcpagecnt,mccntprev,mcopen,name,mct
elseif n.id == VLIST then -- enter the vlist
mcopen,mcpagecnt,mccntprev,mctypeprev=
ltx.@@.func.mark_page_elements (n,mcpagecnt,mccntprev,mcopen,"INTERNAL VLIST",mctypeprev)
- elseif n.id == GLUE then -- at glue real space chars are inserted, but this has
+ elseif n.id == GLUE and not n.leader then -- at glue real space chars are inserted, but this has
-- been done if the previous shipout wandering, so here it is ignored
elseif n.id == LOCAL_PAR then -- local_par is ignored
elseif n.id == PENALTY then -- penalty is ignored
diff --git a/macros/latex/contrib/tagpdf/tagpdf-checks.dtx b/macros/latex/contrib/tagpdf/tagpdf-checks.dtx
index e5ba53195f..52113f348f 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-checks.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-checks.dtx
@@ -48,7 +48,7 @@
% }^^A
% }
%
-% \date{Version 0.97, released 2022-08-24}
+% \date{Version 0.98, released 2022-12-22}
% \maketitle
% \begin{documentation}
% \section{Commands}
@@ -295,7 +295,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-checks-code} {2022-08-24} {0.97}
+\ProvidesExplPackage {tagpdf-checks-code} {2022-12-22} {0.98}
{part of tagpdf - code related to checks, conditionals, debugging and messages}
%</header>
% \end{macrocode}
@@ -402,9 +402,22 @@
% Informational message shown if log-mode is high enough
% \begin{macrocode}
\msg_new:nnn { tag } {struct-show-closing}
- { closing~structure~#1~tagged~\prop_item:cn{g_@@_struct_#1_prop}{S} }
+ { closing~structure~#1~tagged~\use:e{\prop_item:cn{g_@@_struct_#1_prop}{S}} }
% \end{macrocode}
% \end{macro}
+% \begin{macro}{tree-struct-still-open}
+% Message issued at the end if there are beside Root other
+% open structures on the stack.
+% \begin{macrocode}
+\msg_new:nnn { tag } {tree-struct-still-open}
+ {
+ There~are~still~open~structures~on~the~stack!\\
+ The~stack~contains~\seq_use:Nn\g_@@_struct_tag_stack_seq{,}.\\
+ The~structures~are~automatically~closed,\\
+ but~their~nesting~can~be~wrong.
+ }
+% \end{macrocode}
+% \end{macro}
%
% \subsection{Attributes}
% Not much yet, as attributes aren't used so much.
@@ -423,11 +436,30 @@
\msg_new:nnn { tag } {role-unknown-tag} { tag~#1~is~not~known }
% \end{macrocode}
% \end{macro}
+% \begin{macro}{role-parent-child}
+% This is info and warning message about the containment rules between child and
+% parent tags.
+% \begin{macrocode}
+\msg_new:nnn { tag } {role-parent-child}
+ { The~rule~between~parent~'#1'~\\and~child~'#2'~is~#3}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{role-parent-child}
+% This is info and warning message about the containment rules between child and
+% parent tags.
+% \begin{macrocode}
+\msg_new:nnn { tag } {role-remapping}
+ { remapping~tag~to~#1 }
+% \end{macrocode}
+% \end{macro}
% \begin{macro}{role-tag,new-tag}
% Info messages.
% \begin{macrocode}
\msg_new:nnn { tag } {role-tag} { mapping~tag~#1~to~role~#2 }
\msg_new:nnn { tag } {new-tag} { adding~new~tag~#1 }
+\msg_new:nnn { tag } {read-namespace} { reading~namespace~definitions~tagpdf-ns-#1.def }
+\msg_new:nnn { tag } {namespace-missing}{ namespace~definitions~tagpdf-ns-#1.def~not~found }
+\msg_new:nnn { tag } {namespace-unknown}{ namespace~#1~is~not~declared }
% \end{macrocode}
% \end{macro}
%
@@ -562,7 +594,7 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_check_structure_tag:N #1
{
- \prop_if_in:NoF \g_@@_role_tags_prop {#1}
+ \prop_if_in:NoF \g_@@_role_tags_NS_prop {#1}
{
\msg_warning:nnx { tag } {role-unknown-tag} {#1}
}
@@ -618,10 +650,10 @@
{
\tl_if_empty:nTF {#2}
{
- \msg_warning:nnn { tag } {role-missing} {#1}
+ \msg_error:nnn { tag } {role-missing} {#1}
}
{
- \prop_get:NnNTF \g_@@_role_tags_prop {#2} \l_tmpa_tl
+ \prop_get:NnNTF \g_@@_role_tags_NS_prop {#2} \l_tmpa_tl
{
\int_compare:nNnT {\l_@@_loglevel_int} > { 0 }
{
@@ -629,13 +661,35 @@
}
}
{
- \msg_warning:nnn { tag } {role-unknown} {#2}
+ \msg_error:nnn { tag } {role-unknown} {#2}
+ }
+ }
+ }
+% \end{macrocode}
+% Similar with a namespace
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_check_add_tag_role:nnn #1 #2 #3 %#1 tag/NS, #2 role #3 namespace
+ {
+ \tl_if_empty:nTF {#2}
+ {
+ \msg_error:nnn { tag } {role-missing} {#1}
+ }
+ {
+ \prop_get:cnNTF { g_@@_role_NS_#3_prop } {#2} \l_tmpa_tl
+ {
+ \int_compare:nNnT {\l_@@_loglevel_int} > { 0 }
+ {
+ \msg_info:nnnn { tag } {role-tag} {#1} {#2/#3}
+ }
+ }
+ {
+ \msg_error:nnn { tag } {role-unknown} {#2/#3}
}
}
}
% \end{macrocode}
% \end{macro}
-%
+
% \subsection{Check related to mc-chunks}
%
% \begin{macro}{\@@_check_mc_if_nested:,\@@_check_mc_if_open:}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-code.pdf b/macros/latex/contrib/tagpdf/tagpdf-code.pdf
index 551a700624..6dfd5b74a4 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-code.pdf
+++ b/macros/latex/contrib/tagpdf/tagpdf-code.pdf
Binary files differ
diff --git a/macros/latex/contrib/tagpdf/tagpdf-data.dtx b/macros/latex/contrib/tagpdf/tagpdf-data.dtx
new file mode 100644
index 0000000000..560856bf28
--- /dev/null
+++ b/macros/latex/contrib/tagpdf/tagpdf-data.dtx
@@ -0,0 +1,581 @@
+% \iffalse meta-comment
+%
+%% File: tagpdf-data.dtx
+%
+% Copyright (C) 2022 Ulrike Fischer
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% https://www.latex-project.org/lppl.txt
+%
+% This file is part of the "tagpdf bundle" (The Work in LPPL)
+% and all files in that bundle must be distributed together.
+%
+% -----------------------------------------------------------------------
+%
+% The development version of the bundle can be found at
+%
+% https://github.com/u-fischer/tagpdf
+%
+% for those people who are interested.
+%<*driver>
+\DocumentMetadata{}
+\documentclass{l3doc}
+\usepackage{array,booktabs,caption}
+\hypersetup{pdfauthor=Ulrike Fischer,
+ pdftitle=tagpdf-data module (tagpdf)}
+\begin{document}
+ \DocInput{\jobname.dtx}
+\end{document}
+%</driver>
+% \fi
+% \title{^^A
+% The \pkg{tagpdf-data} module\\
+% Data files for tag namespaces and containment rules^^A
+% \\ Part of the tagpdf package
+% }
+%
+% \author{^^A
+% Ulrike Fischer\thanks
+% {^^A
+% E-mail:
+% \href{mailto:fischer@troubleshooting-tex.de}
+% {fischer@troubleshooting-tex.de}^^A
+% }^^A
+% }
+%
+% \date{Version 0.98, released 2022-12-22}
+% \maketitle
+% \begin{documentation}
+% This files contains a various data files which are read in
+% by \pkg{tagpdf} to setup name spaces and rules for tag relationships.
+%
+% \end{documentation}
+% \begin{implementation}
+% \section{The LaTeX namespace}
+% This is the main new namespace. It is bound to change a lot!
+% It lists the new tag, the rolemap and the namespace of the rolemap.
+% \begin{macrocode}
+%<*ns-latex>
+%% \ProvidesExplFile {tagpdf-ns-latex.def} {2022-12-22} {0.98}
+%% {latex} {https://www.latex-project.org/ns/dflt/2022}{}
+title, Title, pdf2,
+part, Title, pdf2,
+section, H1, pdf2,
+subsection, H2, pdf2,
+subsubsection,H3, pdf2,
+paragraph, H4, pdf2,
+subparagraph, H5, pdf2,
+itemize, L, pdf2,
+enumerate, L, pdf2,
+description, L, pdf2,
+item, LI, pdf2,
+itemlabel, Lbl, pdf2,
+itembody, LBody, pdf2,
+footnote, FENote, pdf2,
+footnotemark, Lbl, pdf2,
+footnotelabel,Lbl, pdf2,
+%</ns-latex>
+% \end{macrocode}
+% \section{The LaTeX-book namespace}
+% This changes the rolemapping of some tags for heading with
+% to values more suitable in book classes.
+% It is bound to change
+% \begin{macrocode}
+%<*ns-latex-book>
+%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2022-12-22} {0.98}
+%% {latex-book} {https://www.latex-project.org/ns/book/2022}{}
+chapter, H1,pdf2,
+section, H2,pdf2,
+subsection, H3,pdf2,
+subsubsection, H4,pdf2,
+paragraph, H5,pdf2,
+subparagraph, H6,pdf2,
+%</ns-latex-book>
+% \end{macrocode}
+% \section{The LaTeX-inline namespace}
+% This degrades the rolemapping of some tags. It is an experimental name space.
+% It can disappear again if it doesn't look usefull.
+% It is bound to change a lot!
+% \begin{macrocode}
+%<*ns-latex-inline>
+%% \ProvidesExplFile {tagpdf-ns-latex-inline.def} {2022-12-22} {0.98}
+%% {latex-inline} {https://www.latex-project.org/ns/inline/2022}{}
+chapter, Span, pdf2,
+section, Span, pdf2,
+subsection, Span, pdf2,
+subsubsection, Span, pdf2,
+paragraph, Span, pdf2,
+subparagraph, Span, pdf2,
+P, Span, pdf2,
+%</ns-latex-inline>
+% \end{macrocode}
+% \section{The pdf namespace data}
+% \begin{macrocode}
+%<*ns-pdf>
+%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2022-12-22} {0.98}
+%% {pdf} {http://iso.org/pdf/ssn}{}
+StructTreeRoot,,,D,
+Document,,,D,
+Part,,,G,
+Sect,,,G,
+Div,,,G,
+Caption,,,GB,
+NonStruct,,,G,
+H,,,B,
+H1,,,B,
+H2,,,B,
+H3,,,B,
+H4,,,B,
+H5,,,B,
+H6,,,B,
+P,,,B,
+L,,,BI,
+LI,,,L,
+Lbl,,,I,
+LBody,,,L,
+Table,,,B,
+TR,,,T,
+TH,,,T,
+TD,,,T,
+THead,,,T,
+TBody,,,T,
+TFoot,,,T,
+Span,,,I,
+Link,,,GBI,
+Annot,,,GBI,
+Figure,,,GBI,
+Formula,,,GBI,
+Form,,,GBI,
+Ruby,,,I,
+RB,,,I,
+RT,,,I,
+Warichu,,,I,
+WT,,,I,
+WP,,,I,
+Artifact,,,GBI,
+Art,,,,G, % only pdf, types unclear, needs correction later
+BlockQuote,,,G, %or GB?
+TOC,,,G,
+TOCI,,,G,
+Index,,,G,
+Private,,,G,
+Quote,,,I,
+Note,,,GBI, % I in reference, but
+Reference,,,B, %
+BibEntry,,,B, %
+Code,,,I, %
+%</ns-pdf>
+% \end{macrocode}
+% \section{The pdf 2.0 namespace data}
+% \begin{macrocode}
+%<*ns-pdf2>
+%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2022-12-22} {0.98}
+%% {pdf2} {http://iso.org/pdf2/ssn}{}
+Document,,,D,
+Part,,,G,
+Sect,,,G,
+Div,,,G,
+Caption,,,GB,
+NonStruct,,,G,
+H,,,B,
+H1,,,B,
+H2,,,B,
+H3,,,B,
+H4,,,B,
+H5,,,B,
+H6,,,B,
+P,,,B,
+L,,,BI,
+LI,,,L,
+Lbl,,,I,
+LBody,,,L,
+Table,,,B,
+TR,,,T,
+TH,,,T,
+TD,,,T,
+THead,,,T,
+TBody,,,T,
+TFoot,,,T,
+Span,,,I,
+Link,,,GBI,
+Annot,,,GBI,
+Figure,,,GBI,
+Formula,,,GBI,
+Form,,,GBI,
+Ruby,,,I,
+RB,,,I,
+RT,,,I,
+Warichu,,,I,
+WT,,,I,
+WP,,,I,
+Artifact,,,GBI,
+DocumentFragment,Art, pdf,D, %rest only pdf2
+Aside, Note, pdf,G,
+H7, H6, pdf,B,
+H8, H6, pdf,B,
+H9, H6, pdf,B,
+H10, H6, pdf,B,
+Title, P, pdf,GB,
+FENote, Note, pdf,GBI,
+Sub, Span, pdf,I,
+Em, Span, pdf,I,
+Strong, Span, pdf,I,
+%</ns-pdf2>
+% \end{macrocode}
+% \section{The mathml namespace data}
+% \begin{macrocode}
+%<*ns-mathml>
+%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2022-12-22} {0.98}
+% {mathml}{http://www.w3.org/1998/Math/MathML}{}
+abs,,,
+and,,,
+annotation,,,
+apply,,,
+approx,,,
+arccos,,,
+arccosh,,,
+arccot,,,
+arccoth,,,
+arccsc,,,
+arccsch,,,
+arcsec,,,
+arcsech,,,
+arcsin,,,
+arcsinh,,,
+arctan,,,
+arctanh,,,
+arg,,,
+bind,,,
+bvar,,,
+card,,,
+cartesianproduct,,,
+cbytes,,,
+ceiling,,,
+cerror,,,
+ci,,,
+cn,,,
+codomain,,,
+complexes,,,
+compose,,,
+condition,,,
+conjugate,,,
+cos,,,
+cosh,,,
+cot,,,
+coth,,,
+cs,,,
+csc,,,
+csch,,,
+csymbol,,,
+curl,,,
+declare,,,
+degree,,,
+determinant,,,
+diff,,,
+divergence,,,
+divide,,,
+domain,,,
+domainofapplication,,,
+emptyset,,,
+eq,,,
+equivalent,,,
+eulergamma,,,
+exists,,,
+exp,,,
+exponentiale,,,
+factorial,,,
+factorof,,,
+false,,,
+floor,,,
+fn,,,
+forall,,,
+gcd,,,
+geq,,,
+grad,,,
+gt,,,
+ident,,,
+image,,,
+imaginary,,,
+imaginaryi,,,
+implies,,,
+in,,,
+infinity,,,
+int,,,
+integers,,,
+intersect,,,
+interval,,,
+inverse,,,
+lambda,,,
+laplacian,,,
+lcm,,,
+leq,,,
+limit,,,
+ln,,,
+log,,,
+logbase,,,
+lowlimit,,,
+lt,,,
+maction,,,
+maligngroup,,,
+malignmark,,,
+math,,,
+matrix,,,
+matrixrow,,,
+max,,,
+mean,,,
+median,,,
+menclose,,,
+merror,,,
+mfenced,,,
+mfrac,,,
+mglyph,,,
+mi,,,
+min,,,
+minus,,,
+mlabeledtr,,,
+mlongdiv,,,
+mmultiscripts,,,
+mn,,,
+mo,,,
+mode,,,
+moment,,,
+momentabout,,,
+mover,,,
+mpadded,,,
+mphantom,,,
+mprescripts,,,
+mroot,,,
+mrow,,,
+ms,,,
+mscarries,,,
+mscarry,,,
+msgroup,,,
+msline,,,
+mspace,,,
+msqrt,,,
+msrow,,,
+mstack,,,
+mstyle,,,
+msub,,,
+msubsup,,,
+msup,,,
+mtable,,,
+mtd,,,
+mtext,,,
+mtr,,,
+munder,,,
+munderover,,,
+naturalnumbers,,,
+neq,,,
+none,,,
+not,,,
+notanumber,,,
+notin,,,
+notprsubset,,,
+notsubset,,,
+or,,,
+otherwise,,,
+outerproduct,,,
+partialdiff,,,
+pi,,,
+piece,,,
+piecewise,,,
+plus,,,
+power,,,
+primes,,,
+product,,,
+prsubset,,,
+quotient,,,
+rationals,,,
+real,,,
+reals,,,
+reln,,,
+rem,,,
+root,,,
+scalarproduct,,,
+sdev,,,
+sec,,,
+sech,,,
+selector,,,
+semantics,,,
+sep,,,
+set,,,
+setdiff,,,
+share,,,
+sin,,,
+sinh,,,
+subset,,,
+sum,,,
+tan,,,
+tanh,,,
+tendsto,,,
+times,,,
+transpose,,,
+true,,,
+union,,,
+uplimit,,,
+variance,,,
+vector,,,
+vectorproduct,,,
+xor,,,
+%</ns-mathml>
+% \end{macrocode}
+% \section{Rule naming}
+% \begin{macro}{\c_@@_role_rules_prop}
+% These two properties map the rule strings to numbers and back.
+% There are in tagpdf-data.dtx near the csv files for easier maintainance.
+% \begin{macrocode}
+%<*package>
+\prop_const_from_keyval:Nn \c_@@_role_rules_prop
+ {
+ 0..n = 1,
+ 0..1 = 2,
+ 1 = 3, %StructTreeRoot, not really needed
+ [a] = 4, %ruby
+ [b] = 5, %warichu
+ c = 6, % WP ??
+ ‡ = 7, % Part,Div,NonStruct -> "check parent"
+ ∅* = 8, % or negative by default?
+ ∅ = -1,
+ }
+%in debug??
+\prop_const_from_keyval:Nn \c_@@_role_rules_num_prop
+ {
+ 1 = 0..n,
+ 2 = 0..1,
+ 3 = 1 , %StructTreeRoot, not really needed
+ 4 = [a] , %ruby
+ 5 = [b] , %warichu
+ 6 = c , % WP ??
+ 7 = ‡ , % Part,Div,NonStruct -> "check parent"
+ 8 = ∅* , % or negative by default?
+ -1 = ∅ ,
+ }
+%</package>
+% \end{macrocode}
+% \end{macro}
+% \section{The parent-child rules for pdf <2.0}
+% This csv contains the parent-child matrix for pdf <2.0.
+% The values are currently the strings used in the PDF reference.
+% This will perhaps change in future.
+% \begin{macrocode}
+%<*parent-child>
+%% \ProvidesExplFile {tagpdf-parent-child.csv} {2022-12-22} {0.98}
+,,,StructTreeRoot,Document,Art,Part,Div,Sect,BlockQuote,NonStruct,TOC,TOCI,Index,Private,Quote,Note,Reference,BibEntry,P,Hn,H,Lbl,Code,Span,Link,Annot,Form,Ruby,RB,RT,RP,Warichu,WT,WP,L,LI,LBody,Table,TR,TH,TD,THead,TBody,TFoot,Caption,Figure,Formula,MC
+Document,both,document level,1,0..n,∅,‡,‡,∅,0..n,‡,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅
+Art,1.7,grouping,∅,0..n,∅,‡,‡,0..n,0..n,‡,∅,∅,∅,0..n,∅,0..n,∅,∅,∅,0..1,0..1,∅,∅,∅,0..n,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,∅,∅
+Part,both,grouping,∅,0..n,0..n,‡,‡,0..n,0..n,‡,∅,∅,0..n,0..n,∅,0..n,∅,0..n,∅,∅,∅,∅,0..n,∅,∅*,∅*,∅*,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,0..n,0..n,0..n,∅
+Div,both,grouping,∅,0..n,0..n,‡,‡,0..n,0..n,‡,0..n,0..n,0..n,0..n,∅,0..n,∅,0..n,∅,∅,∅,∅,0..n,∅,0..n,0..n,0..n,∅,∅,∅,∅,∅,∅,∅,∅,0..n,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,0..n,∅
+Sect,both,grouping,∅,0..n,0..n,‡,‡,0..n,0..n,‡,∅,∅,0..n,0..n,∅,0..n,∅,∅,∅,0..1,0..1,∅,∅,∅,0..n,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,∅,∅
+BlockQuote,1.7,grouping?,∅,0..n,0..n,‡,‡,0..n,0..n,‡,∅,∅,∅,0..n,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅*,∅*,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,0..n,0..n,0..n,∅
+NonStruct,both,grouping,∅,0..n,0..n,‡,‡,0..n,0..n,‡,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,∅
+TOC,1.7,grouping,∅,0..n,0..n,‡,‡,0..n,0..n,‡,0..n,0..n,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅
+TOCI,1.7,TOC,∅,∅,∅,‡,‡,∅,∅,‡,0..n,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅
+Index,1.7,grouping?,∅,0..n,0..n,‡,‡,0..n,0..n,‡,∅,∅,∅,0..n,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,0..n,∅
+Private,1.7,grouping,∅,0..n,0..n,‡,‡,0..n,0..n,‡,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,∅,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,∅
+P,both,block,∅,0..n,0..n,‡,‡,0..n,0..n,‡,∅,0..n,0..n,0..n,∅,0..n,∅,0..n,∅,∅,∅,∅,∅,∅,∅*,∅*,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,0..n,∅
+Hn,both,block,∅,0..n,0..n,‡,‡,0..n,0..n,‡,∅,∅,0..n,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅*,∅*,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,0..n,∅
+H,both,block,∅,0..1,0..1,‡,‡,0..1,0..1,‡,∅,∅,0..n,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅*,∅*,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..1,∅,∅,0..1,0..1,∅,∅,∅,0..1,0..1,0..1,∅
+Quote,1.7,inline,∅,∅,∅,‡,‡,∅,∅,‡,∅,∅,∅,0..n,0..n,0..n,∅,∅,0..n,0..n,0..n,0..n,∅,0..n,0..n,0..n,∅,∅,0..n,0..n,0..n,∅,0..n,0..n,∅,∅,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,0..n,∅
+Note,1.7,inline,∅,0..n,0..n,‡,‡,0..n,0..n,‡,∅,∅,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,0..n,∅
+Reference,1.7,inline,∅,∅,∅,‡,‡,∅,0..n,‡,∅,0..n,0..n,0..n,0..n,0..n,∅,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,∅*,∅*,∅,0..n,0..n,0..n,∅,0..n,0..n,∅,∅,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,0..n,∅
+BibEntry,1.7,inline,∅,∅,∅,‡,‡,∅,∅,‡,∅,∅,∅,0..n,0..n,0..n,0..n,∅,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,0..n,∅
+Lbl,both,inline,∅,∅,0..n,‡,‡,0..n,0..n,‡,∅,0..n,∅,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,∅,∅,0..n,0..n,0..n,0..n,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,0..n,∅
+Code,1.7,inline,∅,0..n,0..n,‡,‡,0..n,0..n,‡,∅,∅,∅,0..n,0..n,0..n,∅,∅,0..n,0..n,0..n,0..n,∅,0..n,0..n,0..n,∅*,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,0..n,∅
+Span,both,inline,∅,∅,∅,∅,‡,∅,∅,‡,∅,∅,∅,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,∅,∅,0..n,0..n,0..n,∅,0..n,0..n,∅,∅,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,0..n,∅
+Link,both,grouping!block!inline,∅,0..n,0..n,‡,‡,0..n,0..n,‡,∅,∅,∅,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,∅,0..n,∅,∅,0..n,0..n,0..n,∅,0..n,0..n,∅,∅,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,0..n,∅
+Annot,both,grouping!block!inline,∅,0..n,0..n,‡,‡,0..n,0..n,‡,∅,∅,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,∅,∅,0..n,0..n,0..n,∅,0..n,0..n,∅,∅,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,0..n,∅
+Form,both,grouping!block!inline,∅,0..n,0..n,‡,‡,0..n,0..n,‡,∅,∅,∅,0..n,0..n,0..n,∅,∅,0..n,0..n,0..n,0..n,∅,0..n,∅*,∅*,∅,∅,0..n,0..n,0..n,∅,0..n,0..n,∅,∅,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,0..n,∅
+Ruby,both,inline,∅,∅,∅,∅,‡,∅,∅,‡,∅,∅,∅,0..n,0..n,0..n,∅,∅,0..n,0..n,0..n,0..n,∅,0..n,0..n,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,0..n,∅
+RB,both,inline,∅,∅,∅,∅,‡,∅,∅,‡,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,[a],∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅
+RT,both,inline,∅,∅,∅,∅,‡,∅,∅,‡,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,[a],∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅
+RP,both,inline,∅,∅,∅,∅,‡,∅,∅,‡,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,[a],∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅
+Warichu,both,inline,∅,∅,∅,∅,‡,∅,∅,‡,∅,∅,∅,0..n,0..n,0..n,∅,∅,0..n,0..n,0..n,0..n,∅,0..n,0..n,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,0..n,∅
+WT,both,inline,∅,∅,∅,∅,‡,∅,∅,‡,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,[b],∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅
+WP,both,inline,∅,∅,∅,∅,‡,∅,∅,‡,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,[b],∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅
+L,both,block!inline,∅,0..n,0..n,‡,‡,0..n,0..n,‡,∅,∅,0..n,0..n,∅,0..n,∅,∅,0..n,∅,∅,∅,∅,∅,∅*,∅*,∅*,∅,∅,∅,∅,∅,∅,∅,0..n,∅,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,0..n,∅
+LI,both,in L,∅,∅,∅,∅,‡,∅,∅,‡,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅
+LBody,both,in LI,∅,∅,∅,∅,‡,∅,∅,‡,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅
+Table,both,block,∅,0..n,0..n,‡,‡,0..n,0..n,‡,∅,∅,0..n,0..n,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅*,∅*,∅*,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,0..n,∅
+TR,both,Table,∅,∅,∅,∅,‡,∅,∅,‡,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,∅,0..n,0..n,0..n,∅,∅,∅,∅
+TH,both,Table,∅,∅,∅,∅,‡,∅,∅,‡,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅
+TD,both,Table,∅,∅,∅,∅,‡,∅,∅,‡,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅
+THead,both,Table,∅,∅,∅,∅,‡,∅,∅,‡,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..1,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅
+TBody,both,Table,∅,∅,∅,∅,‡,∅,∅,‡,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅
+TFoot,both,Table,∅,∅,∅,∅,‡,∅,∅,‡,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..1,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅
+Caption,both,grouping!block,∅,∅,0..n,‡,‡,0..n,0..1,‡,0..1,0..1,0..n,0..n,∅,∅*,∅,∅,∅,∅,∅,∅,∅,∅,∅*,∅*,0..1,∅,∅,∅,∅,∅,∅,∅,0..1,∅,0..1,0..1,∅,∅,∅,∅,∅,∅,∅,0..1,0..1,∅
+Figure,both,grouping!block!inline,∅,0..n,0..n,‡,‡,0..n,0..n,‡,∅,∅,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,∅,0..n,0..n,0..n,∅*,∅,∅,∅,∅,∅,∅,c,∅,∅,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,0..n,∅
+Formula,both,grouping!block!inline,∅,0..n,0..n,‡,‡,0..n,0..n,‡,∅,∅,0..n,0..n,0..n,0..n,∅,∅,0..n,0..n,0..n,0..n,∅,0..n,0..n,0..n,∅*,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,0..n,∅
+MC,both,---,∅,∅,∅,∅,∅,∅,0..n,‡,∅,∅,∅,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,‡,‡,‡,0..n,‡,‡,∅,0..n,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,0..n,∅
+%</parent-child>
+% \end{macrocode}
+% \section{The parent-child rules for pdf <2.0}
+% This csv contains the parent-child matrix for pdf <2.0.
+% The values are currently the strings used in the PDF reference.
+% This will perhaps change in future.
+% \begin{macrocode}
+%<*parent-child-2>
+%% \ProvidesExplFile {tagpdf-parent-child-2.csv} {2022-12-22} {0.98}
+,,,StructTreeRoot,Document,DocumentFragment,Art,Part,Div,Sect,Aside,BlockQuote,NonStruct,TOC,TOCI,Index,Private,Title,Sub,Quote,Note,Reference,BibEntry,P,Hn,H,Lbl,Code,Em,Strong,Span,Link,Annot,Form,Ruby,RB,RT,RP,Warichu,WT,WP,FENote,L,LI,LBody,Table,TR,TH,TD,THead,TBody,TFoot,Caption,Figure,Formula,math,mathml,Artifact,MC
+Document,both,document level,1,0..n,0..n,∅,‡,‡,∅,0..n,0..n,‡,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅
+DocumentFragment,2.0,document level,∅,0..n,0..n,0..n,‡,‡,0..n,0..n,0..n,‡,∅,∅,∅,0..n,∅,∅,∅,∅*,∅,∅,∅,∅,∅,∅,∅*,∅,∅,∅,∅*,∅*,∅,∅,∅,∅,∅,∅,∅,∅,∅*,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅*,∅,∅,∅,∅,0..n,∅
+Art,1.7,grouping,∅,0..n,0..n,∅,‡,‡,0..n,0..n,0..n,‡,∅,∅,∅,0..n,∅,∅,∅,0..n,∅,∅,∅,0..1,0..1,∅,∅,∅,∅,∅,0..n,0..n,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,∅,∅,∅,0..n,∅
+Part,both,grouping,∅,0..n,0..n,0..n,‡,‡,0..n,0..n,0..n,‡,∅,∅,0..n,0..n,0..n,∅,∅,0..n,∅,0..n,∅,∅,∅,∅,0..n,∅,∅,∅,∅*,∅*,∅*,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,0..n,0..n,0..n,∅,∅,0..n,∅
+Div,both,grouping,∅,0..n,0..n,0..n,‡,‡,0..n,0..n,0..n,‡,0..n,0..n,0..n,0..n,0..n,∅,∅,0..n,∅,0..n,∅,∅,∅,∅,0..n,∅,∅,∅,0..n,0..n,0..n,∅,∅,∅,∅,∅,∅,∅,0..n,∅,0..n,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,0..n,∅,∅,0..n,∅
+Sect,both,grouping,∅,0..n,0..n,0..n,‡,‡,0..n,0..n,0..n,‡,∅,∅,0..n,0..n,∅,∅,∅,0..n,∅,∅,∅,0..1,0..1,∅,∅,∅,∅,∅,0..n,0..n,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,∅,∅,∅,0..n,∅
+Aside,2.0,grouping,∅,0..n,0..n,0..n,‡,‡,0..n,∅,∅,‡,∅,∅,∅,0..n,0..n,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅*,∅*,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,0..n,0..n,0..n,∅,∅,0..n,∅
+BlockQuote,1.7,grouping?,∅,0..n,0..n,0..n,‡,‡,0..n,0..n,0..n,‡,∅,∅,∅,0..n,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅*,∅*,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,0..n,0..n,0..n,∅,∅,0..n,∅
+NonStruct,both,grouping,∅,0..n,0..n,0..n,‡,‡,0..n,0..n,0..n,‡,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,∅,∅,0..n,∅
+TOC,1.7,grouping,∅,0..n,0..n,0..n,‡,‡,0..n,0..n,0..n,‡,0..n,0..n,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅
+TOCI,1.7,TOC,∅,∅,∅,∅,‡,‡,∅,∅,∅,‡,0..n,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅
+Index,1.7,grouping?,∅,0..n,0..n,0..n,‡,‡,0..n,0..n,0..n,‡,∅,∅,∅,0..n,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,0..n,∅,∅,0..n,∅
+Private,1.7,grouping,∅,0..n,0..n,0..n,‡,‡,0..n,0..n,0..n,‡,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,∅,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,∅,∅,0..n,∅
+P,both,block,∅,0..n,0..n,0..n,‡,‡,0..n,0..n,0..n,‡,∅,0..n,0..n,0..n,0..n,∅,∅,0..n,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅*,∅*,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,0..n,∅,∅,0..n,∅
+Hn,both,block,∅,0..n,0..n,0..n,‡,‡,0..n,0..n,0..n,‡,∅,∅,0..n,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅*,∅*,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,0..n,∅,∅,0..n,∅
+H,both,block,∅,0..1,0..1,0..1,‡,‡,0..1,0..1,0..1,‡,∅,∅,0..n,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅*,∅*,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..1,∅,∅,0..1,0..1,∅,∅,∅,0..1,0..1,0..1,∅,∅,0..1,∅
+Title,2.0,grouping!block,∅,0..n,0..n,0..n,‡,‡,0..n,∅,0..n,‡,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅*,∅*,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅
+Sub,2.0,inline,∅,∅,∅,∅,‡,‡,∅,∅,∅,‡,∅,∅,∅,0..n,∅,∅,0..n,0..n,∅,∅,0..n,0..n,0..n,0..n,∅,0..n,0..n,0..n,0..n,0..n,∅,∅,0..n,0..n,0..n,∅,0..n,0..n,0..n,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,0..n,∅*,0..n,∅,∅,0..n,∅
+Quote,1.7,inline,∅,∅,∅,∅,‡,‡,∅,∅,∅,‡,∅,∅,∅,0..n,0..n,0..n,0..n,0..n,∅,∅,0..n,0..n,0..n,0..n,∅,0..n,0..n,0..n,0..n,0..n,∅,∅,0..n,0..n,0..n,∅,0..n,0..n,0..n,∅,∅,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,0..n,∅,∅,0..n,∅
+Note,1.7,inline,∅,0..n,0..n,0..n,‡,‡,0..n,0..n,0..n,‡,∅,∅,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,0..n,∅,∅,0..n,∅
+Reference,1.7,inline,∅,∅,∅,∅,‡,‡,∅,0..n,0..n,‡,∅,0..n,0..n,0..n,0..n,0..n,0..n,0..n,∅,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,∅*,∅*,∅,0..n,0..n,0..n,∅,0..n,0..n,0..n,∅,∅,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,0..n,∅,∅,0..n,∅
+BibEntry,1.7,inline,∅,∅,∅,∅,‡,‡,∅,∅,∅,‡,∅,∅,∅,0..n,0..n,0..n,0..n,0..n,0..n,∅,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,0..n,∅,∅,0..n,∅
+Lbl,both,inline,∅,∅,∅,0..n,‡,‡,0..n,0..n,0..n,‡,∅,0..n,∅,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,∅,∅,0..n,0..n,0..n,0..n,0..n,0..n,∅,∅,∅,∅,∅,∅,∅,0..n,∅,0..n,∅,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,0..n,∅,∅,0..n,∅
+Code,1.7,inline,∅,0..n,0..n,0..n,‡,‡,0..n,0..n,0..n,‡,∅,∅,∅,0..n,0..n,0..n,0..n,0..n,∅,∅,0..n,0..n,0..n,0..n,∅,0..n,0..n,0..n,0..n,0..n,∅*,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,0..n,∅,∅,0..n,∅
+Em,2.0,inline,∅,∅,∅,∅,∅,‡,∅,∅,∅,‡,∅,∅,∅,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,∅,∅,0..n,0..n,0..n,∅,0..n,0..n,0..n,∅,∅,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,0..n,∅,∅,0..n,∅
+Strong,2.0,inline,∅,∅,∅,∅,∅,‡,∅,∅,∅,‡,∅,∅,∅,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,∅,∅,0..n,0..n,0..n,∅,0..n,0..n,0..n,∅,∅,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,0..n,∅,∅,0..n,∅
+Span,both,inline,∅,∅,∅,∅,∅,‡,∅,∅,∅,‡,∅,∅,∅,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,∅,∅,0..n,0..n,0..n,∅,0..n,0..n,0..n,∅,∅,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,0..n,∅,∅,0..n,∅
+Link,both,grouping!block!inline,∅,0..n,0..n,0..n,‡,‡,0..n,0..n,0..n,‡,∅,∅,∅,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,∅,0..n,∅,∅,0..n,0..n,0..n,∅,0..n,0..n,0..n,∅,∅,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,0..n,∅,∅,0..n,∅
+Annot,both,grouping!block!inline,∅,0..n,0..n,0..n,‡,‡,0..n,0..n,0..n,‡,∅,∅,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,∅,∅,0..n,0..n,0..n,∅,0..n,0..n,0..n,∅,∅,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,0..n,∅,∅,0..n,∅
+Form,both,grouping!block!inline,∅,0..n,0..n,0..n,‡,‡,0..n,0..n,0..n,‡,∅,∅,∅,0..n,0..n,0..n,0..n,0..n,∅,∅,0..n,0..n,0..n,0..n,∅,0..n,0..n,0..n,∅*,∅*,∅,∅,0..n,0..n,0..n,∅,0..n,0..n,0..n,∅,∅,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,0..n,∅,∅,0..n,∅
+Ruby,both,inline,∅,∅,∅,∅,∅,‡,∅,∅,∅,‡,∅,∅,∅,0..n,0..n,0..n,0..n,0..n,∅,∅,0..n,0..n,0..n,0..n,∅,0..n,0..n,0..n,0..n,0..n,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,0..n,∅,∅,0..n,∅
+RB,both,inline,∅,∅,∅,∅,∅,‡,∅,∅,∅,‡,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,[a],∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅
+RT,both,inline,∅,∅,∅,∅,∅,‡,∅,∅,∅,‡,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,[a],∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅
+RP,both,inline,∅,∅,∅,∅,∅,‡,∅,∅,∅,‡,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,[a],∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅
+Warichu,both,inline,∅,∅,∅,∅,∅,‡,∅,∅,∅,‡,∅,∅,∅,0..n,0..n,0..n,0..n,0..n,∅,∅,0..n,0..n,0..n,0..n,∅,0..n,0..n,0..n,0..n,0..n,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,0..n,∅,∅,0..n,∅
+WT,both,inline,∅,∅,∅,∅,∅,‡,∅,∅,∅,‡,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,[b],∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅
+WP,both,inline,∅,∅,∅,∅,∅,‡,∅,∅,∅,‡,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,[b],∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅
+FENote,2.0,grouping!block!inline,∅,0..n,0..n,0..n,‡,‡,0..n,0..n,0..n,‡,∅,∅,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,∅,0..n,0..n,0..n,0..n,0..n,0..n,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,0..n,∅,∅,0..n,∅
+L,both,block!inline,∅,0..n,0..n,0..n,‡,‡,0..n,0..n,0..n,‡,∅,∅,0..n,0..n,0..n,0..n,∅,0..n,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅*,∅*,∅*,∅,∅,∅,∅,∅,∅,∅,0..n,0..n,∅,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,0..n,∅,∅,0..n,∅
+LI,both,in L,∅,∅,∅,∅,∅,‡,∅,∅,∅,‡,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅
+LBody,both,in LI,∅,∅,∅,∅,∅,‡,∅,∅,∅,‡,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅
+Table,both,block,∅,0..n,0..n,0..n,‡,‡,0..n,0..n,0..n,‡,∅,∅,0..n,0..n,0..n,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅*,∅*,∅*,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,0..n,∅,∅,0..n,∅
+TR,both,Table,∅,∅,∅,∅,∅,‡,∅,∅,∅,‡,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,∅,0..n,0..n,0..n,∅,∅,∅,∅,∅,0..n,∅
+TH,both,Table,∅,∅,∅,∅,∅,‡,∅,∅,∅,‡,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅
+TD,both,Table,∅,∅,∅,∅,∅,‡,∅,∅,∅,‡,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅
+THead,both,Table,∅,∅,∅,∅,∅,‡,∅,∅,∅,‡,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..1,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅
+TBody,both,Table,∅,∅,∅,∅,∅,‡,∅,∅,∅,‡,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅
+TFoot,both,Table,∅,∅,∅,∅,∅,‡,∅,∅,∅,‡,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..1,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅
+Caption,both,grouping!block,∅,∅,∅,0..n,‡,‡,0..n,0..1,0..1,‡,0..1,0..1,0..n,0..n,0..1,∅,∅,∅*,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅*,∅*,0..1,∅,∅,∅,∅,∅,∅,∅,∅*,0..1,∅,0..1,0..1,∅,∅,∅,∅,∅,∅,∅,0..1,0..1,∅,∅,0..n,∅
+Figure,both,grouping!block!inline,∅,0..n,0..n,0..n,‡,‡,0..n,0..n,0..n,‡,∅,∅,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,∅,0..n,0..n,0..n,0..n,0..n,∅*,∅,∅,∅,∅,∅,∅,c,0..n,∅,∅,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,0..n,∅,∅,0..n,∅
+Formula,both,grouping!block!inline,∅,0..n,0..n,0..n,‡,‡,0..n,0..n,0..n,‡,∅,∅,0..n,0..n,0..n,0..n,0..n,0..n,∅,∅,0..n,0..n,0..n,0..n,∅,0..n,0..n,0..n,0..n,0..n,∅*,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,0..n,∅,∅,0..n,∅
+Artifact,2.0,grouping!block!inline,∅,0..n,0..n,0..n,‡,‡,0..n,0..n,0..n,‡,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,∅,0..n,0..n,0..n,∅,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,∅,∅,0..n,∅
+math,2.0,?,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,0..n,∅
+mathml,2.0,?,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,0..n,0..n,∅
+MC,both,---,∅,∅,∅,∅,∅,∅,∅,0..n,0..n,‡,∅,∅,∅,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,0..n,‡,‡,‡,0..n,‡,‡,0..n,∅,0..n,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,0..n,∅,0..n,0..n,∅
+%</parent-child-2>
+% \end{implementation}
+% \PrintIndex
diff --git a/macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx b/macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx
index 42017f4836..ea460e0104 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.97, released 2022-08-24}
+% \date{Version 0.98, released 2022-12-22}
% \maketitle
% \begin{documentation}
% \end{documentation}
@@ -55,11 +55,11 @@
% \begin{macrocode}
%<@@=tag>
%<*generic>
-\ProvidesExplPackage {tagpdf-mc-code-generic} {2022-08-24} {0.97}
+\ProvidesExplPackage {tagpdf-mc-code-generic} {2022-12-22} {0.98}
{part of tagpdf - code related to marking chunks - generic mode}
%</generic>
%<*debug>
-\ProvidesExplPackage {tagpdf-debug-generic} {2022-08-24} {0.97}
+\ProvidesExplPackage {tagpdf-debug-generic} {2022-12-22} {0.98}
{part of tagpdf - debugging code related to marking chunks - generic mode}
%</debug>
% \end{macrocode}
@@ -683,6 +683,11 @@
\group_begin: %hm
\@@_check_mc_if_nested:
\bool_gset_true:N \g_@@_in_mc_bool
+% \end{macrocode}
+% set default MC tags to structure:
+% \begin{macrocode}
+ \tl_set_eq:NN \l_@@_mc_key_tag_tl \g_@@_struct_tag_tl
+ \tl_gset_eq:NN\g_@@_mc_key_tag_tl \g_@@_struct_tag_tl
\keys_set:nn { @@ / mc } {#1}
\bool_if:NTF \l_@@_mc_artifact_bool
{ %handle artifact
@@ -703,6 +708,23 @@
}
\bool_if:NF \l_@@_mc_key_stash_bool
{
+ \exp_args:NV\@@_struct_get_tag_info:nNN
+ \g_@@_struct_stack_current_tl
+ \l_@@_tmpa_tl
+ \l_@@_tmpb_tl
+ \@@_check_parent_child:VVnnN
+ \l_@@_tmpa_tl \l_@@_tmpb_tl
+ {MC}{}
+ \l_@@_parent_child_check_tl
+ \int_compare:nNnT {\l_@@_parent_child_check_tl}<{0}
+ {
+ \msg_warning:nnxxx
+ { tag }
+ {role-parent-child}
+ { \g_@@_struct_tag_tl/\g_@@_struct_tag_NS_tl }
+ { MC~(=~real content) }
+ { 'not~allowed'. }
+ }
\@@_mc_handle_stash:x { \int_use:N \c@g_@@_MCID_abs_int }
}
}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-mc-luacode.dtx b/macros/latex/contrib/tagpdf/tagpdf-mc-luacode.dtx
index fd4362227c..ca8645e76c 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-mc-luacode.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-mc-luacode.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.97, released 2022-08-24}
+% \date{Version 0.98, released 2022-12-22}
% \maketitle
% \begin{implementation}
% The code is splitted into three parts: code shared by all engines,
@@ -86,7 +86,7 @@
% \begin{macrocode}
%<@@=tag>
%<*luamode>
-\ProvidesExplPackage {tagpdf-mc-code-lua} {2022-08-24} {0.97}
+\ProvidesExplPackage {tagpdf-mc-code-lua} {2022-12-22} {0.98}
{tagpdf - mc code only for the luamode }
%</luamode>
% \end{macrocode}
@@ -182,8 +182,7 @@
% ,\@@_mc_lua_set_mc_type_attr:o
% ,\@@_mc_lua_unset_mc_type_attr:
% }
-% This takes a tag name, and sets the attributes to the related number.
-% It is not decided yet if this will be global or local, see the global-mc option.
+% This takes a tag name, and sets the attributes globally to the related number.
% \begin{macrocode}
\cs_new:Nn \@@_mc_lua_set_mc_type_attr:n % #1 is a tag name
{
@@ -300,6 +299,15 @@
\bool_set_false:N\l_@@_mc_artifact_bool
\tl_clear:N \l_@@_mc_key_properties_tl
\int_gincr:N \c@g_@@_MCID_abs_int
+% \end{macrocode}
+% set the default tag to the structure:
+% \begin{macrocode}
+ \tl_set_eq:NN \l_@@_mc_key_tag_tl \g_@@_struct_tag_tl
+ \tl_gset_eq:NN\g_@@_mc_key_tag_tl \g_@@_struct_tag_tl
+ \lua_now:e
+ {
+ ltx.@@.func.store_mc_data(\@@_get_mc_abs_cnt:,"tag","\g_@@_struct_tag_tl")
+ }
\keys_set:nn { @@ / mc }{ label={}, #1 }
%check that a tag or artifact has been used
\@@_check_mc_tag:N \l_@@_mc_key_tag_tl
@@ -315,6 +323,23 @@
% if not stashed record the absolute number
\bool_if:NF \l_@@_mc_key_stash_bool
{
+ \exp_args:NV\@@_struct_get_tag_info:nNN
+ \g_@@_struct_stack_current_tl
+ \l_@@_tmpa_tl
+ \l_@@_tmpb_tl
+ \@@_check_parent_child:VVnnN
+ \l_@@_tmpa_tl \l_@@_tmpb_tl
+ {MC}{}
+ \l_@@_parent_child_check_tl
+ \int_compare:nNnT {\l_@@_parent_child_check_tl}<{0}
+ {
+ \msg_warning:nnxxx
+ { tag }
+ {role-parent-child}
+ { \g_@@_struct_tag_tl/\g_@@_struct_tag_NS_tl }
+ { MC~(=~real content) }
+ { 'not~allowed'. }
+ }
\@@_mc_handle_stash:x { \@@_get_mc_abs_cnt: }
}
}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-mc-shared.dtx b/macros/latex/contrib/tagpdf/tagpdf-mc-shared.dtx
index 6ea1b35544..2e49c84725 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-mc-shared.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-mc-shared.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.97, released 2022-08-24}
+% \date{Version 0.98, released 2022-12-22}
% \maketitle
% \begin{documentation}
% \section{Public Commands}
@@ -174,7 +174,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-mc-code-shared} {2022-08-24} {0.97}
+\ProvidesExplPackage {tagpdf-mc-code-shared} {2022-12-22} {0.98}
{part of tagpdf - code related to marking chunks -
code shared by generic and luamode }
%</header>
diff --git a/macros/latex/contrib/tagpdf/tagpdf-roles.dtx b/macros/latex/contrib/tagpdf/tagpdf-roles.dtx
index 0b1899bf71..b17515882e 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-roles.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-roles.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.97, released 2022-08-24}
+% \date{Version 0.98, released 2022-12-22}
% \maketitle
% \begin{documentation}
% \begin{function}
@@ -55,106 +55,222 @@
% tag (rolemap-key),
% namespace (rolemap-key),
% role (rolemap-key),
-% role-namespace (rolemap-key)
+% role-namespace (rolemap-key),
% }
-% This key can be used in \cs{tagpdfsetup} to declare and rolemap new tags.
+% The \texttt{add-new-tag} key can be used in \cs{tagpdfsetup} to declare and rolemap new tags.
% It takes as value a key-value list or a simple |new-tag/old-tag|.
%
% The key-value list knows the following keys:
% \begin{description}
-% \item[\texttt{tag}] This is the name of the new type as it should then be used in \cs{tagstructbegin}.
-% \item[\texttt{namespace}] This is the namespace of the new type.
+% \item[\texttt{tag}] This is the name of the new tag as it should
+% then be used in \cs{tagstructbegin}.
+% \item[\texttt{namespace}] This is the namespace of the new tag.
% The value should be a shorthand of a namespace.
-% The allowed values are currently |pdf|, |pdf2|, |mathml| and |user|.
+% The allowed values are currently |pdf|, |pdf2|, |mathml|,|latex|, |latex-book| and |user|.
% The default value (and recommended value for a new tag) is |user|.
% The public name of the user namespace is |tag/NS/user|. This can be used to reference
% the namespace e.g. in attributes.
-% \item[\texttt{role}] This is the type the tag should be mapped too.
-% In a PDF 1.7 or earlier this is normally a type from the |pdf| set,
+% \item[\texttt{role}] This is the tag the tag should be mapped too.
+% In a PDF 1.7 or earlier this is normally a tag from the |pdf| set,
% in PDF 2.0 from the |pdf|, |pdf2| and |mathml| set.
-% It can also be a user type, or a still unknown type.
+% It can also be a user tag. The tag must be declared before, as the code retrieves
+% the class of the new tag from it.
% The PDF format allows mapping to be done transitively.
% But tagpdf can't/won't check such unusual role mapping.
-% \item[\texttt{role-namespace}] If the role is a known type
-% the default value is the default namespace of this type.
-% If the role is unknown, |user| is used and
-% the code hopes that the type will be defined later. With this key a specific
-% namespace can be forced.
+% \item[\texttt{role-namespace}] If the role is a known tag
+% the default value is the default namespace of this tag.
+% With this key a specific namespace can be forced.
% \end{description}
+%
+% Namespaces are mostly a PDF 2.0 property, but it doesn't harm to
+% set them also in a PDF 1.7 or earlier.
% \end{function}
% \end{documentation}
% \begin{implementation}
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-roles-code} {2022-08-24} {0.97}
+\ProvidesExplPackage {tagpdf-roles-code} {2022-12-22} {0.98}
{part of tagpdf - code related to roles and structure names}
%</header>
% \end{macrocode}
% \section{Code related to roles and structure names}
-% \subsection{Variables}
-% Tags have both a name (a string) and a number (for the lua attribute).
-% Testing a name is easier with a prop, while accessing with a number is
-% better done with a seq. So both are used and must be kept in sync if a new
-% tag is added. The number is only relevant for the MC type, tags with the same
-% name from different names spaces can have the same number.
-% \begin{variable}{\g_@@_role_tags_seq,\g_@@_role_tags_prop}
% \begin{macrocode}
%<*package>
-\@@_seq_new:N \g_@@_role_tags_seq %to get names (type/NS) from numbers
-\@@_prop_new:N \g_@@_role_tags_prop %to get numbers from names (type/NS)
% \end{macrocode}
-% \end{variable}
-% \begin{variable}{\g_@@_role_tags_NS_prop}
-% in pdf 2.0 tags belong to a name space. For every tag we store a default
+%
+%
+% \subsection{Variables}
+% Tags are used in structures (\cs{tagstructbegin}) and mc-chunks (\cs{tagmcbegin}).
+%
+% They have a name (a string), in lua a number (for the lua attribute), and
+% in PDF 2.0 belong to one or more name spaces, with one being the default
% name space.
-% The keys are the tags, the value shorthands like pdf2, or mathml.
+%
+% Tags of structures are classified, e.g. as grouping,
+% inline or block level structure (and a few special classes like lists and tables),
+% and must follow containments rules depending on their classification
+% (for example a inline structure can not contain
+% a block level structure). New tags inherit their
+% classification from their rolemapping to the standard namespaces (\texttt{pdf}
+% and/or \texttt{pdf2}).
+% We store this classification as it will probably
+% be needed for tests but currently the data is not much used.
+% The classification for math (and the containment rules)
+% is unclear currently and so not set.
+%
+% The attribute number is only relevant in lua and only for the MC chunks
+% (so tags with the same name from different names spaces can have the same number),
+% and so only stored if luatex is detected.
+%
+% Due to the namespaces the storing and processing of tags and there data
+% are different in various places for PDF~2.0 and PDF~<2.0, which makes
+% things a bit difficult and leads to some duplications. Perhaps at some time
+% there should be a clear split.
+%
+% This are the main variables used by the code:
+% \begin{description}
+% \item[\cs{g_@@_role_tags_NS_prop}]
+% This is the core list of tag names. It uses tags as keys
+% and the shorthand (e.g. pdf2, or mathml) of the default name space as value.
+%
+% In pdf 2.0 the value is needed in the structure dictionaries.
+%
+% \item[\cs{g_@@_role_tags_class_prop}]
+% This contains for each tag a classification type. It is used in pdf <2.0.
+%
+% \item[\cs{g_@@_role_NS_prop}] This contains the names spaces. The
+% values are the object references. They are used in pdf 2.0.
+%
+% \item[\cs{g_@@_role_rolemap_prop}]
+% This contains for each tag the role to a standard tag.
+% It is used in pdf<2.0 for tag checking and to fill at the end the
+% RoleMap dictionary.
+%
+% \item[\texttt{g\_@@\_role/RoleMap\_dict}] This dictionary contains
+% the standard rolemaps. It is relevant only for pdf <2.0.
+%
+% \item[\cs{g_@@_role_NS_<ns>_prop}] This prop contains the tags of
+% a name space and their role. The props are also use for
+% remapping. As value they contain two brace groups: tag and namespace.
+% In pdf <2.0 the namespace is empty.
+%
+% \item[\cs{g_@@_role_NS_<ns>_class_prop}]
+% This prop contains the tags of
+% a name space and their type. The value is only needed for pdf 2.0.
+%
+% \item[\cs{g_@@_role_index_prop}]
+% This prop contains the standard tags (pdf in pdf<2.0,
+% pdf,pdf2 + mathml in pdf 2.0) as keys, the values are a two-digit
+% number. These numbers are used to get the containment rule of two tags
+% from the intarray.
+%
+%\item[\cs{l_@@_role_debug_prop}] This property is used to pass some info
+% around for info messages or debugging.
+% \end{description}
+%
+%
+% \begin{variable}{\g_@@_role_tags_NS_prop}
+% This is the core list of tag names. It uses tags as keys
+% and the shorthand (e.g. pdf2, or mathml) of the default name space as value.
+% We store the default name space also in pdf <2.0, even if not needed:
+% it doesn't harm and simplifies the code.
% There is no need to access this from lua, so we use the standard prop commands.
% \begin{macrocode}
-\prop_new:N \g_@@_role_tags_NS_prop %to namespace info
+\prop_new:N \g_@@_role_tags_NS_prop
% \end{macrocode}
% \end{variable}
+%
+% \begin{variable}{\g_@@_role_tags_class_prop}
+% With pdf 2.0 we store the class in the NS dependant props.
+% With pdf <2.0 we store for now the type(s) of a tag in a common
+% prop.
+% Tags that are rolemapped should get the type from
+% the target.
+% \begin{macrocode}
+\prop_new:N \g_@@_role_tags_class_prop
+% \end{macrocode}
+% \end{variable}
+%
% \begin{variable}{\g_@@_role_NS_prop}
-% The standard names spaces are the following. The keys are the name
-% tagpdf will use, the urls are the identifier in the namespace object.
+% This holds the list of supported name spaces.
+% The keys are the name tagpdf will use, the values the object reference.
+% The urls identifier are stored in related dict object.
% \begin{description}
% \item[mathml] http://www.w3.org/1998/Math/MathML
% \item[pdf2] http://iso.org/pdf2/ssn
% \item[pdf] http://iso.org/pdf/ssn (default)
% \item[user] \cs{c_@@_role_userNS_id_str} (random id, for user tags)
+% \item[latex] https://www.latex-project.org/ns/dflt/2022
+% \item[latex-book] https://www.latex-project.org/ns/book/2022
+% \item[latex-inline] https://www.latex-project.org/ns/inline/2022
% \end{description}
% More namespaces are possible and
-% their objects references and the ones of the namespaces must be collected
+% their objects references and their rolemaps must be collected
% so that an array can be written to the StructTreeRoot at the end (see tagpdf-tree).
-% We use a prop to store also the object reference as it will be needed rather
+% We use a prop to store the object reference as it will be needed rather
% often.
% \begin{macrocode}
-\prop_new:N \g_@@_role_NS_prop % collect namespaces
+\prop_new:N \g_@@_role_NS_prop
% \end{macrocode}
% \end{variable}
-%
-% We need also a bunch of temporary variables:
+%
+% \begin{variable}{\g_@@_role_index_prop}
+% This prop contains the standard tags (pdf in pdf<2.0,
+% pdf,pdf2 + mathml in pdf 2.0) as keys, the values are a two-digit
+% number. These numbers are used to get the containment rule of two tags
+% from the intarray.
+% \begin{macrocode}
+\prop_new:N \g_@@_role_index_prop
+% \end{macrocode}
+% \end{variable}
+% \begin{variable}{\l_@@_role_debug_prop}
+% This variable is used to pass more infos to debug messages.
+% \begin{macrocode}
+\prop_new:N \l_@@_role_debug_prop
+% \end{macrocode}
+% \end{variable}
+% We need also a bunch of temporary variables.
% \begin{variable}
% {
-% \l_@@_role_tag_tmpa_tl
+% ,\l_@@_role_tag_tmpa_tl
% ,\l_@@_role_tag_namespace_tmpa_tl
% ,\l_@@_role_role_tmpa_tl
-% ,\l_@@_role_role_namespace_tmpa_tl
+% ,\l_@@_role_role_namespace_tmpa_tl
+% ,\l_@@_role_tmpa_seq
% }
% \begin{macrocode}
\tl_new:N \l_@@_role_tag_tmpa_tl
\tl_new:N \l_@@_role_tag_namespace_tmpa_tl
\tl_new:N \l_@@_role_role_tmpa_tl
-\tl_new:N \l_@@_role_role_namespace_tmpa_tl
+\tl_new:N \l_@@_role_role_namespace_tmpa_tl
+\seq_new:N\l_@@_role_tmpa_seq
% \end{macrocode}
% \end{variable}
-% \subsection{Namesspaces}
-% The following commands setups a names space. Namespace dictionaries can
+%
+% \subsection{Namespaces}
+% The following commands setups a name space.
+% With pdf version $<$2.0 this is only a prop with the
+% rolemap. With pdf 2.0 a dictionary must be set up.
+% Such a name space dictionaries can
% contain an optional |/Schema| and |/RoleMapNS| entry. We only reserve the
% objects but delay the writing to the finish code, where we can test if the
-% keys and the name spaces are actually needed
+% keys and the name spaces are actually needed.
% This commands setups objects for the name space and its rolemap. It also
-% initialize a prop to collect the rolemaps if needed.
+% initialize a dict to collect the rolemaps if needed, and a property
+% with the tags of the name space and their rolemapping for loops.
+% It is unclear if a reference to a schema file will be ever needed,
+% but it doesn't harm \ldots.
+%
+% \begin{variable}{g_@@_role/RoleMap_dict,\g_@@_role_rolemap_prop}
+% This is the object which contains the normal RoleMap. It is probably not
+% needed in pdf 2.0 but currently kept.
+% \begin{macrocode}
+\pdfdict_new:n {g_@@_role/RoleMap_dict}
+\prop_new:N \g_@@_role_rolemap_prop
+% \end{macrocode}
+% \end{variable}
+%
% \begin{function}{\@@_role_NS_new:nnn}
% \begin{syntax}
% \cs{@@_role_NS_new:nnn}\Arg{shorthand}\Arg{URI-ID}{Schema}
@@ -162,38 +278,51 @@
% \end{function}
% \begin{macro}{\@@_role_NS_new:nnn}
% \begin{macrocode}
-\cs_new_protected:Npn \@@_role_NS_new:nnn #1 #2 #3
- {
- \pdf_object_new:n {tag/NS/#1}
- \pdfdict_new:n {g_@@_role/Namespace_#1_dict}
- \pdf_object_new:n {@@/RoleMapNS/#1}
- \pdfdict_new:n {g_@@_role/RoleMapNS_#1_dict}
- \pdfdict_gput:nnn
- {g_@@_role/Namespace_#1_dict}
- {Type}
- {/Namespace}
- \pdf_string_from_unicode:nnN{utf8/string}{#2}\l_tmpa_str
- \tl_if_empty:NF \l_tmpa_str
- {
- \pdfdict_gput:nnx
- {g_@@_role/Namespace_#1_dict}
- {NS}
- {\l_tmpa_str}
- }
- %RoleMapNS is added in tree
- \tl_if_empty:nF {#3}
- {
- \pdfdict_gput:nnx{g_@@_role/Namespace_#1_dict}
- {Schema}{#3}
- }
- \prop_gput:Nnx \g_@@_role_NS_prop {#1}{\pdf_object_ref:n{tag/NS/#1}~}
- }
+\pdf_version_compare:NnTF < {2.0}
+ {
+ \cs_new_protected:Npn \@@_role_NS_new:nnn #1 #2 #3
+ {
+ \prop_new:c { g_@@_role_NS_#1_prop }
+ \prop_new:c { g_@@_role_NS_#1_class_prop }
+ \prop_gput:Nnx \g_@@_role_NS_prop {#1}{}
+ }
+ }
+ {
+ \cs_new_protected:Npn \@@_role_NS_new:nnn #1 #2 #3
+ {
+ \prop_new:c { g_@@_role_NS_#1_prop }
+ \prop_new:c { g_@@_role_NS_#1_class_prop }
+ \pdf_object_new:n {tag/NS/#1}
+ \pdfdict_new:n {g_@@_role/Namespace_#1_dict}
+ \pdf_object_new:n {@@/RoleMapNS/#1}
+ \pdfdict_new:n {g_@@_role/RoleMapNS_#1_dict}
+ \pdfdict_gput:nnn
+ {g_@@_role/Namespace_#1_dict}
+ {Type}
+ {/Namespace}
+ \pdf_string_from_unicode:nnN{utf8/string}{#2}\l_@@_tmpa_str
+ \tl_if_empty:NF \l_@@_tmpa_str
+ {
+ \pdfdict_gput:nnx
+ {g_@@_role/Namespace_#1_dict}
+ {NS}
+ {\l_@@_tmpa_str}
+ }
+ %RoleMapNS is added in tree
+ \tl_if_empty:nF {#3}
+ {
+ \pdfdict_gput:nnx{g_@@_role/Namespace_#1_dict}
+ {Schema}{#3}
+ }
+ \prop_gput:Nnx \g_@@_role_NS_prop {#1}{\pdf_object_ref:n{tag/NS/#1}~}
+ }
+ }
% \end{macrocode}
% \end{macro}
% We need an id for the user space. For the tests it should be possible
% to set it to a fix value. So we use random numbers which can
% be fixed by setting a seed. We fake a sort of
-% GUID but not try to be really exact as it doesn't matter ...
+% GUID but do not try to be really exact as it doesn't matter ...
%
% \begin{variable}{\c_@@_role_userNS_id_str}
% \begin{macrocode}
@@ -213,423 +342,126 @@
}
% \end{macrocode}
% \end{variable}
-% Now we setup the standard names spaces. Currently only if we detect pdf2.0 but
-% this will perhaps have to change if the structure code gets to messy.
+% Now we setup the standard names spaces.
+% The mathml space is currently only loaded for pdf 2.0.
% \begin{macrocode}
-\pdf_version_compare:NnT > {1.9}
- {
- \@@_role_NS_new:nnn {pdf} {http://iso.org/pdf/ssn}{}
- \@@_role_NS_new:nnn {pdf2} {http://iso.org/pdf2/ssn}{}
+\@@_role_NS_new:nnn {pdf} {http://iso.org/pdf/ssn}{}
+\@@_role_NS_new:nnn {pdf2} {http://iso.org/pdf2/ssn}{}
+\pdf_version_compare:NnF < {2.0}
+ {
\@@_role_NS_new:nnn {mathml}{http://www.w3.org/1998/Math/MathML}{}
- %\@@_role_NS_new:nnn {latex} {https://www.latex-project.org/ns/2022}{}
- \exp_args:Nnx
- \@@_role_NS_new:nnn {user}{\c_@@_role_userNS_id_str}{}
- }
+ }
+\@@_role_NS_new:nnn {latex} {https://www.latex-project.org/ns/dflt/2022}{}
+\@@_role_NS_new:nnn {latex-book} {https://www.latex-project.org/ns/book/2022}{}
+\@@_role_NS_new:nnn {latex-inline} {https://www.latex-project.org/ns/inline/2022}{}
+\exp_args:Nnx
+ \@@_role_NS_new:nnn {user}{\c_@@_role_userNS_id_str}{}
% \end{macrocode}
%
-% \subsection{Data}
-% In this section we setup the standard data.
-% At first the list of structure types. We split them in three lists,
-% the tags with which are both in the pdf and pdf2 namespace,
-% the one only in pdf and the one with the tags only in pdf2.
-% We also define a rolemap for the pdfII only type to pdf so that
-% they can always be used.
-% \begin{variable}
-% {
-% \c_@@_role_sttags_pdf_pdfII_clist,
-% \c_@@_role_sttags_only_pdf_clist,
-% \c_@@_role_sttags_only_pdfII_clist,
-% \c_@@_role_sttags_mathml_clist,
-% \c_@@_role_sttags_pdfII_to_pdf_prop
-% }
+% \subsection{Adding a new tag}
+% Both when reading the files and when setting up a tag manually
+% we have to store data in various places.
+%
+% \begin{macro}{\@@_role_alloctag:nnn}
+% This command allocates a new tag without role mapping. In the
+% lua backend it will also record the attribute value.
% \begin{macrocode}
-%
-\clist_const:Nn \c_@@_role_sttags_pdf_pdfII_clist
- {
- Document, %A complete document. This is the root element
- %of any structure tree containing
- %multiple parts or multiple articles.
- Part, %A large-scale division of a document.
- Sect, %A container for grouping related content elements.
- Div, %A generic block-level element or group of elements
- Caption, %A brief portion of text describing a table or figure.
- Index,
- NonStruct, %probably not needed
- H,
- H1,
- H2,
- H3,
- H4,
- H5,
- H6,
- P,
- L, %list
- LI, %list item (around label and list item body)
- Lbl, %list label
- LBody, %list item body
- Table,
- TR, %table row
- TH, %table header cell
- TD, %table data cell
- THead, %table header (n rows)
- TBody, %table rows
- TFoot, %table footer
- Span, %generic inline marker
- Link, %
- Annot,
- Figure,
- Formula,
- Form,
- % ruby warichu etc ..
- Ruby,
- RB,
- RT,
- Warichu,
- WT,
- WP,
- Artifact % only MC-tag ?...
- }
-
-\clist_const:Nn \c_@@_role_sttags_only_pdf_clist
- {
- Art, %A relatively self-contained body of text
- %constituting a single narrative or exposition
- BlockQuote, %A portion of text consisting of one or more paragraphs
- %attributed to someone other than the author of the
- %surrounding text.
- TOC, %A list made up of table of contents item entries
- %(structure tag TOCI; see below) and/or other
- %nested table of contents entries
- TOCI, %An individual member of a table of contents.
- %This entry's children can be any of the following structure tags:
- %Lbl,Reference,NonStruct,P,TOC
- Index,
- Private,
- Quote, %inline quote
- Note, %footnote, endnote. Lbl can be child
- Reference, %A citation to content elsewhere in the document.
- BibEntry, %bibentry
- Code
- }
-
-\clist_const:Nn \c_@@_role_sttags_only_pdfII_clist
- {
- DocumentFragment
- ,Aside
- ,H7
- ,H8
- ,H9
- ,H10
- ,Title
- ,FENote
- ,Sub
- ,Em
- ,Strong
- ,Artifact
- }
-
-\clist_const:Nn \c_@@_role_sttags_mathml_clist
- {
- abs
- ,and
- ,annotation
- ,apply
- ,approx
- ,arccos
- ,arccosh
- ,arccot
- ,arccoth
- ,arccsc
- ,arccsch
- ,arcsec
- ,arcsech
- ,arcsin
- ,arcsinh
- ,arctan
- ,arctanh
- ,arg
- ,bind
- ,bvar
- ,card
- ,cartesianproduct
- ,cbytes
- ,ceiling
- ,cerror
- ,ci
- ,cn
- ,codomain
- ,complexes
- ,compose
- ,condition
- ,conjugate
- ,cos
- ,cosh
- ,cot
- ,coth
- ,cs
- ,csc
- ,csch
- ,csymbol
- ,curl
- ,declare
- ,degree
- ,determinant
- ,diff
- ,divergence
- ,divide
- ,domain
- ,domainofapplication
- ,emptyset
- ,eq
- ,equivalent
- ,eulergamma
- ,exists
- ,exp
- ,exponentiale
- ,factorial
- ,factorof
- ,false
- ,floor
- ,fn
- ,forall
- ,gcd
- ,geq
- ,grad
- ,gt
- ,ident
- ,image
- ,imaginary
- ,imaginaryi
- ,implies
- ,in
- ,infinity
- ,int
- ,integers
- ,intersect
- ,interval
- ,inverse
- ,lambda
- ,laplacian
- ,lcm
- ,leq
- ,limit
- ,ln
- ,log
- ,logbase
- ,lowlimit
- ,lt
- ,maction
- ,maligngroup
- ,malignmark
- ,math
- ,matrix
- ,matrixrow
- ,max
- ,mean
- ,median
- ,menclose
- ,merror
- ,mfenced
- ,mfrac
- ,mglyph
- ,mi
- ,min
- ,minus
- ,mlabeledtr
- ,mlongdiv
- ,mmultiscripts
- ,mn
- ,mo
- ,mode
- ,moment
- ,momentabout
- ,mover
- ,mpadded
- ,mphantom
- ,mprescripts
- ,mroot
- ,mrow
- ,ms
- ,mscarries
- ,mscarry
- ,msgroup
- ,msline
- ,mspace
- ,msqrt
- ,msrow
- ,mstack
- ,mstyle
- ,msub
- ,msubsup
- ,msup
- ,mtable
- ,mtd
- ,mtext
- ,mtr
- ,munder
- ,munderover
- ,naturalnumbers
- ,neq
- ,none
- ,not
- ,notanumber
- ,notin
- ,notprsubset
- ,notsubset
- ,or
- ,otherwise
- ,outerproduct
- ,partialdiff
- ,pi
- ,piece
- ,piecewise
- ,plus
- ,power
- ,primes
- ,product
- ,prsubset
- ,quotient
- ,rationals
- ,real
- ,reals
- ,reln
- ,rem
- ,root
- ,scalarproduct
- ,sdev
- ,sec
- ,sech
- ,selector
- ,semantics
- ,sep
- ,set
- ,setdiff
- ,share
- ,sin
- ,sinh
- ,subset
- ,sum
- ,tan
- ,tanh
- ,tendsto
- ,times
- ,transpose
- ,true
- ,union
- ,uplimit
- ,variance
- ,vector
- ,vectorproduct
- ,xor
- }
-
-\prop_const_from_keyval:Nn \c_@@_role_sttags_pdfII_to_pdf_prop
+\pdf_version_compare:NnTF < {2.0}
{
- DocumentFragment = Art,
- Aside = Note,
- Title = H1,
- Sub = Span,
- H7 = H6 ,
- H8 = H6 ,
- H9 = H6 ,
- H10 = H6,
- FENote= Note,
- Em = Span,
- Strong= Span,
- }
-% \end{macrocode}
-% \end{variable}
-% We fill the structure tags in to the seq. We allow all pdf1.7 and pdf2.0,
-% and role map if needed the 2.0 tags.
-% \begin{macrocode}
-% get tag name from number: \seq_item:Nn \g_@@_role_tags_seq { n }
-% get tag number from name: \prop_item:Nn \g_@@_role_tags_prop { name }
-
-\clist_map_inline:Nn \c_@@_role_sttags_pdf_pdfII_clist
- {
- \@@_seq_gput_right:Nn \g_@@_role_tags_seq { #1 }
- \prop_gput:Nnn \g_@@_role_tags_NS_prop { #1 }{ pdf2 }
- }
-\clist_map_inline:Nn \c_@@_role_sttags_only_pdf_clist
- {
- \@@_seq_gput_right:Nn \g_@@_role_tags_seq { #1 }
- \prop_gput:Nnn \g_@@_role_tags_NS_prop { #1 }{ pdf }
- }
-\clist_map_inline:Nn \c_@@_role_sttags_only_pdfII_clist
- {
- \@@_seq_gput_right:Nn \g_@@_role_tags_seq { #1 }
- \prop_gput:Nnn \g_@@_role_tags_NS_prop { #1 }{ pdf2 }
- }
-\pdf_version_compare:NnT > {1.9}
- {
- \clist_map_inline:Nn \c_@@_role_sttags_mathml_clist
+ \sys_if_engine_luatex:TF
+ {
+ \cs_new_protected:Npn \@@_role_alloctag:nnn #1 #2 #3 %#1 tagname, ns, type
{
- \@@_seq_gput_right:Nn \g_@@_role_tags_seq { #1 }
- \prop_gput:Nnn \g_@@_role_tags_NS_prop { #1 }{ mathml }
- }
+ \lua_now:e { ltx.@@.func.alloctag ('#1') }
+ \prop_gput:Nnn \g_@@_role_tags_NS_prop {#1}{#2}
+ \prop_gput:cnn {g_@@_role_NS_#2_prop} {#1}{{}{}}
+ \prop_gput:Nnn \g_@@_role_tags_class_prop {#1}{#3}
+ \prop_gput:cnn {g_@@_role_NS_#2_class_prop} {#1}{--UNUSED--}
+ }
+ }
+ {
+ \cs_new_protected:Npn \@@_role_alloctag:nnn #1 #2 #3
+ {
+ \prop_gput:Nnn \g_@@_role_tags_NS_prop {#1}{#2}
+ \prop_gput:cnn {g_@@_role_NS_#2_prop} {#1}{{}{}}
+ \prop_gput:Nnn \g_@@_role_tags_class_prop {#1}{#3}
+ \prop_gput:cnn {g_@@_role_NS_#2_class_prop} {#1}{--UNUSED--}
+ }
+ }
}
-% \end{macrocode}
-% For luatex and the MC we need a name/number relation.
-% The name space is not relevant.
-% \begin{macrocode}
-\int_step_inline:nnnn { 1 }{ 1 }{ \seq_count:N \g_@@_role_tags_seq }
{
- \@@_prop_gput:Nxn \g_@@_role_tags_prop
- {
- \seq_item:Nn \g_@@_role_tags_seq { #1 }
- }
- { #1 }
- }
+ \sys_if_engine_luatex:TF
+ {
+ \cs_new_protected:Npn \@@_role_alloctag:nnn #1 #2 #3 %#1 tagname, ns, type
+ {
+ \lua_now:e { ltx.@@.func.alloctag ('#1') }
+ \prop_gput:Nnn \g_@@_role_tags_NS_prop {#1}{#2}
+ \prop_gput:cnn {g_@@_role_NS_#2_prop} {#1}{{}{}}
+ \prop_gput:Nnn \g_@@_role_tags_class_prop {#1}{--UNUSED--}
+ \prop_gput:cnn {g_@@_role_NS_#2_class_prop} {#1}{#3}
+ }
+ }
+ {
+ \cs_new_protected:Npn \@@_role_alloctag:nnn #1 #2 #3
+ {
+ \prop_gput:Nnn \g_@@_role_tags_NS_prop {#1}{#2}
+ \prop_gput:cnn {g_@@_role_NS_#2_prop} {#1}{{}{}}
+ \prop_gput:Nnn \g_@@_role_tags_class_prop {#1}{--UNUSED--}
+ \prop_gput:cnn {g_@@_role_NS_#2_class_prop} {#1}{#3}
+ }
+ }
+ }
+\cs_generate_variant:Nn \@@_role_alloctag:nnn {nnV}
% \end{macrocode}
-%
-% \subsection{Adding new tags and rolemapping}
+% \end{macro}
%
% \subsubsection{pdf 1.7 and earlier}
-% With this versions only RoleMap is filled.
-% At first the dictionary:
-% \begin{variable}{g_@@_role/RoleMap_dict}
-% \begin{macrocode}
-\pdfdict_new:n {g_@@_role/RoleMap_dict}
-% \end{macrocode}
-% \end{variable}
+%
% \begin{macro}{\@@_role_add_tag:nn}
% The pdf 1.7 version has only two arguments: new and rolemap name.
-% To make pdf 2.0 types usable we directly define a rolemapping for them.
-%
+% The role must be an existing tag and should not be empty.
+% We allow to change the role of an existing tag: as the rolemap is written
+% at the end not confusion can happen.
% \begin{macrocode}
-\cs_new_protected:Nn \@@_role_add_tag:nn %(new) name, reference to old
+\cs_new_protected:Nn \@@_role_add_tag:nn % (new) name, reference to old
{
- \prop_if_in:NnF \g_@@_role_tags_prop {#1}
+% \end{macrocode}
+% checks and messages
+% \begin{macrocode}
+ \@@_check_add_tag_role:nn {#1}{#2}
+ \prop_if_in:NnF \g_@@_role_tags_NS_prop {#1}
{
\int_compare:nNnT {\l_@@_loglevel_int} > { 0 }
{
\msg_info:nnn { tag }{new-tag}{#1}
}
- \@@_seq_gput_right:Nn \g_@@_role_tags_seq { #1 }
- \@@_prop_gput:Nnx \g_@@_role_tags_prop { #1 }
- {
- \seq_count:N \g_@@_role_tags_seq
- }
- \prop_gput:Nnn \g_@@_role_tags_NS_prop { #1 }{ user }
}
- \@@_check_add_tag_role:nn {#1}{#2}
+% \end{macrocode}
+% now the addition
+% \begin{macrocode}
+ \prop_get:NnN \g_@@_role_tags_class_prop {#2}\l_@@_tmpa_tl
+ \quark_if_no_value:NT \l_@@_tmpa_tl
+ {
+ \tl_set:Nn\l_@@_tmpa_tl{--UNKNOWN--}
+ }
+ \@@_role_alloctag:nnV {#1}{user}\l_@@_tmpa_tl
+% \end{macrocode}
+% We resolve rolemapping recursively so that all targets are stored as standard
+% tags.
+% \begin{macrocode}
\tl_if_empty:nF { #2 }
{
- \pdfdict_gput:nnx {g_@@_role/RoleMap_dict}
- {#1}
- {\pdf_name_from_unicode_e:n{#2}}
+ \prop_get:NnN \g_@@_role_rolemap_prop {#2}\l_@@_tmpa_tl
+ \quark_if_no_value:NTF \l_@@_tmpa_tl
+ {
+ \prop_gput:Nnx \g_@@_role_rolemap_prop {#1}{\tl_to_str:n{#2}}
+ }
+ {
+ \prop_gput:NnV \g_@@_role_rolemap_prop {#1}\l_@@_tmpa_tl
+ }
}
}
-\cs_generate_variant:Nn \@@_role_add_tag:nn {VV}
-
-\pdf_version_compare:NnT < {2.0}
- {
- \prop_map_inline:Nn \c_@@_role_sttags_pdfII_to_pdf_prop
- {
- \@@_role_add_tag:nn {#1}{#2}
- }
- }
-
+\cs_generate_variant:Nn \@@_role_add_tag:nn {VV,ne}
% \end{macrocode}
% \end{macro}
% \subsubsection{The pdf 2.0 version}
@@ -639,17 +471,17 @@
% \begin{macrocode}
\cs_new_protected:Nn \@@_role_add_tag:nnnn %tag/namespace/role/namespace
{
+ \@@_check_add_tag_role:nnn {#1/#2}{#3}{#4}
\int_compare:nNnT {\l_@@_loglevel_int} > { 0 }
{
\msg_info:nnn { tag }{new-tag}{#1}
}
- \@@_seq_gput_right:Nn \g_@@_role_tags_seq { #1 }
- \@@_prop_gput:Nnx \g_@@_role_tags_prop { #1 }
- {
- \seq_count:N \g_@@_role_tags_seq
- }
- \prop_gput:Nnn \g_@@_role_tags_NS_prop { #1 }{ #2 }
- \@@_check_add_tag_role:nn {#1}{#3}
+ \prop_get:cnN { g_@@_role_NS_#4_class_prop } {#3}\l_@@_tmpa_tl
+ \quark_if_no_value:NT \l_@@_tmpa_tl
+ {
+ \tl_set:Nn\l_@@_tmpa_tl{--UNKNOWN--}
+ }
+ \@@_role_alloctag:nnV {#1}{#2}\l_@@_tmpa_tl
\pdfdict_gput:nnx {g_@@_role/RoleMapNS_#2_dict}{#1}
{
[
@@ -658,10 +490,697 @@
\pdf_object_ref:n {tag/NS/#4}
]
}
+% \end{macrocode}
+% We resolve rolemapping recursively so that all targets are stored as standard
+% tags for the tests.
+% \begin{macrocode}
+ \tl_if_empty:nF { #2 }
+ {
+ \prop_get:cnN { g__tag_role_NS_#4_prop } {#3}\l_@@_tmpa_tl
+ \quark_if_no_value:NTF \l_@@_tmpa_tl
+ {
+ \prop_gput:cnx { g__tag_role_NS_#2_prop } {#1}
+ {{\tl_to_str:n{#3}}{\tl_to_str:n{#4}}}
+ }
+ {
+ \prop_gput:cno { g__tag_role_NS_#2_prop } {#1}{\l_@@_tmpa_tl}
+ }
+ }
}
\cs_generate_variant:Nn \@@_role_add_tag:nnnn {VVVV}
% \end{macrocode}
% \end{macro}
+%
+% \subsection{Helper command to read the data from files}
+% In this section we setup the helper command to read namespace files.
+
+% \begin{macro}{\@@_role_read_namespace_line:nw}
+% This command will process a line in the name space file.
+% The first argument is the name of the name space.
+% The definition differ for pdf 2.0. as we have proper name spaces there.
+% With pdf<2.0 not special name spaces shouldn't update the default role or add to the rolemap
+% again. We use a boolean here.
+% \begin{macrocode}
+\bool_new:N\l_@@_role_update_bool
+\bool_set_true:N \l_@@_role_update_bool
+% \end{macrocode}
+%
+% \begin{macrocode}
+\pdf_version_compare:NnTF < {2.0}
+ {
+ \cs_new_protected:Npn \@@_role_read_namespace_line:nw #1#2,#3,#4,#5,#6\q_stop %
+ % #1 NS, #2 tag, #3 rolemap, #4 NS rolemap #5 type
+ {
+ \tl_if_empty:nF { #2 }
+ {
+ \bool_if:NTF \l_@@_role_update_bool
+ {
+ \tl_if_empty:nTF {#5}
+ {
+ \prop_get:NnN \g_@@_role_tags_class_prop {#3}\l_@@_tmpa_tl
+ \quark_if_no_value:NT \l_@@_tmpa_tl
+ {
+ \tl_set:Nn\l_@@_tmpa_tl{--UNKNOWN--}
+ }
+ }
+ {
+ \tl_set:Nn \l_@@_tmpa_tl {#5}
+ }
+ \@@_role_alloctag:nnV {#2}{#1}\l_@@_tmpa_tl
+ \tl_if_empty:nF {#3}
+ {
+ \@@_role_add_tag:nn {#2}{#3}
+ }
+ \prop_gput:cnn {g_@@_role_NS_#1_prop} {#2}{{#3}{}}
+ }
+ {
+ \prop_gput:cnn {g_@@_role_NS_#1_prop} {#2}{{#3}{}}
+ \prop_gput:cnn {g_@@_role_NS_#1_class_prop} {#2}{--UNUSED--}
+ }
+ }
+ }
+ }
+ {
+ \cs_new_protected:Npn \@@_role_read_namespace_line:nw #1#2,#3,#4,#5,#6\q_stop %
+ % #1 NS, #2 tag, #3 rolemap, #4 NS rolemap #5 type
+ {
+ \tl_if_empty:nF {#2}
+ {
+ \tl_if_empty:nTF {#5}
+ {
+ \prop_get:cnN { g_@@_role_NS_#4_class_prop } {#3}\l_@@_tmpa_tl
+ \quark_if_no_value:NT \l_@@_tmpa_tl
+ {
+ \tl_set:Nn\l_@@_tmpa_tl{--UNKNOWN--}
+ }
+ }
+ {
+ \tl_set:Nn \l_@@_tmpa_tl {#5}
+ }
+ \@@_role_alloctag:nnV {#2}{#1}\l_@@_tmpa_tl
+ \bool_lazy_and:nnT
+ { ! \tl_if_empty_p:n {#3} }{! \str_if_eq_p:nn {#1}{pdf2}}
+ {
+ \@@_role_add_tag:nnnn {#2}{#1}{#3}{#4}
+ \prop_gput:cnn {g_@@_role_NS_#1_prop} {#2}{{#3}{#4}}
+ }
+ }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\@@_role_read_namespace:n}
+% This command reads the namespace file.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_role_read_namespace:n #1 %name of namespace
+ {
+ \prop_if_exist:cF {g__tag_role_NS_#1_prop}
+ { \msg_warning:nnn {tag}{namespace-unknown}{#1} }
+ \file_if_exist:nTF { tagpdf-ns-#1.def}
+ {
+ \ior_open:Nn \g_tmpa_ior {tagpdf-ns-#1.def}
+ \msg_info:nnn {tag}{read-namespace}{#1}
+ \ior_map_inline:Nn \g_tmpa_ior
+ {
+ \@@_role_read_namespace_line:nw {#1} ##1,,,,\q_stop
+ }
+ \ior_close:N\g_tmpa_ior
+ }
+ {
+ \msg_warning:nnn{tag}{namespace-missing}{#1}
+ }
+ }
+
+% \end{macrocode}
+% \end{macro}
+%
+
+%
+% \subsection{Reading the default data}
+% The order is important as we want pdf2 and latex as default.
+% \begin{macrocode}
+\@@_role_read_namespace:n {pdf}
+\@@_role_read_namespace:n {pdf2}
+\pdf_version_compare:NnF < {2.0}
+ {\@@_role_read_namespace:n {mathml}}
+\bool_set_false:N\l_@@_role_update_bool
+\@@_role_read_namespace:n {latex-inline}
+\@@_role_read_namespace:n {latex-book}
+\bool_set_true:N\l_@@_role_update_bool
+\@@_role_read_namespace:n {latex}
+\@@_role_read_namespace:n {pdf}
+\@@_role_read_namespace:n {pdf2}
+% \end{macrocode}
+%
+% But is the class provides a \cs{chapter} command then we switch
+% \begin{macrocode}
+\pdf_version_compare:NnTF < {2.0}
+ {
+ \hook_gput_code:nnn {begindocument}{tagpdf}
+ {
+ \cs_if_exist:NT \chapter
+ {
+ \prop_map_inline:cn{g_@@_role_NS_latex-book_prop}
+ {
+ \@@_role_add_tag:ne {#1}{\use_i:nn #2\c_empty_tl\c_empty_tl}
+ }
+ }
+ }
+ }
+ {
+ \hook_gput_code:nnn {begindocument}{tagpdf}
+ {
+ \cs_if_exist:NT \chapter
+ {
+ \prop_map_inline:cn{g_@@_role_NS_latex-book_prop}
+ {
+ \prop_gput:Nnn \g_@@_role_tags_NS_prop { #1 }{ latex-book }
+ }
+ }
+ }
+ }
+% \end{macrocode}
+% \subsection{Parent-child rules}
+% PDF define various rules about which tag can be a child of another tag.
+% The following code implements the matrix to allow to use it in tests.
+% \begin{variable}{\g_@@_role_parent_child_intarray}
+% This intarray will store the rule as a number. For parent nm and child ij
+% (n,m,i,j digits) the rule is at position nmij. As we have around 56 tags,
+% we need roughly a size 6000.
+% \begin{macrocode}
+\intarray_new:Nn \g_@@_role_parent_child_intarray {6000}
+% \end{macrocode}
+% \end{variable}
+% \begin{macro}{\c_@@_role_rules_prop,\c_@@_role_rules_num_prop}
+% These two properties map the rule strings to numbers and back.
+% There are in tagpdf-data.dtx near the csv files for easier maintenance.
+% \end{macro}
+%
+% \begin{macro}{\@@_store_parent_child_rule:nnn}
+% The helper command is used to store the rule.
+% It assumes that parent and child are given as 2-digit number!
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_store_parent_child_rule:nnn #1 #2 #3 % num parent, num child, #3 string
+ {
+ \intarray_gset:Nnn \g_@@_role_parent_child_intarray
+ { #1#2 }{0\prop_item:Nn\c_@@_role_rules_prop{#3}}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Reading in the csv-files}
+% This counter will be used to identify the first (non-comment) line
+% \begin{macrocode}
+\int_zero:N \l_@@_tmpa_int
+% \end{macrocode}
+% Open the file depending on the PDF version
+% \begin{macrocode}
+\pdf_version_compare:NnTF < {2.0}
+ {
+ \ior_open:Nn \g_tmpa_ior {tagpdf-parent-child.csv}
+ }
+ {
+ \ior_open:Nn \g_tmpa_ior {tagpdf-parent-child-2.csv}
+ }
+% \end{macrocode}
+
+% Now the main loop over the file
+% \begin{macrocode}
+\ior_map_inline:Nn \g_tmpa_ior
+ {
+% \end{macrocode}
+% ignore lines containing only comments
+% \begin{macrocode}
+ \tl_if_empty:nF{#1}
+ {
+% \end{macrocode}
+% count the lines ...
+% \begin{macrocode}
+ \int_incr:N\l_@@_tmpa_int
+% \end{macrocode}
+% put the line into a seq. Attention! empty cells are dropped.
+% \begin{macrocode}
+ \seq_set_from_clist:Nn\l_@@_tmpa_seq { #1 }
+ \int_compare:nNnTF {\l_@@_tmpa_int}=1
+% \end{macrocode}
+% This handles the header line. It gives the tags 2-digit numbers
+% \begin{macrocode}
+ {
+ \seq_map_indexed_inline:Nn \l_@@_tmpa_seq
+ {
+ \prop_gput:Nnx\g_@@_role_index_prop
+ {##2}
+ {\int_compare:nNnT{##1}<{10}{0}##1}
+ }
+ }
+% \end{macrocode}
+% now the data lines.
+% \begin{macrocode}
+ {
+ \seq_set_from_clist:Nn\l_@@_tmpa_seq { #1 }
+% \end{macrocode}
+% get the name of the child tag from the first column
+% \begin{macrocode}
+ \seq_pop_left:NN\l_@@_tmpa_seq\l_@@_tmpa_tl
+% \end{macrocode}
+% get the number of the child, and store it in \cs{l_@@_tmpb_tl}
+% \begin{macrocode}
+ \prop_get:NVN \g_@@_role_index_prop \l_@@_tmpa_tl \l_@@_tmpb_tl
+% \end{macrocode}
+% remove column 2+3
+% \begin{macrocode}
+ \seq_pop_left:NN\l_@@_tmpa_seq\l_@@_tmpa_tl
+ \seq_pop_left:NN\l_@@_tmpa_seq\l_@@_tmpa_tl
+% \end{macrocode}
+% Now map over the rest. The index \verb+##1+ gives us the
+% number of the parent, \verb+##2+ is the data.
+% \begin{macrocode}
+ \seq_map_indexed_inline:Nn \l_@@_tmpa_seq
+ {
+ \exp_args:Nnx
+ \@@_store_parent_child_rule:nnn {##1}{\l_@@_tmpb_tl}{ ##2 }
+ }
+ }
+ }
+ }
+% \end{macrocode}
+% close the read handle.
+% \begin{macrocode}
+\ior_close:N\g_tmpa_ior
+% \end{macrocode}
+% The Root,
+% Hn and mathml tags are special and need to be added explicitly
+% \begin{macrocode}
+\prop_get:NnN\g_@@_role_index_prop{StructTreeRoot}\l_@@_tmpa_tl
+\prop_gput:Nnx\g_@@_role_index_prop{Root}{\l_@@_tmpa_tl}
+\prop_get:NnN\g_@@_role_index_prop{Hn}\l_@@_tmpa_tl
+\pdf_version_compare:NnTF < {2.0}
+ {
+ \int_step_inline:nn{6}
+ {
+ \prop_gput:Nnx\g_@@_role_index_prop{H#1}{\l_@@_tmpa_tl}
+ }
+ }
+ {
+ \int_step_inline:nn{10}
+ {
+ \prop_gput:Nnx\g_@@_role_index_prop{H#1}{\l_@@_tmpa_tl}
+ }
+% \end{macrocode}
+% all mathml tags are currently handled identically
+% \begin{macrocode}
+ \prop_get:NnN\g_@@_role_index_prop {mathml}\l_@@_tmpa_tl
+ \prop_get:NnN\g_@@_role_index_prop {math}\l_@@_tmpb_tl
+ \prop_map_inline:Nn \g_@@_role_NS_mathml_prop
+ {
+ \prop_gput:NnV\g_@@_role_index_prop{#1}\l_@@_tmpa_tl
+ }
+ \prop_gput:NnV\g_@@_role_index_prop{math}\l_@@_tmpb_tl
+ }
+% \end{macrocode}
+%
+% \subsubsection{Retrieving the parent-child rule}
+%
+% \begin{macro}{\l_@@_role_real_parent_tl}
+% Part, Div and NonStruct have no own rules, instead
+% the parent(s) have to be inspected. To store this real parent
+% we use this tlvar
+% \begin{macrocode}
+\tl_new:N \l_@@_role_real_parent_tl
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_role_get_parent_child_rule:nnN}
+% This command retrieves the rule (as a number) and stores it in the tl-var.
+% TODO check temporary variables. Check if the tl-var should be fix.
+% The arguments should be standard tags for which a rule exist and
+% role mapping should have already be done.
+% \begin{macrocode}
+\tl_new:N \l_@@_parent_child_check_tl
+\cs_new_protected:Npn \@@_role_get_parent_child_rule:nnN #1 #2 #3
+ % #1 parent (string) #2 child (string) #3 tl for state
+ {
+ \tl_set:Nn \l_@@_role_real_parent_tl {#1}
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \prop_get:NnN \g_@@_role_index_prop{#1}\l_@@_tmpa_tl
+ \prop_get:NnN \g_@@_role_index_prop{#2}\l_@@_tmpb_tl
+ \bool_lazy_and:nnTF
+ { ! \quark_if_no_value_p:N \l_@@_tmpa_tl }
+ { ! \quark_if_no_value_p:N \l_@@_tmpb_tl }
+ {
+% \end{macrocode}
+% Get the rule from the intarray
+% \begin{macrocode}
+ \tl_set:Nx#3
+ {
+ \intarray_item:Nn
+ \g_@@_role_parent_child_intarray
+ {\l_@@_tmpa_tl\l_@@_tmpb_tl}
+ }
+% \end{macrocode}
+% If the state is ‡ we have to check the parents from the stack and
+% use the first which is not Part, Div or NonStruct
+% \begin{macrocode}
+ \int_compare:nNnT
+ {#3} = {\prop_item:Nn\c_@@_role_rules_prop{‡}}
+ {
+ \seq_set_eq:NN \l_@@_role_tmpa_seq \g_@@_struct_tag_stack_seq
+% \end{macrocode}
+% we must take the current child from the stack if is already there,
+% depending on location the check is called, this could also remove the
+% parent, but that is ok too.
+% \begin{macrocode}
+ \seq_pop_left:NN \l_@@_role_tmpa_seq\l_@@_get_tmpc_tl
+ \seq_map_inline:Nn\l_@@_role_tmpa_seq
+ {
+ \tl_if_in:nnF {-Part-Div-NonStruct-}{-##1-}
+ {
+ \tl_set:Nn\l_@@_role_real_parent_tl {##1}
+ \int_zero:N\l_@@_tmpa_int
+ \@@_role_get_parent_child_rule:nnN {##1}{#2}#3
+ \int_set:Nn\l_@@_tmpa_int{1}
+ \seq_map_break:
+ }
+ }
+ }
+% \end{macrocode}
+% This is the message, this can perhaps go into debug mode.
+% \begin{macrocode}
+ \group_begin:
+ \int_compare:nNnT {\l_@@_tmpa_int*\l_@@_loglevel_int} > { 0 }
+ {
+ \prop_get:NVNF\c_@@_role_rules_num_prop #3 \l_@@_tmpa_tl
+ {
+ \tl_set:Nn \l_@@_tmpa_tl {unknown}
+ }
+ \tl_set:Nn \l_@@_tmpb_tl {#1}
+ \msg_note:nnxxx
+ { tag }
+ { role-parent-child }
+ { #1
+ \tl_if_eq:NNTF\l_@@_tmpb_tl\l_@@_role_real_parent_tl
+ {
+ \bool_lazy_and:nnT
+ {
+ \prop_if_in_p:Nn \l_@@_role_debug_prop {parent}
+ }
+ {
+ !\str_if_eq_p:ee {#1}{\prop_item:Nn\l_@@_role_debug_prop {parent}}
+ }
+ {
+ \c_space_tl (from~\prop_item:Nn\l_@@_role_debug_prop {parent})
+ }
+ }
+ {
+ \c_space_tl(inherited~from~\l_@@_role_real_parent_tl)
+ }
+ }
+ {
+ #2
+ \bool_lazy_and:nnT
+ {
+ \prop_if_in_p:Nn \l_@@_role_debug_prop {child}
+ }
+ {
+ !\str_if_eq_p:ee {#2}{\prop_item:Nn\l_@@_role_debug_prop {child}}
+ }
+ {
+ \c_space_tl (from~\prop_item:Nn\l_@@_role_debug_prop {child})
+ }
+ }
+ { '#3~(\l_@@_tmpa_tl)' }
+ }
+ \group_end:
+ }
+ {
+ \tl_set:Nn#3 {0}
+ \msg_warning:nnxxx
+ { tag }
+ {role-parent-child}
+ { #1 }
+ { #2 }
+ { unknown! }
+ }
+ }
+\cs_generate_variant:Nn\@@_role_get_parent_child_rule:nnN {VVN}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{@@_check_parent_child:nnnnN}
+% This is the main command.
+% It has to retrieve the standard tags for a comparison.
+% In pdf 2.0 the name spaces of the tags are relevant, so we
+% have arguments for them, but in pdf <2.0 they are ignored and can
+% be left empty.
+% \begin{macrocode}
+\pdf_version_compare:NnTF < {2.0}
+ {
+ \cs_new_protected:Npn \@@_check_parent_child:nnnnN #1 #2 #3 #4 #5
+ {
+% \end{macrocode}
+% for debugging messages we store the arguments.
+% \begin{macrocode}
+ \prop_put:Nnn \l_@@_role_debug_prop {parent} {#1}
+ \prop_put:Nnn \l_@@_role_debug_prop {child} {#3}
+% \end{macrocode}
+% get the standard tags through rolemapping if needed
+% at first the parent
+% \begin{macrocode}
+ \prop_get:NnNTF \g_@@_role_index_prop {#1}\l_@@_tmpa_tl
+ {
+ \tl_set:Nn \l_@@_tmpa_tl {#1}
+ }
+ {
+ \prop_get:NnNF \g_@@_role_rolemap_prop {#1}\l_@@_tmpa_tl
+ {
+ \tl_set:Nn \l_@@_tmpa_tl {\q_no_value}
+ }
+ }
+% \end{macrocode}
+% now the child
+% \begin{macrocode}
+ \prop_get:NnNTF \g_@@_role_index_prop {#3}\l_@@_tmpb_tl
+ {
+ \tl_set:Nn \l_@@_tmpb_tl {#3}
+ }
+ {
+ \prop_get:NnNF \g_@@_role_rolemap_prop {#3}\l_@@_tmpb_tl
+ {
+ \tl_set:Nn \l_@@_tmpb_tl {\q_no_value}
+ }
+ }
+% \end{macrocode}
+% if we got tags for parent and child we call the checking command
+% \begin{macrocode}
+ \bool_lazy_and:nnTF
+ { ! \quark_if_no_value_p:N \l_@@_tmpa_tl }
+ { ! \quark_if_no_value_p:N \l_@@_tmpb_tl }
+ {
+ \@@_role_get_parent_child_rule:VVN \l_@@_tmpa_tl \l_@@_tmpb_tl #5
+ }
+ {
+ \tl_set:Nn #5 {0}
+ \msg_warning:nnxxx
+ { tag }
+ {role-parent-child}
+ { #1 }
+ { #3 }
+ { unknown! }
+ }
+ }
+ \cs_new_protected:Npn \@@_check_parent_child:nnN #1#2#3
+ {
+ \@@_check_parent_child:nnnnN {#1}{}{#2}{}#3
+ }
+ }
+% \end{macrocode}
+% and now the pdf 2.0 version
+% The version with three arguments retrieves the default
+% names space and then calls the full command.
+% Not sure if this will ever be needed but we leave it for now.
+% \begin{macrocode}
+ {
+ \cs_new_protected:Npn \@@_check_parent_child:nnN #1 #2 #3
+ {
+ \prop_get:NnN\g_@@_role_tags_NS_prop {#1}\l_@@_role_tag_namespace_tmpa_tl
+ \prop_get:NnN\g_@@_role_tags_NS_prop {#2}\l_@@_role_tag_namespace_tmpb_tl
+ \str_if_eq:nnT{#2}{MC}{\tl_clear:N \l_@@_role_tag_namespace_tmpb_tl}
+ \bool_lazy_and:nnTF
+ { ! \quark_if_no_value_p:N \l_@@_role_tag_namespace_tmpa_tl }
+ { ! \quark_if_no_value_p:N \l_@@_role_tag_namespace_tmpb_tl }
+ {
+ \@@_check_parent_child:nVnVN
+ {#1}\l_@@_role_tag_namespace_tmpa_tl
+ {#2}\l_@@_role_tag_namespace_tmpb_tl
+ #3
+ }
+ {
+ \tl_set:Nn #3 {0}
+ \msg_warning:nnxxx
+ { tag }
+ {role-parent-child}
+ { #1 }
+ { #2 }
+ { unknown! }
+ }
+ }
+% \end{macrocode}
+% and now the real command.
+% \begin{macrocode}
+ \cs_new_protected:Npn \@@_check_parent_child:nnnnN #1 #2 #3 #4 #5 %tag,NS,tag,NS, tl var
+ {
+ \prop_put:Nnn \l_@@_role_debug_prop {parent} {#1/#2}
+ \prop_put:Nnn \l_@@_role_debug_prop {child} {#3/#4}
+% \end{macrocode}
+% If the namespace is empty, we assume a standard tag,
+% otherwise we retrieve the rolemapping from the namespace
+% \begin{macrocode}
+ \tl_if_empty:nTF {#2}
+ {
+ \tl_set:Nn \l_@@_tmpa_tl {#1}
+ }
+ {
+ \prop_get:cnNTF
+ { g_@@_role_NS_#2_prop }
+ {#1}
+ \l_@@_tmpa_tl
+ {
+ \tl_set:Nx \l_@@_tmpa_tl {\tl_head:N\l_@@_tmpa_tl}
+ \tl_if_empty:NT\l_@@_tmpa_tl
+ {
+ \tl_set:Nn \l_@@_tmpa_tl {#1}
+ }
+ }
+ {
+ \tl_set:Nn \l_@@_tmpa_tl {\q_no_value}
+ }
+ }
+% \end{macrocode}
+% and the same for the child
+% If the namespace is empty, we assume a standard tag,
+% otherwise we retrieve the rolemapping from the namespace
+% \begin{macrocode}
+ \tl_if_empty:nTF {#4}
+ {
+ \tl_set:Nn \l_@@_tmpb_tl {#3}
+ }
+ {
+ \prop_get:cnNTF
+ { g_@@_role_NS_#4_prop }
+ {#3}
+ \l_@@_tmpb_tl
+ {
+ \tl_set:Nx \l_@@_tmpb_tl { \tl_head:N\l_@@_tmpb_tl }
+ \tl_if_empty:NT\l_@@_tmpb_tl
+ {
+ \tl_set:Nn \l_@@_tmpb_tl {#3}
+ }
+ }
+ {
+ \tl_set:Nn \l_@@_tmpb_tl {\q_no_value}
+ }
+ }
+% \end{macrocode}
+% and now get the relation
+% \begin{macrocode}
+ \bool_lazy_and:nnTF
+ { ! \quark_if_no_value_p:N \l_@@_tmpa_tl }
+ { ! \quark_if_no_value_p:N \l_@@_tmpb_tl }
+ {
+ \@@_role_get_parent_child_rule:VVN \l_@@_tmpa_tl \l_@@_tmpb_tl #5
+ }
+ {
+ \tl_set:Nn #5 {0}
+ \msg_warning:nnxxx
+ { tag }
+ {role-parent-child}
+ { #1 }
+ { #3 }
+ { unknown! }
+ }
+ }
+ }
+\cs_generate_variant:Nn\@@_check_parent_child:nnN {VVN}
+\cs_generate_variant:Nn\@@_check_parent_child:nnnnN {VVVVN,nVnVN,VVnnN}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Remapping of tags}
+% In some context it can be necessary to remap or replace the tags.
+% That means instead of tag=H1 or tag=section one wants the effect of tag=Span.
+% Or instead of tag=P one wants tag=Code.
+%
+% The following command provide some general interface for this.
+% The core idea is that before a tag is set it is fed through a function
+% that can change it. We want to be able to chain such functions,
+% so all of them manipulate the same variables.
+%
+% \begin{variable}{\l_@@_role_remap_tag_tl,\l_@@_role_remap_NS_tl}
+% \begin{macrocode}
+\tl_new:N \l_@@_role_remap_tag_tl
+\tl_new:N \l_@@_role_remap_NS_tl
+% \end{macrocode}
+% \end{variable}
+% \begin{macro}{\@@_role_remap:}
+% This function is used in the structure and the mc code before using a tag. By default it
+% does nothing with the tl vars. Perhaps this should be a hook?
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_role_remap: { }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_role_remap_id: }
+% This is copy in case we have to restore the main command.
+% \begin{macrocode}
+\cs_set_eq:NN \@@_role_remap_id: \@@_role_remap:
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_role_remap_inline:}
+% The mapping is meant to \enquote{degrade} tags, e.g. if used
+% inside some complex object.
+% The pdf<2.0 code maps the tag to the new role, the pdf 2.0 code only
+% switch the NS.
+% \begin{macrocode}
+\pdf_version_compare:NnTF < {2.0}
+ {
+ \cs_new_protected:Npn \@@_role_remap_inline:
+ {
+ \prop_get:cVNT { g__tag_role_NS_latex-inline_prop }\l_@@_role_remap_tag_tl\l_@@_tmpa_tl
+ {
+ \tl_set:Nx\l_@@_role_remap_tag_tl
+ {
+ \exp_last_unbraced:NV\use_i:nn \l_@@_tmpa_tl
+ }
+ \tl_set:Nx\l_@@_role_remap_NS_tl
+ {
+ \exp_last_unbraced:NV\use_ii:nn \l_@@_tmpa_tl
+ }
+ }
+ \int_compare:nNnT {\l_@@_loglevel_int} > { 0 }
+ {
+ \msg_note:nnx { tag } { role-remapping }{ \l_@@_role_remap_tag_tl }
+ }
+ }
+ }
+ {
+ \cs_new_protected:Npn \@@_role_remap_inline:
+ {
+ \prop_get:cVNT { g__tag_role_NS_latex-inline_prop }\l_@@_role_remap_tag_tl\l_@@_tmpa_tl
+ {
+ \tl_set:Nn\l_@@_role_remap_NS_tl {latex-inline}
+ }
+ \int_compare:nNnT {\l_@@_loglevel_int} > { 0 }
+ {
+ \msg_note:nnx { tag } { role-remapping }{ \l_@@_role_remap_tag_tl/latex-inline }
+ }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
% \subsection{Key-val user interface}
% The user interface uses the key |add-new-tag|, which takes either a
% keyval list as argument, or a tag/role.
diff --git a/macros/latex/contrib/tagpdf/tagpdf-space.dtx b/macros/latex/contrib/tagpdf/tagpdf-space.dtx
index 20f189f8a5..ad5e17ff5b 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-space.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-space.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.97, released 2022-08-24}
+% \date{Version 0.98, released 2022-12-22}
% \maketitle
% \begin{documentation}
% \begin{function}{interwordspace (setup-key)}
@@ -64,7 +64,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-space-code} {2022-08-24} {0.97}
+\ProvidesExplPackage {tagpdf-space-code} {2022-12-22} {0.98}
{part of tagpdf - code related to real space chars}
%</header>
% \end{macrocode}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-struct.dtx b/macros/latex/contrib/tagpdf/tagpdf-struct.dtx
index dd85e47277..6f6d60ba4b 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-struct.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-struct.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.97, released 2022-08-24}
+% \date{Version 0.98, released 2022-12-22}
% \maketitle
% \begin{documentation}
% \section{Public Commands}
@@ -242,7 +242,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-struct-code} {2022-08-24} {0.97}
+\ProvidesExplPackage {tagpdf-struct-code} {2022-12-22} {0.98}
{part of tagpdf - code related to storing structure}
%</header>
% \end{macrocode}
@@ -298,6 +298,14 @@
% \end{macrocode}
% \end{variable}
%
+% \begin{variable}{\g_@@_struct_tag_NS_prop}
+% For the parent-child check, we need the tag and NS of every structure
+% \begin{macrocode}
+\prop_new:N\g_@@_struct_tag_NS_prop
+% \end{macrocode}
+% \end{variable}
+%
+%
% \begin{variable}{\g_@@_struct_stack_current_tl,\l_@@_struct_stack_parent_tmpa_tl}
% The global variable will hold the current structure number. It is already
% defined in \texttt{tagpdf-base}.
@@ -399,6 +407,28 @@
\bool_new:N \l_@@_struct_elem_stash_bool
% \end{macrocode}
% \end{variable}
+%
+% \subsection{Variables used by tagging code of basic elements}
+%
+% \begin{variable}{\g_@@_struct_dest_num_prop}
+% This variable records for (some or all, not clear yet)
+% destination names the related structure number to allow
+% to reference them in a Ref. The key is the destination.
+% It is currently used by the toc-tagging and sec-tagging code.
+% \begin{macrocode}
+\prop_new:N \g_@@_struct_dest_num_prop
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{variable}{\g_@@_struct_ref_by_dest_prop}
+% This variable contains structures whose Ref key should be updated
+% at the end to point to structured related with this destination.
+% As this is probably need in other places too, it is not only a toc-variable.
+% \begin{macrocode}
+\prop_new:N \g_@@_struct_ref_by_dest_prop
+% \end{macrocode}
+% \end{variable}
+%
% \section{Commands}
%
% The properties must be in some places handled expandably.
@@ -442,7 +472,11 @@
% \begin{macrocode}
\tl_gset:Nn \g_@@_struct_stack_current_tl {0}
% \end{macrocode}
-
+% \begin{macro}{\@@_pdf_name_e:n}
+% \begin{macrocode}
+\cs_new:Npn \@@_pdf_name_e:n #1{\pdf_name_from_unicode_e:n{#1}}
+% \end{macrocode}
+% \end{macro}
%
% \begin{variable}{g_@@_struct_0_prop,g_@@_struct_kids_0_seq}
% \begin{macrocode}
@@ -450,13 +484,17 @@
\@@_new_output_prop_handler:n {0}
\@@_seq_new:c { g_@@_struct_kids_0_seq }
-\@@_prop_gput:cnn
+\@@_prop_gput:cnx
{ g_@@_struct_0_prop }
{ Type }
- { /StructTreeRoot }
-
+ { \pdf_name_from_unicode_e:n {StructTreeRoot} }
+\@@_prop_gput:cnx
+ { g_@@_struct_0_prop }
+ { S }
+ { \pdf_name_from_unicode_e:n {StructTreeRoot} }
+\prop_gput:Nnn \g_@@_struct_tag_NS_prop {0}{{StructTreeRoot}{pdf}}
% \end{macrocode}
% Namespaces are pdf 2.0 but it doesn't harm
% to have an empty entry. We could add a test, but if the code moves into
@@ -468,6 +506,65 @@
{ \pdf_object_ref:n { @@/tree/namespaces } }
% \end{macrocode}
% \end{variable}
+%
+% \subsection{Filling in the tag info}
+
+% \begin{macro}{\@@_struct_set_tag_info:nnn }
+% This adds or updates the tag info to a structure given by a number.
+% We need also the original data, so we store both.
+% \begin{macrocode}
+\pdf_version_compare:NnTF < {2.0}
+ {
+ \cs_new_protected:Npn \@@_struct_set_tag_info:nnn #1 #2 #3
+ %#1 structure number, #2 tag, #3 NS
+ {
+ \@@_prop_gput:cnx
+ { g_@@_struct_#1_prop }
+ { S }
+ { \pdf_name_from_unicode_e:n {#2} } %
+ \prop_gput:Nnn \g_@@_struct_tag_NS_prop {#1}{{#2}{#3}}
+ }
+ }
+ {
+ \cs_new_protected:Npn \@@_struct_set_tag_info:nnn #1 #2 #3
+ {
+ \@@_prop_gput:cnx
+ { g_@@_struct_#1_prop }
+ { S }
+ { \pdf_name_from_unicode_e:n {#2} } %
+ \prop_get:NnNT \g_@@_role_NS_prop {#3} \l_@@_get_tmpc_tl
+ {
+ \@@_prop_gput:cnx
+ { g_@@_struct_#1_prop }
+ { NS }
+ { \l_@@_get_tmpc_tl } %
+ }
+ \prop_gput:Nnn \g_@@_struct_tag_NS_prop {#1}{{#2}{#3}}
+ }
+ }
+\cs_generate_variant:Nn \@@_struct_set_tag_info:nnn {eVV}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\cc}
+% We also need a way to get the tag info back from parent structures.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_struct_get_tag_info:nNN #1 #2 #3
+ %#1 struct num, #2 tlvar for tag , #3 tlvar for NS
+ {
+ \prop_get:NnNTF \g_@@_struct_tag_NS_prop {#1}\l_@@_get_tmpc_tl
+ {
+ \tl_set:Nx #2{\exp_last_unbraced:NV\use_i:nn \l_@@_get_tmpc_tl}
+ \tl_set:Nx #3{\exp_last_unbraced:NV\use_ii:nn \l_@@_get_tmpc_tl}
+ }
+ {
+ \tl_clear:N#2
+ \tl_clear:N#3
+ }
+ }
+\cs_generate_variant:Nn\@@_struct_get_tag_info:nNN {eNN}
+% \end{macrocode}
+% \end{macro}
% \subsection{Handlings kids}
% Commands to store the kids. Kids in a structure can be a reference to a mc-chunk,
% an object reference to another structure element, or a object reference to an
@@ -857,21 +954,10 @@
parent .default:n = {-1},
tag .code:n = % S property
{
- \seq_set_split:Nne \l_@@_tmpa_seq { / } {#1/\prop_item:No\g__tag_role_tags_NS_prop{#1}}
- \tl_gset:Nx \g_@@_struct_tag_tl { \seq_item:Nn\l_@@_tmpa_seq {1} }
- \tl_gset:Nx \g_@@_struct_tag_NS_tl { \seq_item:Nn\l_@@_tmpa_seq {2} }
+ \seq_set_split:Nne \l_@@_tmpa_seq { / } {#1/\prop_item:Ne\g__tag_role_tags_NS_prop{#1}}
+ \tl_gset:Nx \g_@@_struct_tag_tl { \seq_item:Nn\l_@@_tmpa_seq {1} }
+ \tl_gset:Nx \g_@@_struct_tag_NS_tl{ \seq_item:Nn\l_@@_tmpa_seq {2} }
\@@_check_structure_tag:N \g_@@_struct_tag_tl
- \@@_prop_gput:cnx
- { g_@@_struct_\int_eval:n {\c@g_@@_struct_abs_int}_prop }
- { S }
- { \pdf_name_from_unicode_e:n{ \g_@@_struct_tag_tl} } %
- \prop_get:NVNT \g_@@_role_NS_prop\g_@@_struct_tag_NS_tl\l_@@_tmpa_tl
- {
- \@@_prop_gput:cnx
- { g_@@_struct_\int_eval:n {\c@g_@@_struct_abs_int}_prop }
- { NS }
- { \l_@@_tmpa_tl } %
- }
},
title .code:n = % T property
{
@@ -1114,7 +1200,13 @@
{ /StructElem }
\tl_set:Nn \l_@@_struct_stack_parent_tmpa_tl {-1}
\keys_set:nn { @@ / struct} { #1 }
- \@@_check_structure_has_tag:n { \int_eval:n {\c@g_@@_struct_abs_int} }
+% \end{macrocode}
+% \begin{macrocode}
+ \@@_struct_set_tag_info:eVV
+ { \int_eval:n {\c@g_@@_struct_abs_int} }
+ \g_@@_struct_tag_tl
+ \g_@@_struct_tag_NS_tl
+ \@@_check_structure_has_tag:n { \int_eval:n {\c@g_@@_struct_abs_int} }
\tl_if_empty:NF
\l_@@_struct_key_label_tl
{
@@ -1139,7 +1231,43 @@
%\seq_show:N \g_@@_struct_stack_seq
\bool_if:NF
\l_@@_struct_elem_stash_bool
- {%set the parent
+ {
+% \end{macrocode}
+% check if the tag can be used inside the parent. It only makes sense,
+% if the structure is actually used here, so it is guarded by the stash boolean.
+% For now we ignore the namespace!
+% \begin{macrocode}
+ \@@_struct_get_tag_info:eNN
+ {\l_@@_struct_stack_parent_tmpa_tl}
+ \l_@@_get_parent_tmpa_tl
+ \l_@@_get_parent_tmpb_tl
+ \@@_check_parent_child:VVVVN
+ \l_@@_get_parent_tmpa_tl
+ \l_@@_get_parent_tmpb_tl
+ \g_@@_struct_tag_tl
+ \g_@@_struct_tag_NS_tl
+ \l_@@_parent_child_check_tl
+ \int_compare:nNnT {\l_@@_parent_child_check_tl}<0
+ {
+ \msg_warning:nnxxx
+ { tag }
+ {role-parent-child}
+ { \l_@@_get_parent_tmpa_tl/\l_@@_get_parent_tmpb_tl }
+ { \g_@@_struct_tag_tl/\g_@@_struct_tag_NS_tl }
+ { not~allowed~(struct~\g_@@_struct_stack_current_tl) }
+ \cs_set_eq:NN \l_@@_role_remap_tag_tl \g_@@_struct_tag_tl
+ \cs_set_eq:NN \l_@@_role_remap_NS_tl \g_@@_struct_tag_NS_tl
+ \@@_role_remap:
+ \cs_gset_eq:NN \g_@@_struct_tag_tl \l_@@_role_remap_tag_tl
+ \cs_gset_eq:NN \g_@@_struct_tag_NS_tl \l_@@_role_remap_NS_tl
+ \@@_struct_set_tag_info:eVV
+ { \int_eval:n {\c@g_@@_struct_abs_int} }
+ \g_@@_struct_tag_tl
+ \g_@@_struct_tag_NS_tl
+ }
+% \end{macrocode}
+% Set the Parent.
+% \begin{macrocode}
\@@_prop_gput:cnx
{ g_@@_struct_\int_eval:n {\c@g_@@_struct_abs_int}_prop }
{ P }
@@ -1202,7 +1330,7 @@
%<base>\cs_new_protected:Npn \tag_struct_use:n #1 {}
%<*package>
\cs_set_protected:Npn \tag_struct_use:n #1 %#1 is the label
- {
+ {
\@@_check_if_active_struct:T
{
\prop_if_exist:cTF
@@ -1220,6 +1348,33 @@
{
\pdf_object_ref:e { @@/struct/\g_@@_struct_stack_current_tl }
}
+% \end{macrocode}
+% check if the tag is allowed as child. Here we have to retrieve the
+% tag info for the child, while the data for the parent is in
+% the global tl-vars:
+% \begin{macrocode}
+ \@@_struct_get_tag_info:eNN
+ {\__tag_ref_value:enn{tagpdfstruct-#1}{tagstruct}{0}}
+ \l_@@_tmpa_tl
+ \l_@@_tmpb_tl
+ \@@_check_parent_child:VVVVN
+ \g_@@_struct_tag_tl
+ \g_@@_struct_tag_NS_tl
+ \l_@@_tmpa_tl
+ \l_@@_tmpb_tl
+ \l_@@_parent_child_check_tl
+ \int_compare:nNnT {\l_@@_parent_child_check_tl}<0
+ {
+ \cs_set_eq:NN \l_@@_role_remap_tag_tl \g_@@_struct_tag_tl
+ \cs_set_eq:NN \l_@@_role_remap_NS_tl \g_@@_struct_tag_NS_tl
+ \@@_role_remap:
+ \cs_gset_eq:NN \g_@@_struct_tag_tl \l_@@_role_remap_tag_tl
+ \cs_gset_eq:NN \g_@@_struct_tag_NS_tl \l_@@_role_remap_NS_tl
+ \@@_struct_set_tag_info:eVV
+ { \int_eval:n {\c@g_@@_struct_abs_int} }
+ \g_@@_struct_tag_tl
+ \g_@@_struct_tag_NS_tl
+ }
}
{
\msg_warning:nnn{ tag }{struct-label-unknown}{#1}
@@ -1271,11 +1426,11 @@
\prop_get:cnN
{ g_@@_struct_#1_prop }
{Ref}
- \l_@@_tmpb_tl
+ \l_@@_get_tmpc_tl
\@@_prop_gput:cnx
{ g_@@_struct_#1_prop }
{ Ref }
- { \quark_if_no_value:NF\l_@@_tmpb_tl { \l_@@_tmpb_tl\c_space_tl }#2 }
+ { \quark_if_no_value:NF\l_@@_get_tmpc_tl { \l_@@_get_tmpc_tl\c_space_tl }#2 }
}
\cs_generate_variant:Nn \@@_struct_gput_data_ref:nn {ee}
% \end{macrocode}
@@ -1319,7 +1474,7 @@
% \section{Attributes and attribute classes}
% \begin{macrocode}
%<*header>
-\ProvidesExplPackage {tagpdf-attr-code} {2022-08-24} {0.97}
+\ProvidesExplPackage {tagpdf-attr-code} {2022-12-22} {0.98}
{part of tagpdf - code related to attributes and attribute classes}
%</header>
% \end{macrocode}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-tree.dtx b/macros/latex/contrib/tagpdf/tagpdf-tree.dtx
index 6bb4aa9980..ecbd96f04e 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-tree.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-tree.dtx
@@ -47,13 +47,13 @@
% }^^A
% }
%
-% \date{Version 0.97, released 2022-08-24}
+% \date{Version 0.98, released 2022-12-22}
% \maketitle
% \begin{implementation}
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-tree-code} {2022-08-24} {0.97}
+\ProvidesExplPackage {tagpdf-tree-code} {2022-12-22} {0.98}
{part of tagpdf - code related to writing trees and dictionaries to the pdf}
%</header>
% \end{macrocode}
@@ -81,6 +81,21 @@
}
}
% \end{macrocode}
+% \subsection{Check structure}
+% \begin{macro}{\@@_tree_final_checks:}
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_tree_final_checks:
+ {
+ \int_compare:nNnF {\seq_count:N\g_@@_struct_stack_seq}={1}
+ {
+ \msg_warning:nn {tag}{tree-struct-still-open}
+ \int_step_inline:nnn{2}{\seq_count:N\g_@@_struct_stack_seq}
+ {\tag_struct_end:}
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
% \subsection{Catalog: MarkInfo and StructTreeRoot}
% The StructTreeRoot and the MarkInfo entry must be added to the catalog.
% We do it late so that we can win, but before the pdfmanagement hook.
@@ -109,18 +124,34 @@
% \begin{macro}{\@@_tree_write_structtreeroot:}
% This writes out the root object.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_tree_write_structtreeroot:
- {
- \@@_prop_gput:cnx
- { g_@@_struct_0_prop }
- { ParentTree }
- { \pdf_object_ref:n { @@/tree/parenttree } }
- \@@_prop_gput:cnx
- { g_@@_struct_0_prop }
- { RoleMap }
- { \pdf_object_ref:n { @@/tree/rolemap } }
- \@@_struct_write_obj:n { 0 }
- }
+\pdf_version_compare:NnTF < {2.0}
+ {
+ \cs_new_protected:Npn \@@_tree_write_structtreeroot:
+ {
+ \@@_prop_gput:cnx
+ { g_@@_struct_0_prop }
+ { ParentTree }
+ { \pdf_object_ref:n { @@/tree/parenttree } }
+ \@@_prop_gput:cnx
+ { g_@@_struct_0_prop }
+ { RoleMap }
+ { \pdf_object_ref:n { @@/tree/rolemap } }
+ \@@_struct_write_obj:n { 0 }
+ }
+ }
+% \end{macrocode}
+% no RoleMap in pdf 2.0
+% \begin{macrocode}
+ {
+ \cs_new_protected:Npn \@@_tree_write_structtreeroot:
+ {
+ \@@_prop_gput:cnx
+ { g_@@_struct_0_prop }
+ { ParentTree }
+ { \pdf_object_ref:n { @@/tree/parenttree } }
+ \@@_struct_write_obj:n { 0 }
+ }
+ }
% \end{macrocode}
% \end{macro}
%
@@ -300,7 +331,10 @@
% \begin{variable}{@@/tree/rolemap}
% At first we reserve again an object.
% \begin{macrocode}
-\pdf_object_new:n { @@/tree/rolemap }
+\pdf_version_compare:NnT < {2.0}
+ {
+ \pdf_object_new:n { @@/tree/rolemap }
+ }
% \end{macrocode}
% \end{variable}
%
@@ -308,13 +342,26 @@
% This writes out the rolemap, basically it simply pushes out
% the dictionary which has been filled in the role module.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_tree_write_rolemap:
+\pdf_version_compare:NnTF < {2.0}
{
- \pdf_object_write:nnx { @@/tree/rolemap }{dict}
- {
+ \cs_new_protected:Npn \@@_tree_write_rolemap:
+ {
+ \prop_map_inline:Nn\g_@@_role_rolemap_prop
+ {
+ \pdfdict_gput:nnx {g_@@_role/RoleMap_dict}
+ {##1}
+ {\pdf_name_from_unicode_e:n{##2}}
+ }
+ \pdf_object_write:nnx { @@/tree/rolemap }{dict}
+ {
\pdfdict_use:n{g_@@_role/RoleMap_dict}
- }
+ }
+ }
+ }
+ {
+ \cs_new_protected:Npn \@@_tree_write_rolemap:{}
}
+
% \end{macrocode}
% \end{macro}
%
@@ -360,36 +407,39 @@
% \end{macro}
% \subsection{Namespaces}
% Namespaces are handle in the role module, here is the code to write them out.
-% Namespaces are only relevant for pdf2.0 but we don't care, it doesn't harm.
+% Namespaces are only relevant for pdf2.0.
% \begin{variable}{@@/tree/namespaces}
% \begin{macrocode}
-\pdf_object_new:nn{ @@/tree/namespaces }{array}
+\pdf_object_new:n { @@/tree/namespaces }
% \end{macrocode}
% \end{variable}
% \begin{macro}{\@@_tree_write_namespaces:}
% \begin{macrocode}
\cs_new_protected:Npn \@@_tree_write_namespaces:
{
- \prop_map_inline:Nn \g_@@_role_NS_prop
- {
- \pdfdict_if_empty:nF {g_@@_role/RoleMapNS_##1_dict}
- {
- \pdf_object_write:nnx {@@/RoleMapNS/##1}{dict}
- {
- \pdfdict_use:n {g_@@_role/RoleMapNS_##1_dict}
- }
- \pdfdict_gput:nnx{g_@@_role/Namespace_##1_dict}
- {RoleMapNS}{\pdf_object_ref:n {@@/RoleMapNS/##1}}
- }
- \pdf_object_write:nnx{tag/NS/##1}{dict}
- {
- \pdfdict_use:n {g_@@_role/Namespace_##1_dict}
- }
- }
- \pdf_object_write:nx {@@/tree/namespaces} %array
- {
- \prop_map_tokens:Nn \g_@@_role_NS_prop{\use_ii:nn}
- }
+ \pdf_version_compare:NnF < {2.0}
+ {
+ \prop_map_inline:Nn \g_@@_role_NS_prop
+ {
+ \pdfdict_if_empty:nF {g_@@_role/RoleMapNS_##1_dict}
+ {
+ \pdf_object_write:nnx {@@/RoleMapNS/##1}{dict}
+ {
+ \pdfdict_use:n {g_@@_role/RoleMapNS_##1_dict}
+ }
+ \pdfdict_gput:nnx{g_@@_role/Namespace_##1_dict}
+ {RoleMapNS}{\pdf_object_ref:n {@@/RoleMapNS/##1}}
+ }
+ \pdf_object_write:nnx{tag/NS/##1}{dict}
+ {
+ \pdfdict_use:n {g_@@_role/Namespace_##1_dict}
+ }
+ }
+ \pdf_object_write:nnx {@@/tree/namespaces}{array}
+ {
+ \prop_map_tokens:Nn \g_@@_role_NS_prop{\use_ii:nn}
+ }
+ }
}
% \end{macrocode}
% \end{macro}
@@ -404,6 +454,7 @@
\bool_if:NT\g_@@_active_tree_bool
{
\hook_use:n {tagpdf/finish/before}
+ \@@_tree_final_checks:
\@@_tree_write_parenttree:
\@@_tree_write_rolemap:
\@@_tree_write_classmap:
diff --git a/macros/latex/contrib/tagpdf/tagpdf-user.dtx b/macros/latex/contrib/tagpdf/tagpdf-user.dtx
index bd2e26ec92..a70c14bb21 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-user.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-user.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.97, released 2022-08-24}
+% \date{Version 0.98, released 2022-12-22}
% \maketitle
% \begin{documentation}
% \section{Setup commands}
@@ -246,7 +246,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-user} {2022-08-24} {0.97}
+\ProvidesExplPackage {tagpdf-user} {2022-12-22} {0.98}
{tagpdf - user commands}
%</header>
% \end{macrocode}
@@ -520,8 +520,10 @@
% \subsection{Structure destinations}
% In TeXlive 2022 pdftex and luatex will offer support for structure destinations.
% The pdfmanagement has already backend support. We activate them if the
-% prerequisites are there: The pdf version should be 2.0, structures should be activated,
+% prerequisites are there: structures should be activated,
% the code in the pdfmanagement must be there.
+% Structure destinations are actually PDF 2.0 only but they don't harm in
+% older PDF and can improve html export.
% \begin{macrocode}
\AddToHook{begindocument/before}
{
@@ -530,7 +532,6 @@
{ \g_@@_active_struct_dest_bool }
{ \g_@@_active_struct_bool }
{ \cs_if_exist_p:N \pdf_activate_structure_destination: }
- { ! \pdf_version_compare_p:Nn < {2.0} }
}
{
\tl_set:Nn \l_pdf_current_structure_destination_tl { __tag/struct/\g__tag_struct_stack_current_tl }
@@ -559,15 +560,17 @@
% Probably one should add some checks if we are already in a paragraph.
%
%
-% \begin{macro}{\l_@@_para_bool,\l_@@_para_show_bool,\g_@@_para_int}
+% \begin{macro}{\l_@@_para_bool,\l_@@_para_show_bool,\g_@@_para_int,\l_@@_para_tag_default_tl}
% At first some variables.
% \begin{macrocode}
\bool_new:N \l_@@_para_bool
\bool_new:N \l_@@_para_show_bool
\int_new:N \g_@@_para_begin_int
\int_new:N \g_@@_para_end_int
+\tl_new:N \l_@@_para_tag_default_tl
+\tl_set:Nn \l_@@_para_tag_default_tl { P }
\tl_new:N \l_@@_para_tag_tl
-\tl_set:Nn \l_@@_para_tag_tl { P }
+\tl_set:Nn \l_@@_para_tag_tl { \l_@@_para_tag_default_tl }
% \end{macrocode}
% \end{macro}
%
@@ -603,7 +606,7 @@
\llap{\color_select:n{red}\tiny\int_use:N\g_@@_para_begin_int\ }
\tag_mc_end:
}
- \tag_mc_begin:n {tag=\l_@@_para_tag_tl}
+ \tag_mc_begin:n {}
}
}
\AddToHook{para/end}
diff --git a/macros/latex/contrib/tagpdf/tagpdf.dtx b/macros/latex/contrib/tagpdf/tagpdf.dtx
index be718ec36d..d9550ab7a7 100644
--- a/macros/latex/contrib/tagpdf/tagpdf.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf.dtx
@@ -92,7 +92,7 @@
% \begin{macrocode}
%<@@=tag>
%<*package>
-\ProvidesExplPackage {tagpdf} {2022-08-24} {0.97}
+\ProvidesExplPackage {tagpdf} {2022-12-22} {0.98}
{ A package to experiment with pdf tagging }
\bool_if:nF
@@ -118,7 +118,7 @@
% \end{macrocode}
%<*debug>
% \begin{macrocode}
-\ProvidesExplPackage {tagpdf-debug} {2022-08-24} {0.97}
+\ProvidesExplPackage {tagpdf-debug} {2022-12-22} {0.98}
{ debug code for tagpdf }
\@ifpackageloaded{tagpdf}{}{\PackageWarning{tagpdf-debug}{tagpdf~not~loaded,~quitting}\endinput}
% \end{macrocode}
@@ -159,7 +159,7 @@
% \end{macrocode}
% \begin{macrocode}
%<*base>
-\ProvidesExplPackage {tagpdf-base} {2022-08-24} {0.97}
+\ProvidesExplPackage {tagpdf-base} {2022-12-22} {0.98}
{part of tagpdf - provide base, no-op versions of the user commands }
%</base>
% \end{macrocode}
@@ -180,47 +180,6 @@
}
%</base>
% \end{macrocode}
-% \section{Temporary code}
-% This is code which will be removed when proper support exists in LaTeX
-% It writes only dictionaries!
-% \subsection{Faster object writing}
-% \begin{macrocode}
-%<*package>
-\cs_if_free:NT \pdf_object_write:nnn
- {
- \cs_new_protected:Npn \pdf_object_new:n #1
- { \pdf_object_new:nn{#1}{dict} }
- \cs_new_protected:Npn \pdf_object_write:nnn #1#2#3
- {
- \pdf_object_write:nn {#1}{#3}
- }
- \str_if_eq:VnT \c_sys_backend_str {pdftex}
- {
- \cs_set_protected:Npn \pdf_object_write:nnn #1#2#3
- {
- \tex_immediate:D \tex_pdfobj:D
- useobjnum ~
- \int_use:c
- { c__pdf_backend_object_ \tl_to_str:n {#1} _int }
- { << ~ \exp_not:n {#3} ~ >> }
- }
- }
- \str_if_eq:VnT \c_sys_backend_str {luatex}
- {
- \cs_set_protected:Npn \pdf_object_write:nnn #1#2#3
- {
- \tex_immediate:D \tex_pdfextension:D obj ~
- useobjnum ~
- \int_use:c
- { c__pdf_backend_object_ \tl_to_str:n {#1} _int }
- { << ~ \exp_not:n {#3} ~ >> }
- }
- }
- }
-\cs_generate_variant:Nn \pdf_object_write:nnn {nnx}
-
-%</package>
-% \end{macrocode}
% \subsection{a LastPage label}
% See also issue \#2 in Accessible-xref
@@ -276,7 +235,10 @@
% \begin{variable}
% {
% \l_@@_tmpa_tl,
-% \l_@@_tmpb_tl
+% \l_@@_tmpb_tl,
+% \l_@@_get_tmpc_tl,
+% \l_@@_get_parent_tmpa_tl
+% \l_@@_get_parent_tmpb_tl
% \l_@@_tmpa_str,
% \l_@@_tmpa_prop,
% \l_@@_tmpa_seq,
@@ -290,6 +252,9 @@
% \begin{macrocode}
\tl_new:N \l_@@_tmpa_tl
\tl_new:N \l_@@_tmpb_tl
+\tl_new:N \l_@@_get_tmpc_tl
+\tl_new:N \l_@@_get_parent_tmpa_tl
+\tl_new:N \l_@@_get_parent_tmpb_tl
\str_new:N \l_@@_tmpa_str
\prop_new:N \l_@@_tmpa_prop
\seq_new:N \l_@@_tmpa_seq
@@ -386,7 +351,7 @@
\cs_generate_variant:Nn \pdffile_embed_stream:nnn {nxx,oxx}
\cs_generate_variant:Nn \prop_gput:Nnn {Nxx,Nen}
\cs_generate_variant:Nn \prop_put:Nnn {Nxx}
-\cs_generate_variant:Nn \prop_item:Nn {No}
+\cs_generate_variant:Nn \prop_item:Nn {No,Ne}
\cs_generate_variant:Nn \ref_label:nn { nv }
\cs_generate_variant:Nn \seq_set_split:Nnn{Nne}
\cs_generate_variant:Nn \str_set_convert:Nnnn {Nonn, Noon, Nnon }
diff --git a/macros/latex/contrib/tagpdf/tagpdf.ins b/macros/latex/contrib/tagpdf/tagpdf.ins
index 60c0803cbf..d494018825 100644
--- a/macros/latex/contrib/tagpdf/tagpdf.ins
+++ b/macros/latex/contrib/tagpdf/tagpdf.ins
@@ -62,6 +62,7 @@ and all files in that bundle must be distributed together.
\from{tagpdf-mc-shared.dtx}{shared}
\from{tagpdf.dtx}{mcloading}
\from{tagpdf-tree.dtx}{package}
+ \from{tagpdf-data.dtx}{package} %should be before the roles code
\from{tagpdf-roles.dtx}{package}
\from{tagpdf-struct.dtx}{package}%contains also the attr code.
\from{tagpdf-space.dtx}{package}
@@ -88,6 +89,24 @@ and all files in that bundle must be distributed together.
\generate
{\file{tagpdf-mc-code-lua.sty}{\from{tagpdf-mc-luacode.dtx}{luamode}}}
+\generate
+ {\file{tagpdf-ns-pdf.def}{\from{tagpdf-data.dtx}{ns-pdf}}}
+\generate
+ {\file{tagpdf-ns-pdf2.def}{\from{tagpdf-data.dtx}{ns-pdf2}}}
+\generate
+ {\file{tagpdf-ns-mathml.def}{\from{tagpdf-data.dtx}{ns-mathml}}}
+\generate
+ {\file{tagpdf-ns-latex.def}{\from{tagpdf-data.dtx}{ns-latex}}}
+\generate
+ {\file{tagpdf-ns-latex-book.def}{\from{tagpdf-data.dtx}{ns-latex-book}}}
+\generate
+ {\file{tagpdf-ns-latex-inline.def}{\from{tagpdf-data.dtx}{ns-latex-inline}}}
+\generate
+ {\file{tagpdf-parent-child.csv}{\from{tagpdf-data.dtx}{parent-child}}}
+\generate
+ {\file{tagpdf-parent-child-2.csv}{\from{tagpdf-data.dtx}{parent-child-2}}}
+
+
% check later if the mc-code uses debug guards too.
\generate
{\file{tagpdf-debug.sty}
@@ -117,4 +136,6 @@ and all files in that bundle must be distributed together.
}
\def\currentpostamble{\defaultpostamble}%
\generate{\file{tagpdf.lua} {\from{tagpdf-backend.dtx}{lua}}}
+
+
\endbatchfile
diff --git a/macros/latex/contrib/tagpdf/tagpdf.pdf b/macros/latex/contrib/tagpdf/tagpdf.pdf
index f75c057dbf..a04314fa71 100644
--- a/macros/latex/contrib/tagpdf/tagpdf.pdf
+++ b/macros/latex/contrib/tagpdf/tagpdf.pdf
Binary files differ
diff --git a/macros/latex/contrib/tagpdf/tagpdf.tex b/macros/latex/contrib/tagpdf/tagpdf.tex
index 217314035c..c1fe9d2d35 100644
--- a/macros/latex/contrib/tagpdf/tagpdf.tex
+++ b/macros/latex/contrib/tagpdf/tagpdf.tex
@@ -1,15 +1,15 @@
% !Mode:: "TeX:DE:UTF-8:Main"
-%\PassOptionsToPackage{check-declarations,enable-debug}{expl3}
+\PassOptionsToPackage{check-declarations,enable-debug}{expl3}
%\RequirePackage{pdfmanagement-testphase}
-\DocumentMetadata{pdfversion=2.0,lang=en-UK,testphase=phase-II}
+\DocumentMetadata{pdfversion=2.0,lang=en-UK,testphase=phase-II,testphase=toc-tagging,testphase=sec-tagging,pdfstandard=a-2b}
\makeatletter
-\def\UlrikeFischer@package@version{0.97}
-\def\UlrikeFischer@package@date{2022-08-24}
+\def\UlrikeFischer@package@version{0.98}
+\def\UlrikeFischer@package@date{2022-12-22}
\makeatother
-\documentclass[DIV=12,parskip=half-,bibliography=totoc]{scrartcl}
-
+\documentclass[DIV=12,parskip=half-,bibliography=totoc,a4paper]{article}
+\usepackage{geometry}
\usepackage[english]{babel}
\usepackage{unicode-math}
@@ -20,7 +20,7 @@
%\patchcmd{\MT@get@prot}{\noindent}{\RawNoindent}{}{\fail}
\makeatother
-\usepackage{scrlayer-scrpage}
+%\usepackage{scrlayer-scrpage}
\usepackage[autostyle]{csquotes}
\usepackage[style=numeric,hyperref=false]{biblatex}
@@ -41,7 +41,7 @@
\tikzset{operator/.style = {font=\footnotesize\ttfamily, anchor=base,draw, rounded corners,node distance=4mm and 4mm}}
-\usepackage{enumitem,xpatch}
+\usepackage{enumitem}
\usepackage{listings}
\lstset{basicstyle=\ttfamily, columns=fullflexible,language=[LaTeX]TeX,
@@ -56,15 +56,12 @@
%show-spaces
}
-\usepackage{hyperxmp}
\usepackage[pdfdisplaydoctitle=true,%hyperfootnotes=false,
]{hyperref}
\hypersetup{
pdftitle={The tagpdf package, v\csname UlrikeFischer@package@version\endcsname},
pdfauthor=Ulrike Fischer,
- pdfaconformance=a,
- pdfuapart=1,
colorlinks}
\tcbuselibrary{documentation}
@@ -79,7 +76,7 @@
\usepackage{tagpdfdocu-patches}
-\cfoot*{\pagemark}
+%\cfoot*{\pagemark}
%
@@ -89,28 +86,21 @@
\date{\csname UlrikeFischer@package@date\endcsname}
\author{Ulrike Fischer\thanks{fischer@troubleshooting-tex.de}}
-\tagpdfsetup{paratagging,paratagging-show}
-
\usepackage{shortvrb}
\MakeShortVerb|
\begin{document}
\tagstructbegin{tag=Title}
-\tagmcbegin{tag=Title}
-
-\begin{center}%\let\thanks\par
+\begin{center}%
+\let\thanks\footnote
\makeatletter
- \usekomafont{title}{\huge \@title \par}
-
- \vskip .5em
- \usekomafont{author}{\@author \par}
-
- \vskip 1em%
- \usekomafont{date}{\@date \par}%
-
+\huge \@title \par
+\vskip .5em
+\@author \par
+\vskip 1em%
+\@date \par
\end{center}%
- \tagmcend
\tagstructend
@@ -147,8 +137,12 @@ Issues, comments, suggestions should be added as issues to the github tracker:
\tagstructend
+\tagtool{sec-add-grouping=false}
+
\tableofcontents
+\tagtool{sec-add-grouping}
+
\section{Introduction}
@@ -250,7 +244,7 @@ It is also possible that validators contradict: that the one says everything is
To make the package usable examples are needed: examples that demonstrate how various structures can be tagged and which patches are needed, examples for the test suite, examples that demonstrates problems.
-\begin{tcolorbox}[before upper=\tagpdfparaOn]
+\begin{tcolorbox}
Feedback, contribuations and corrections are welcome!
\end{tcolorbox}
@@ -299,7 +293,7 @@ I added code to add \enquote{real} space glyphs to the \PDF{}, see section \ref{
\item \textbf{Breaking change!} The argument of \texttt{newattribute} option should no longer add the dictionary bracket \verb+<<..>>+, they are added by the code.
-\item \textbf{Breaking change!} The package now requires the new PDF management as provided for now by the package \texttt{pdfmanagement-testphase}. \texttt{pdfmanagement-testphase},
+\item \textbf{Breaking change!} The package now requires the new PDF management as provided for now by the package \pkg{pdfmanagement-testphase}. \pkg{pdfmanagement-testphase},
prepares the ground for better support for tagged PDF in \LaTeX{}.
It is part of a larger project to automatically generate tagged PDF \url{https://www.latex-project.org/news/2020/11/30/tagged-pdf-FS-study/}
@@ -348,7 +342,8 @@ add annotations to the structure.
\item \textbf{More engines supported} The generic mode of \pkg{tagpdf} now works
(theoretically, it is not much tested) with all engines supported
-by the pdfmanagement. So compilations with Xe\LaTeX{} or with dvips should work. But it should be noted that
+by the \PDF\ management.
+So compilations with Xe\LaTeX{} or with dvips should work. But it should be noted that
these engines and backends don't support the |interspaceword| option. With Xe\LaTeX{} it is perhaps possible
implement something with |\XeTeXinterchartoks|, but for the dvips route I don't see an option (apart from lots
of manual macros everywhere).
@@ -439,11 +434,34 @@ Small bug fixes.
\item Small bug fixes.
\end{itemize}
+\subsection{Changes in version 0.98}
+
+\begin{itemize}
+\item The declarations of tag namespaces have been externalized and are now
+read from files when \pkg{tagpdf} is loaded.
+
+\item The \PDF{} format (and some of the standards) declare various parent-child rules for
+structure tags. A first step to implement this rules and check if they are fullfilled have
+been done. More information can be found in section~\ref{sec:parent-child}.
+
+\item As a side effect of the new rule checking, the requirements for new tags
+ have been tightened: Adding a new tag with add-new-tag now requires that the target role is
+ defined. Unknown roles error.
+
+\item |\tagmcbegin| no longer requires that a tag is set, instead if will pick up
+the tag name from the surrounding structure.
+
+\item Structure destination are now created also with \PDF \textless\,2.0. They shouldn't harm and
+can improve the html export.
+
+\end{itemize}
+
+
\subsection{Proof of concept: the tagging of the documentation itself}
Starting with version 0.6 the documentation itself has been tagged. The tagging wasn't (and isn't) in no way perfect. The validator from Adobe didn't complain, but PAX3 wanted alternative text for all links (no idea why) and so I put everywhere simple text like \enquote{link} and \enquote{ref}. The links to footnotes gave warnings, so I disabled them. I used types from the \PDF{} version 1.7, mostly as I have no idea what should be used for code in 2.0. Margin notes were simply wrong \ldots
-The tagging has been improved and automated over time in sync with improvements and new features in the LaTeX kernel and the pdfmanagement code.
+The tagging has been improved and automated over time in sync with improvements and new features in the LaTeX kernel and the \PDF\ management code.
But even if the documentation passed the tests of the validators: as mentioned above passing a formal test doesn't mean that the content is really good and usable. I have a lot doubts that the code parts are really readable. The bibliography and the references must be improved. The user commands used for the tagging and also some of the patches used are still rather crude. So there is lot space for improvement.
@@ -467,11 +485,16 @@ The \texttt{tagpdf} package can then be loaded and activated by using the \textt
the \texttt{testphase} key is documented in \texttt{documentmetadata-support-doc.pdf} which
is part of the \texttt{latex-lab} bundle.
+Various parts of the code differentiate between \PDF{} version 2.0 and lower versions. If
+\PDF{} 2.0 is wanted it is required to set the version early in the \cs{DocumentMetadata}
+command so that \pkg{tagpdf} can pick up the correct code path.
+
\begin{lstlisting}
\DocumentMetadata
{
% testphase = phase-I, % tagging without paragraph tagging
testphase = phase-II % tagging with paragraph tagging and other new stuff.
+ % pdfversion = 2.0 % pdfversion must be set here.
}
\documentclass{article}
\begin{document}
@@ -481,11 +504,12 @@ some text
\minisec{Activation needed!}
-The package can also be loaded normally with |\usepackage| (but it is
-still required to use \cs{DocumentMetadata} to load the pdfmanagement) but
+It is not recommended anymore, but
+the package can also be loaded normally with |\usepackage| (but it is
+still required to use \cs{DocumentMetadata} to load the \PDF\ management) but
it will then -- apart from loading more packages and defining a lot of things -- not do much. You will have to \emph{activate} it with \verb+\tagpdfsetup+.
-The pdfmanagement loaded with \cs{DocumentMetadata} will in any case load \texttt{tagpdf-base} a
+The \PDF\ management loaded with \cs{DocumentMetadata} will in any case load \texttt{tagpdf-base} a
small package that provides no-op versions of the main tagging commands.
Most commands do nothing if tagging is not activated, but in case a test is needed a command (with the usual p,T,F variants) is provided:
@@ -500,7 +524,7 @@ The check is true only if \emph{everything} is activated. In all other cases (in
%TODO think about tagging of the keys. Aside? Header?
-The package has two different modes: The \textbf{generic mode} works (in theory, currently only tested with pdftex and luatex) probably with all engines, the \textbf{lua mode} only with luatex. The differences between both modes will be described later. The mode can be set with package options:
+The package has two different modes: The \textbf{generic mode} works (in theory, currently only fully tested with pdflatex) probably with all engines, the \textbf{lua mode} only with lualatex. The differences between both modes will be described later. The mode can be set with package options:
\DescribeKey{luamode}
@@ -594,29 +618,59 @@ endstream
\end{lstlisting}
-From this stream one can extract the characters and their placement on the page but not their semantic meaning (the first line is actually a section heading, the last the page number). And while in the example the order is correct there is actually no guaranty that the stream contains the text in the order it should be read.
-
-Tagging means to enrich the \PDF{} with information about the \emph{semantic} meaning and the \emph{reading order}. (Tagging can do more, one can also store all sorts of layout information like font properties and indentation with tags. But as I already wrote this package concentrates on the part of tagging that is needed to improve accessibility.)
-
+From this stream one can extract the characters and their placement on the page
+but not their semantic meaning (the first line is actually a section heading,
+the last the page number). And while in the example the order is correct
+there is actually no guaranty that the stream contains the text in the order
+it should be read.
+Tagging means to enrich the \PDF{} with information about the \emph{semantic}
+meaning and the \emph{reading order}. (Tagging can do more, one can also
+store all sorts of layout information like font properties and indentation
+with tags. But as I already wrote this package concentrates on the part of
+tagging that is needed to improve accessibility.)
\subsection{Three tasks}
-
To tag a \PDF{} three tasks must be carried out:
\begin{enumerate}
\item
- \textbf{The mark-content-task}:\sidenote{mc-task} The document must add \enquote{labels} to the page stream which allows to identify and reference the various chunks of text and other content. This is the most difficult part of tagging -- both for the document writer but also for the package code. At first there can be quite many chunks as every one is a leaf node of the structure and so often a rather small unit. At second the chunks must be defined page-wise -- and this is not easy when you don't know where the page breaks are. Also in a standard document a lot text is created automatically, e.g. the toc, references, citations, list numbers etc and it is not always easy to mark them correctly.
-
-\item
- \textbf{The structure-task}:\sidenote{struct-task} The document must declare the structure. This means marking the start and end of semantically connected portions of the document (correctly nested as a tree). This too means some work for the document writer, but less than for the mc-task: at first quite often the mc-task and the structure-task can be combined, e.g. when you mark up a list number or a tabular cell or a section header; at second one doesn't have to worry about page breaks so quite often one can patch standard environments to declare the structure. On the other side a number of structures end in \LaTeX\ only implicitly -- e.g. an item ends at the next item, so getting the \PDF{} structure right still means that additional mark up must be added.
-
-
-\item
- \textbf{The tree management}:\sidenote{tree-task} At last the structure must be written into the \PDF{}. For every structure an object of type \texttt{StructElem} must be created and flushed with keys for the parents and the kids. A parenttree must be created to get a reference from the mc-chunks to the parent structure. A rolemap must be written. And a number of dictionary entries. All this is hopefully done automatically and correctly by the package \ldots.
+ \textbf{The mark-content-task}:\sidenote{mc-task} The document must add
+ \enquote{labels} to the page stream which allows to identify and reference
+ the various chunks of text and other content.
+ This is the most difficult part of tagging -- both for the document writer
+ but also for the package code. At first there can be quite many
+ chunks as every one is a leaf node of the structure and so often a rather
+ small unit. At second the chunks must be defined page-wise -- and
+ this is not easy when you don't know where the page breaks are.
+ Also in a standard document a lot text is created automatically, e.g.
+ the toc, references, citations, list numbers etc and it is not always
+ easy to mark them correctly.
+
+\item \textbf{The structure-task}:\sidenote{struct-task} The document must
+ declare the structure. This means marking the start and end of
+ semantically connected portions of the document (correctly nested as a
+ tree). This too means some work for the document writer, but less than
+ for the mc-task: at first quite often the mc-task and the
+ structure-task can be combined, e.g. when you mark up a list number or
+ a tabular cell or a section header; at second one doesn't have to worry
+ about page breaks so quite often one can patch standard environments to
+ declare the structure. On the other side a number of structures end in
+ \LaTeX\ only implicitly -- e.g. an item ends at the next item, so
+ getting the \PDF{} structure right still means that additional mark up
+ must be added.
+
+
+\item \textbf{The tree management}:\sidenote{tree-task} At last the
+ structure must be written into the \PDF{}. For every structure an
+ object of type \texttt{StructElem} must be created and flushed with
+ keys for the parents and the kids. A parenttree must be created to get
+ a reference from the mc-chunks to the parent structure. A rolemap must
+ be written. And a number of dictionary entries. All this is hopefully
+ done automatically and correctly by the package \ldots.
\end{enumerate}
@@ -679,9 +733,9 @@ To tag a \PDF{} three tasks must be carried out:
\end{tcolorbox}
-\tagstructbegin{tag=Caption}\tagmcbegin{tag=Caption}
-\caption{Schematical description of the relation between marked content in the page stream and the structure}
-\tagmcend\tagstructend
+\tagstructbegin{tag=Caption}\tagmcbegin{tag=Caption} \caption{Schematical
+description of the relation between marked content in the page stream and the
+structure} \tagmcend\tagstructend
\end{figure}
@@ -692,10 +746,18 @@ To tag a \PDF{} three tasks must be carried out:
-To be able to refer to parts of the text in the structure, the text in the page stream must get \enquote{labels}. In the \PDF{} reference they are called \enquote{marked content}. The three main variants needed here are:
+To be able to refer to parts of the text in the structure, the text in the
+page stream must get \enquote{labels}. In the \PDF{} reference they are
+called \enquote{marked content}. The three main variants needed here are:
\begin{description}
-\item[Artifacts] They are marked with of a pair of keywords, \texttt{BMC} and \texttt{EMC} which surrounds the text. \texttt{BMC} has a single prefix argument, the fix tag name \texttt{/Artifact}. Artifacts should be used for irrelevant text and page content that should be ignored in the structure. Sadly it is often not possible to leave such text simply unmarked -- the accessibility tests in Acrobat and other validators complain.
+\item[Artifacts] They are marked with of a pair of keywords, \texttt{BMC}
+ and \texttt{EMC} which surrounds the text. \texttt{BMC} has a single
+ prefix argument, the fix tag name \texttt{/Artifact}. Artifacts should
+ be used for irrelevant text and page content that should be ignored in
+ the structure. Sadly it is often not possible to leave such text simply
+ unmarked -- the accessibility tests in Acrobat and other validators
+ complain.
\begin{lstlisting}
@@ -708,8 +770,11 @@ To be able to refer to parts of the text in the structure, the text in the page
-\item[Artifacts with a type]
-They are marked with of a pair of keywords, \texttt{BDC} and \texttt{EMC} which surrounds the text. \texttt{BDC} has two arguments: again the tag name \texttt{/Artifact} and a following dictionary which allows to specify the suppressed info. Text in header and footer can e.g. be declared as pagination like this:
+\item[Artifacts with a type] They are marked with of a pair of keywords,
+ \texttt{BDC} and \texttt{EMC} which surrounds the text. \texttt{BDC}
+ has two arguments: again the tag name \texttt{/Artifact} and a
+ following dictionary which allows to specify the suppressed info. Text
+ in header and footer can e.g. be declared as pagination like this:
\begin{lstlisting}
@@ -721,10 +786,19 @@ They are marked with of a pair of keywords, \texttt{BDC} and \texttt{EMC} which
-\item[Content] Content is marked also with of a pair of keywords, \texttt{BDC} and \texttt{EMC}. The first argument of \texttt{BDC} is a tag name which describes the structural type of the text\footnote{There is quite some redundancy in the specification here. The structural type is also set in the structure tree. One wonders if it isn't enough to use always \texttt{/SPAN} here.}
- Examples are \texttt{/P} (paragraph), \texttt{/H2} (heading), \texttt{/TD} (table cell). The reference mentions a number of standard types but it is possible to add more or to use different names.
+\item[Content] Content is marked also with of a pair of keywords,
+ \texttt{BDC} and \texttt{EMC}. The first argument of \texttt{BDC} is a
+ tag name which describes the structural type of the text\footnote{There
+ is quite some redundancy in the specification here. The structural type
+ is also set in the structure tree. One wonders if it isn't enough to
+ use always \texttt{/SPAN} here.} Examples are \texttt{/P} (paragraph),
+ \texttt{/H2} (heading), \texttt{/TD} (table cell). The reference
+ mentions a number of standard types but it is possible to add more or
+ to use different names.
-In the second argument of \texttt{BDC} -- in the property dictionary -- more data can be stored. \emph{Required} is an \texttt{/MCID}-key which takes an integer as a value:
+In the second argument of \texttt{BDC} -- in the property dictionary -- more
+data can be stored. \emph{Required} is an \texttt{/MCID}-key which takes an
+integer as a value:
\begin{lstlisting}
@@ -734,10 +808,15 @@ In the second argument of \texttt{BDC} -- in the property dictionary -- more dat
\end{lstlisting}
-This integer is used to identify the chunk when building the structure tree. The chunks are numbered by page starting with 0. As the numbers are also used as an index in an array they shouldn't be \enquote{holes} in the numbering system
-(It is perhaps possible to handle a numbering scheme not starting by 0 and having holes, but it will enlarge the \PDF{} as one would need dummy objects.).
+This integer is used to identify the chunk when building the structure
+tree. The chunks are numbered by page starting with 0. As the numbers are
+also used as an index in an array they shouldn't be \enquote{holes} in the
+numbering system (It is perhaps possible to handle a numbering scheme not
+starting by 0 and having holes, but it will enlarge the \PDF{} as one would
+need dummy objects.).
-It is possible to add more entries to the property dictionary, e.g. a title, alternative text or a local language setting.
+It is possible to add more entries to the property dictionary, e.g. a
+title, alternative text or a local language setting.
\end{description}
@@ -754,8 +833,11 @@ The needed markers can be added with low level code e.g. like this (in pdftex sy
This sounds easy. But there are quite a number of traps, mostly with pdfLaTeX:
\begin{enumerate}[beginpenalty=10000]
- \item \PDF{} is a page oriented format. And this means that the start \texttt{BDC}/\texttt{BMC} and the corresponding end \texttt{EMC} must be on the same page.
- So marking e.g. a section title like in the following example won't always work as the literal before the section could end on the previous page:
+ \item \PDF{} is a page oriented format. And this means that the start
+ \texttt{BDC}/\texttt{BMC} and the corresponding end \texttt{EMC}
+ must be on the same page. So marking e.g. a section title like in the
+ following example won't always work as the literal before the
+ section could end on the previous page:
\begin{lstlisting}
@@ -765,54 +847,86 @@ This sounds easy. But there are quite a number of traps, mostly with pdfLaTeX:
\end{lstlisting}
- Using the literals \emph{inside} the section argument is better, but then one has to take care that they don't wander into the header and the toc.
-
- \item
- Literals are \enquote{whatsits} nodes and can change spacing, page and line breaking. The literal \emph{behind} the section in the previous example could e.g. lead to a lonely section title at the end of the page.
-
- \item
- The \texttt{/MCID} numbers must be unique on a page. So you can't use the literal in a saved box that you reuse in various places. This is e.\,g. a problem with \texttt{longtable} as it saves the table header and footer in a box.
-
- \item
- The \texttt{/MCID}-chunks are leaf nodes in the structure tree, so they shouldn't be nested.
-
- \item
- Often text in a document is created automatically or moved around: entries in the table of contents, index, bibliography and more. To mark these text chunks correctly one has to analyze the code creating such content to find suitable places to inject the literals.
-
- \item
- The literals are inserted directly and not at shipout. This means that due to the asynchronous page breaking of \TeX\ the MCID-number can be wrong even if the counter is reset at every page. This package uses in generic mode a label-ref-system to get around this problem. This sadly means that often at least three compilations are needed until everything has settled down.
-
- It can actually be worse: If the text is changed after the MCID-numbers have been assigned, and
- a new mc-chunk is inserted in the middle of the page, then all the numbers have to be recalculated
- and that requires again a number of compilations until it really settles down again.
- Internal references are especially problematic here, as the first compilation
- typically creates a non-link |??|, and only the second inserts the structure and the new mc.
- When the reference system in LaTeX will be extended, care will be taken to ensure that already the dummy text builds a chunk.
- Until then the advice is to first compile the document and resolve all cross-reference and to activate tagging only at the end.
-
-
- \item
- There exist environments which process their content more than once -- examples are \texttt{align} and \texttt{tabularx}.
+ Using the literals \emph{inside} the section argument is better, but then
+ one has to take care that they don't wander into the header and the toc.
+
+ \item Literals are \enquote{whatsits} nodes and can change spacing, page
+ and line breaking. The literal \emph{behind} the section in the
+ previous example could e.g. lead to a lonely section title at the end
+ of the page.
+
+ \item The \texttt{/MCID} numbers must be unique on a page. So you can't
+ use the literal in a saved box that you reuse in various places. This
+ is e.\,g. a problem with \texttt{longtable} as it saves the table
+ header and footer in a box.
+
+ \item The \texttt{/MCID}-chunks are leaf nodes in the structure tree, so
+ they shouldn't be nested.
+
+ \item Often text in a document is created automatically or moved around:
+ entries in the table of contents, index, bibliography and more. To
+ mark these text chunks correctly one has to analyze the code creating
+ such content to find suitable places to inject the literals.
+
+ \item The literals are inserted directly and not at shipout. This means
+ that due to the asynchronous page breaking of \TeX\ the MCID-number
+ can be wrong even if the counter is reset at every page. This package
+ uses in generic mode a label-ref-system to get around this problem.
+ This sadly means that often at least three compilations are needed
+ until everything has settled down.
+
+ It can actually be worse: If the text is changed after the MCID-numbers
+ have been assigned, and a new mc-chunk is inserted in the middle of the
+ page, then all the numbers have to be recalculated and that requires
+ again a number of compilations until it really settles down again.
+ Internal references are especially problematic here, as the first
+ compilation typically creates a non-link |??|, and only the second
+ inserts the structure and the new mc. When the reference system in LaTeX
+ will be extended, care will be taken to ensure that already the dummy
+ text builds a chunk. Until then the advice is to first compile the
+ document and resolve all cross-reference and to activate tagging only at
+ the end.
+
+
+ \item There exist environments which process their content more than once
+ -- examples are \texttt{align} and \texttt{tabularx}.
So one has to check for doublettes and holes in the counting system.
- \item
- \PDF{} is a page oriented format. And this means that the start and the end marker must be on the same page \ldots\ \emph{so what to do with normal paragraphs that split over pages??}. This question will be discussed in subsection~\ref{sec:splitpara}.
+ \item \PDF{} is a page oriented format. And this means that the start and
+ the end marker must be on the same page \ldots\ \emph{so what to do
+ with normal paragraphs that split over pages??}. This question will
+ be discussed in subsection~\ref{sec:splitpara}.
\end{enumerate}
\subsubsection{Generic mode versus lua mode in the mc-task}
-While in generic mode the commands insert the literals directly and so have all the problems described above the lua mode works quite differently: The tagging commands don't insert literals but set some \emph{attributes} which are attached to all the following nodes. When the page is shipped out some lua code is called which wanders through the shipout box and injects the literals at the places where the attributes changes.
+While in generic mode the commands insert the literals directly and so have
+all the problems described above the lua mode works quite differently: The
+tagging commands don't insert literals but set some \emph{attributes} which
+are attached to all the following nodes. When the page is shipped out some
+lua code is called which wanders through the shipout box and injects the
+literals at the places where the attributes changes.
This means that quite a number of problems mentioned above are not relevant for the lua mode:
-\begin{enumerate}
-\item Pagebreaks between start and end of the marker are \emph{not} a problem. So you can mark a complete paragraph. If a pagebreak occur directly after an start marker or before an end marker this can lead to empty chunks in the \PDF{} and so bloat up \PDF{} a bit, but this is imho not really a problem (compared to the size increase by the rest of the tagging).
-\item The commands don't insert literals directly and so affect line and page breaking much less.
-\item The numbering of the MCID are done at shipout, so no label/ref system is needed.
-\item The code can do some marking automatically. Currently everything that has not been marked up by the document is marked as artifact.
-\end{enumerate}
+\begin{enumerate}
+\item Pagebreaks between start and end of the marker are
+\emph{not} a problem. So you can mark a complete paragraph. If a pagebreak
+occur directly after an start marker or before an end marker this can lead to
+empty chunks in the \PDF{} and so bloat up \PDF{} a bit, but this is imho not
+really a problem (compared to the size increase by the rest of the tagging).
+
+\item The commands don't insert literals directly and so affect line and page
+breaking much less.
+
+\item The numbering of the MCID are done at shipout, so no label/ref system
+ is needed.
+
+\item The code can do some marking automatically. Currently everything that
+ has not been marked up by the document is marked as artifact.
+\end{enumerate}
@@ -820,37 +934,67 @@ This means that quite a number of problems mentioned above are not relevant for
\subsubsection{Commands to mark content and chunks}
-In generic mode\sidenote{Generic mode only} is vital that the end command is executed on the same page as the begin command. So think carefully how to place them.
-For strategies how to handle paragraphs that split over pages see subsection~\ref{sec:splitpara}.
+In generic mode\sidenote{Generic mode only} is vital that the end command is
+executed on the same page as the begin command. So think carefully how to
+place them. For strategies how to handle paragraphs that split over pages see
+subsection~\ref{sec:splitpara}.
\begin{docCommand}{tagmcbegin}{\marg{key-val-list}}\end{docCommand}
\begin{docCommand}{tag_mc_begin:n}{\marg{key-val-list}}\end{docCommand}
-These commands insert the begin of the marked content code in the \PDF{}. They don't start a paragraph. \emph{They don't start a group}.
-Such markers should not be nested. The command will warn you if this happens.
+These commands insert the begin of the marked content code in the \PDF{}.
+They don't start a paragraph. \emph{They don't start a group}. Such markers
+should not be nested. The command will warn you if this happens.
The key-val list understands the following keys:
\begin{description}
- \item[\PrintKeyName{tag}]
- This is required, unless you use the \PrintKeyName{artifact} key. The value of the key is normally one of the standard type listed in section \ref{sec:new-tag} (without a slash at the begin, this is added by the code). It is possible to setup new tags, see the same section. The value of the key is expanded, so it can be a command. The expansion is passed unchanged to the \PDF{}, so it should with a starting slash give a valid \PDF{} name (some ascii with numbers like \texttt{H4} is fine).
-
- \item[\PrintKeyName{artifact}]
- This will setup the marked content as an artifact. The key should be used for content that should be ignored. The key can take one of the values \PrintKeyName{pagination}, \PrintKeyName{pagination/header}, \PrintKeyName{pagination/footer}, \PrintKeyName{layout}, \PrintKeyName{page}, \PrintKeyName{background} and \PrintKeyName{notype} (this is the default). Text in the header and footer should normally be marked with \PrintKeyName{artifact=pagination} or \PrintKeyName{pagination/header}, \PrintKeyName{pagination/footer} but
- simply artifact (as it is now done automatically) should be ok too.
-
- It is not quite clear if rules and other decorative graphical objects needs to be marked up as artifacts. Acrobat seems not to mind if not, but PAC~3 complained.
-
- The validators complain if some text is not marked up, but it is not quite clear if this is a serious problem.
-
- The\sidenote{lua mode only} lua mode will mark up everything unmarked as \texttt{artifact=notype}. You can suppress this behaviour by setting the tagpdfsetup key \texttt{tagunmarked} to false. See section \ref{ssec:setup}.
-
- \item[\PrintKeyName{stash}]
- Normally marked content will be stored in the \enquote{current} structure. This may not be what you want. As an example you may perhaps want to put a marginnote behind or before the paragraph it is in the tex-code. With this boolean key the content is marked but not stored in the kid-key of the current structure.
-
- \item[\PrintKeyName{label}]
- This key sets a label by which you can call the marked content later in another structure (if it has been stashed with the previous key). Internally the label name will start with \texttt{tagpdf-}.
+ \item[\PrintKeyName{tag}] This key is optional. By default the tag name
+ of the surrounding structure is used, which normally should be fine.
+ But if needed the name can be set explicitly with this key. The value
+ of the key is typically one of the standard type listed in section
+ \ref{sec:new-tag} (without a slash at the begin, this is added by the
+ code). It is possible to setup new tags, see the same section. The
+ value of the key is expanded, so it can be a command. The expansion
+ is passed unchanged to the \PDF{}, so it should with a starting slash
+ give a valid \PDF{} name (some ascii with numbers like \texttt{H4}
+ is fine).
+
+ \item[\PrintKeyName{artifact}] This will setup the marked content as an
+ artifact. The key should be used for content that should be ignored.
+ The key can take one of the values \PrintKeyName{pagination},
+ \PrintKeyName{pagination/header}, \PrintKeyName{pagination/footer},
+ \PrintKeyName{layout}, \PrintKeyName{page},
+ \PrintKeyName{background} and \PrintKeyName{notype} (this is the
+ default). Text in the header and footer should normally be marked
+ with \PrintKeyName{artifact=pagination} or
+ \PrintKeyName{pagination/header}, \PrintKeyName{pagination/footer}
+ but simply artifact (as it is now done automatically) should be ok
+ too.
+
+ It is not quite clear if rules and other decorative graphical objects
+ needs to be marked up as artifacts. Acrobat seems not to mind if not, but
+ PAC~3 complained.
+
+ The validators complain if some text is not marked up, but it is not
+ quite clear if this is a serious problem.
+
+ The\sidenote{lua mode only} lua mode will mark up everything unmarked as
+ \texttt{artifact=notype}. You can suppress this behaviour by setting the
+ tagpdfsetup key \texttt{tagunmarked} to false. See section
+ \ref{ssec:setup}.
+
+ \item[\PrintKeyName{stash}] Normally marked content will be stored in the
+ \enquote{current} structure. This may not be what you want. As an
+ example you may perhaps want to put a marginnote behind or before the
+ paragraph it is in the tex-code. With this boolean key the content is
+ marked but not stored in the kid-key of the current structure.
+
+ \item[\PrintKeyName{label}] This key sets a label by which you can call
+ the marked content later in another structure (if it has been stashed
+ with the previous key). Internally the label name will start with
+ \texttt{tagpdf-}.
\item[\PrintKeyName{alt}]
This key inserts an \texttt{/Alt} value in the property dictionary of the BDC operator. See section~\ref{sec:alt}. The value is handled as verbatim string, commands are not expanded but the value will be expanded first once (so works like the key \texttt{alttext-o} in previous versions which has been removed).
@@ -865,10 +1009,15 @@ The key-val list understands the following keys:
- \item[\PrintKeyName{actualtext}]
- This key inserts an \texttt{/ActualText} value in the property dictionary of the BDC operator. See section~\ref{sec:alt}. The value is handled as verbatim string, commands are not expanded but the value will be expanded first once (so works like the key \texttt{actualtext-o} in previous versions which has been removed).
+ \item[\PrintKeyName{actualtext}] This key inserts an \texttt{/ActualText}
+ value in the property dictionary of the BDC operator. See
+ section~\ref{sec:alt}. The value is handled as verbatim string,
+ commands are not expanded but the value will be expanded first once
+ (so works like the key \texttt{actualtext-o} in previous versions
+ which has been removed).
- That means that you can do something like in the following listing and and it will insert \verb+X+ (hex encoded) in the \PDF{}.
+ That means that you can do something like in the following listing and
+ and it will insert \verb+X+ (hex encoded) in the \PDF{}.
\begin{lstlisting}
@@ -876,18 +1025,26 @@ The key-val list understands the following keys:
\tagmcbegin{tag=Span,actualtext=\myactualtext}
\end{lstlisting}
- According to the PDF reference, \texttt{/ActualText} should only be used on marked content sequence of type Span. This is not enforced by the code currently.
+ According to the PDF reference, \texttt{/ActualText} should only be used
+ on marked content sequence of type Span. This is not enforced by the code
+ currently.
- \item[\PrintKeyName{raw}]
- This key allows you to add more entries to the properties dictionary. The value must be correct, low-level \PDF{}. E.g. \verb+raw=/Alt (Hello)+ will insert an alternative Text.
+ \item[\PrintKeyName{raw}] This key allows you to add more entries to the
+ properties dictionary. The value must be correct, low-level \PDF{}.
+ E.g. \verb+raw=/Alt (Hello)+ will insert an alternative Text.
\end{description}
\begin{docCommand}{tagmcend}{}\end{docCommand}
\begin{docCommand}{tag_mc:end}{}\end{docCommand}
-These commands insert the end code of the marked content. They don't end a group and it doesn't matter if they are in another group as the starting commands. In generic mode both commands check if there has been a begin marker and issue a warning if not. In luamode it is often possible to omit the command, as the effect of the begin command ends with a new \verb+\tagmcbegin+ anyway.
+These commands insert the end code of the marked content. They don't end a
+group and it doesn't matter if they are in another group as the starting
+commands. In generic mode both commands check if there has been a begin
+marker and issue a warning if not. In luamode it is often possible to omit
+the command, as the effect of the begin command ends with a new
+\verb+\tagmcbegin+ anyway.
% no longer relevant
@@ -913,7 +1070,9 @@ These commands insert the end code of the marked content. They don't end a group
\begin{docCommand}{tag_mc_use:n}{}\end{docCommand}
-These commands allow you to record a marked content that you stashed away into the current structure. Be aware that a marked content can be used only once -- the command will warn you if you try to use it a second time.
+These commands allow you to record a marked content that you stashed away
+into the current structure. Be aware that a marked content can be used only
+once -- the command will warn you if you try to use it a second time.
\begin{docCommand}{tag_mc_end_push:}{}\end{docCommand}
@@ -1205,7 +1364,7 @@ The method is described in Frank Mittelbach's talk at TUG~2021
Please note
\begin{itemize}
-\item The code requires a pdfmanagement-testphase version v0.95i or newer.
+\item The code requires a \pkg{pdfmanagement-testphase} version v0.95i or newer.
\item Typically you will need more compilations than previously, don't rely on the rerun messages, but if something looks wrong
rerun.
\item The code relies on that related |\tagmcbegin| and |\tagmcend| are in the same boxing level. If one is in a box (which hides the marks) and the other in the main galley, things will go wrong.
@@ -1324,7 +1483,7 @@ The key-val list understands the following keys:
% By default a structure is added as kid to the currently active structure.
With the parent key one can choose another parent. The value is a structure number which
must refer to an already existing, previously created structure. Such a structure
- number can for example be have been stored with \cs{tag\_get:n}, but one can also use
+ number can have been stored previously with \cs{tag\_get:n}, but one can also use
a label on the parent structure and then use
\cs{ref\_value:nn}\verb+{tagpdfstruct-label}{tagstruct}+ to retrieve it.
@@ -1648,14 +1807,20 @@ In PDF 2.0 the situation is a bit more complicated. At first PDF~2.0 introduced
That means that a type can have more than one \enquote{meaning} depending on the name space it belongs to.
|section (name space A)| and |section (name space B)| are two different types.
-At second PDF 2.0 still requires that a tagged PDF maps all types to a standard type, but now there are three sets of standard types (The meanings of the PDF types can be looked up in the \PDF{}-references \parencite{pdfspec-iso32000-1,pdfspec-iso32000-2_2020}):
+At second PDF 2.0 still requires that a tagged PDF maps all types to a
+standard type, but now there are three sets of standard types (The meanings
+of the PDF types can be looked up in the \PDF{}-references
+\parencite{pdfspec-iso32000-1,pdfspec-iso32000-2_2020}):
\begin{enumerate}
\item The \emph{standard structure namespace for PDF 1.7}, also called the \emph{default standard structure namespace}. The public name of the namespace is |tag/NS/pdf|. This can be used to reference
the namespace e.g. in attributes. These are the structure names from PDF 1.7:
\ExplSyntaxOn
-\clist_use:Nn \c__tag_role_sttags_pdf_pdfII_clist {,\c_space_tl}
-,~ \clist_use:Nn\c__tag_role_sttags_only_pdf_clist {,\c_space_tl}
+\clist_clear:N\l_tmpa_clist
+\prop_map_inline:cn
+ { g__tag_role_NS_pdf_prop }
+ { \clist_put_right:Nn \l_tmpa_clist {#1} }
+\clist_use:Nn \l_tmpa_clist {,\c_space_tl }
\ExplSyntaxOff
\item The \emph{standard structure namespace for PDF 2.0}.
@@ -1663,11 +1828,27 @@ The public name of the namespace is |tag/NS/pdf2|. This can be used to reference
the namespace e.g. in attributes.
These are more or less same types as in PDF. The following types have been removed from this set:\\
\ExplSyntaxOn
-\clist_use:Nn\c__tag_role_sttags_only_pdf_clist {,\c_space_tl}\\
+\clist_clear:N\l_tmpa_clist
+\prop_map_inline:cn { g__tag_role_NS_pdf_prop }
+ {
+ \prop_if_in:cnF
+ { g__tag_role_NS_pdf2_prop }
+ {#1}
+ { \clist_put_right:Nn \l_tmpa_clist {#1} }
+ }
+\clist_use:Nn \l_tmpa_clist {,\c_space_tl }\\
\ExplSyntaxOff
and the following are new:\\
\ExplSyntaxOn
-\clist_use:Nn \c__tag_role_sttags_only_pdfII_clist {,\c_space_tl}
+\clist_clear:N\l_tmpa_clist
+\prop_map_inline:cn { g__tag_role_NS_pdf2_prop }
+ {
+ \prop_if_in:cnF
+ { g__tag_role_NS_pdf_prop }
+ {#1}
+ { \clist_put_right:Nn \l_tmpa_clist {#1} }
+ }
+\clist_use:Nn \l_tmpa_clist {,\c_space_tl }
\ExplSyntaxOff
\item MathML 3.0 as an \emph{other namespaces}.
@@ -1684,10 +1865,16 @@ syntax |section/H1| should in most cases do the right thing.
\begin{description}
\item[\PrintKeyName{tag}] This is the name of the new type as it should then be used in \cs{tagstructbegin}.
-\item[\PrintKeyName{namespace}] This is the namespace of the new type. The value should be a shorthand of a namespace. The allowed values are currently |pdf|, |pdf2|, |mathml| and |user|. The default value (and recommended value for a new tag) is |user|. The public name of the user namespace is |tag/NS/user|. This can be used to reference
- the namespace e.g. in attributes.
-\item[\PrintKeyName{role}] This is the type the tag should be mapped too. In a PDF 1.7 or earlier this is normally a type from the |pdf| set, in PDF 2.0 from the |pdf|, |pdf2| and |mathml| set. It can also be a user type, or a still unknown type. The PDF format allows mapping to be done transitively. But you should be aware that tagpdf can't (or more precisely won't) check such unusual role mapping. It lies in the responsability of the author to ensure here that every type is correctly role mapped.
-\item[\PrintKeyName{role-namespace}] If the role is a known type the default value is the default namespace: |pdf2| for all types in this set, |pdf| for the type which exist only in PDF 1.7, |mathml| for the MathML types, and for previously defined user types whatever namespace has been set there. If the role is unknown, |user| is used and the code hopes that the type will be defined later.
+\item[\PrintKeyName{tag-namespace}] This is the namespace of the new type.
+ The value should be a shorthand of a namespace. The allowed values are
+ currently |pdf|, |pdf2|, |mathml| and |user|. The default value (and
+ recommended value for a new tag) is |user|. The public name of the user
+ namespace is |tag/NS/user|. This can be used to reference the namespace
+ e.g. in attributes.
+\item[\PrintKeyName{role}] This is the type the tag should be mapped too. In a PDF 1.7 or earlier this is normally a type from the |pdf| set, in PDF 2.0 from the |pdf|, |pdf2| or |mathml| set. It can also be a user type, then this user tag must have been declared before. The PDF format allows mapping to be done transitively. But you should be aware that tagpdf can't (or more precisely won't) check if some unusual role mapping makes really sense, this lies in the responsability of the author.
+
+\item[\PrintKeyName{role-namespace}] The default value is the default namespace of the role: |pdf2| for all types in this set, |pdf| for the type which exist only in PDF 1.7, |mathml| for the MathML types, and for previously defined user types whatever namespace has been set there. With this key the value can be overwritten.
+
\item[unknown key] An unknown key is interpreted as a |tag/role|, this preserves the old syntax. So this two calls are equivalent:
\begin{lstlisting}
@@ -1697,10 +1884,71 @@ syntax |section/H1| should in most cases do the right thing.
\end{description}
-The exact effects of the key depends on the PDF version. With PDF 1.7 or older the namespace keys are ignored, with PDF 2.0 the namespace keys are use to setup the correct rolemaps. The |namespace| key is also used to define the default namespace if the type is used as a role or as tag in a structure.
+The exact effects of the keys depend on the PDF version. With PDF 1.7 or older the namespace keys are ignored, with PDF 2.0 the namespace keys are use to setup the correct rolemaps. The |namespace| key is also used to define the default namespace if the type is used as a role or as tag in a structure.
+
+\subsection{The \texttt{latex} namespace}
+Starting with version 0.98 work has started to setup specific latex tags. In
+\PDF{} 2.0 in form of a special name space, with \PDF{} 1.7 or older the
+tags are role mapped. This is work in progress and bound to change.
+\section{Checking parent-child rules}\label{sec:parent-child}
+
+The \PDF{} references formulate various rules about whether a structure can be
+a child of another structure, e.g. a \texttt{Sect} can not be a child of \texttt{P}.
+In the \PDF{} 1.7 reference this rules were
+rather vage, in the \PDF{} 2.0 reference there is a quite specific matrix,
+which sadly misses some of the tags from \PDF{} 1.7. The upcoming
+ISO norm 32005 will
+address this problem and extend the matrix to cover tags from
+\PDF{} 1.7 and 2.0 (but it still misses the \texttt{math} tag and mathml
+tags).
+
+The rules in the matrix are not a simple allowed/not allowed. Instead some rules determine
+that structure elements
+can appear only once in a parent, or that additional requirements can be found in the
+descriptions of the standard structure types, e.g. \texttt{Caption} often has
+to be the first element in the parent structure, and elements like \texttt{Part} and \texttt{Div}
+inherit restrictions from parent structures.
+External standards like \PDF/UA can add more rules.
+
+Altogether this doesn't make it easy to check if a structure tree is conformant or not without slowing down
+the compilation a lot.
+
+With version 0.98 some first steps to do checks (and to react to the result of a change)
+have been implemented. Some checks will led to warning directly, but the majority
+will only be visible if the log-level is increased.
+
+Typical messages will look then like this
+
+\begin{lstlisting}[mathescape]
+Package tagpdf Info: The rule between parent 'Sect (from Sect/pdf2)'
+(tagpdf) and child 'H10 (from H10/pdf2)' is '1 (0..n)'
+
+Package tagpdf Info: The rule between parent 'H2 (from subsection/latex)'
+(tagpdf) and child 'H1 (from section/latex)' is '-1 ($\emptyset$)'
+\end{lstlisting}
+
+The descriptions of the parent and childs are rather verbose as the checks have to take role mapping and name spaces into account. The result of a check is a number---negative if the relation is not allowed,
+positive if allowed. The text in the parentheses show the symbols used in the \PDF-matrix.
+
+Be aware
+\begin{itemize}
+\item This doesn't test all rules, it only implements (hopefully correctly) the matrix.
+\item There can be differences between \PDF~1.7 and 2.0, e.g. \texttt{FENote} is rolemapped to \texttt{Note}
+in \PDF~1.7 and then has different containment rules.
+\item The special tag \texttt{MC} stands for mc-chunks, so \enquote{real content} (the matrix has containments rules for this too).
+\item Currently there is as only negative number \texttt{\textminus1} but that is bound to change, depending on if (and how) it is possible to \enquote{repair} a disallowed parent-child relation.
+\item Warnings can be wrong.
+\end{itemize}
+
+
+
+
+
+
+
\section{\enquote{Real} space glyphs}\label{sec:spacechars}
@@ -1745,20 +1993,20 @@ This is in pdftex a primitive. It inserts the dummy space glyph. \pkg{tagpdf} de
\TeX{}live 2022 (earlier in miktex) both engines will knew new keywords which allow
to create structure destination easily.
- Support for this has been already added to the pdfmanagement and \pkg{tagpdf} will make
- use of it if possible. In most cases it should simply work, but one should be aware
- that as one now has a destination that is actually tied to the content it gets more
- important to actually consider the context and the place where such destinations
- are created. It now makes a difference if the destination is created before the
- structure is opened or after so in some cases
- code that place destinations should be changed to place them inside the structure they
- belong too. .
- One also has to consider the pages connected to the destinations: The structure destination
- is bound to the page where the structure \emph{begins}, if this differ from the page of the page destination
- (e.g. if the destination is created by a \verb+\phantomsection+ in the middle of a longer paragraph)
- then be necessary to surround
- destinations with a dummy structure (a Span or an Artifact) to
- get the right page number.
+ Support for this has been already added to the \PDF\ management and
+ \pkg{tagpdf} will make use of it if possible. In most cases it should simply
+ work, but one should be aware that as one now has a destination that is
+ actually tied to the content it gets more important to actually consider the
+ context and the place where such destinations are created. It now makes a
+ difference if the destination is created before the structure is opened or
+ after so in some cases code that place destinations should be changed to
+ place them inside the structure they belong too. One also has to consider
+ the pages connected to the destinations: The structure destination is bound
+ to the page where the structure \emph{begins}, if this differ from the page
+ of the page destination (e.g. if the destination is created by a
+ \verb+\phantomsection+ in the middle of a longer paragraph) then may be
+ necessary to surround destinations with a dummy structure (a Span or an
+ Artifact) to get the right page number.
@@ -2025,4 +2273,3 @@ This maps 0 to an array and 2 to the object reference \texttt{21 0 R}. Number tr
\end{document}
%http://msf.mathmlcloud.org/file_formats/8 %sample \PDF{} for math
-
diff --git a/macros/latex/contrib/tagpdf/tagpdfdocu-patches.sty b/macros/latex/contrib/tagpdf/tagpdfdocu-patches.sty
index e01f9fa594..9e39ec1547 100644
--- a/macros/latex/contrib/tagpdf/tagpdfdocu-patches.sty
+++ b/macros/latex/contrib/tagpdf/tagpdfdocu-patches.sty
@@ -1,145 +1,86 @@
%\RequirePackage[enable-debug]{expl3}[2018/06/14]
-\ProvidesExplPackage {tagpdfdocu-patches} {2022-08-24} {0.97}
+\ProvidesExplPackage {tagpdfdocu-patches} {2022-12-22} {0.98}
{patches/commands for the tagpdf documentation}
-\RequirePackage{etoolbox}
+\RequirePackage{etoolbox,xpatch}
-%%%%%
-% tableofcontents
-% no internal patches, but KOMA-only solution
-% TODO it must be checked how best practice is now for the table of contents.
-%%%%%
+%vLogos
-
-\AfterTOCHead{\tag_struct_begin:n{tag=TOC}}
-\AfterStartingTOC{\tag_struct_end:} %end TOC
-%Marking the toc entries
-%around the whole entry so only structure:
-\newcommand\tagscrtocentry[1]{\tag_struct_begin:n{tag=TOCI}#1\tag_struct_end:}
-
-%leaf so structure and mc:
-\newcommand\tagscrtocpagenumber[1]
- {
- \tag_struct_begin:n{tag=Reference}
- \tag_mc_begin:n{tag=Reference}
- #1
- \tag_mc_end:
- \tag_struct_end:
- }
-
-
-\DeclareTOCStyleEntry[
- entryformat=\tagscrtocentry,
- pagenumberformat=\tagscrtocpagenumber]{tocline}{section}
-\DeclareTOCStyleEntry[
- entryformat=\tagscrtocentry,
- pagenumberformat=\tagscrtocpagenumber]{tocline}{subsection}
-\DeclareTOCStyleEntry[
- entryformat=\tagscrtocentry,
- pagenumberformat=\tagscrtocpagenumber]{tocline}{subsubsection}
-\DeclareTOCStyleEntry[
- entryformat=\tagscrtocentry,
- pagenumberformat=\tagscrtocpagenumber]{tocline}{paragraph}
-
-
-% \IfStr{#3} doesnt like a \label ...
-\renewcommand{\addtocentrydefault}[3]{%
-% \Ifstr{#3}{}{}
-% {%
- \Ifstr{#2}{}
- {%
- \addcontentsline{toc}{#1}
- {%
- \protect\nonumberline
- \tagstructbegin{tag=P}%
- \tagmcbegin{tag=P}%
- #3%
+\ExplSyntaxOn
+\DeclareRobustCommand\TeX{
+ \tag_mc_end_push:
+ \tag_struct_begin:n{tag=Span,alt=TeX,actualtext=TeX}
+ \tagmcbegin{}
+ \kern-.1667em\lower.5ex\hbox{E}\kern-.125emX\@
+ \tagmcend
+ \tag_struct_end:
+ \tag_mc_begin_pop:n{}}
+\DeclareRobustCommand{\LaTeX}{
+ {
+ \tag_mc_end_push:
+ \tag_struct_begin:n{tag=Span,alt=LaTeX,actualtext=LaTeX}
+ \tagmcbegin{}
+ L\kern-.36em%
+ \sbox\z@ T%
+ \vbox to\ht\z@{\hbox{\check@mathfonts
+ \fontsize\sf@size\z@
+ \math@fontsfalse\selectfont
+ A}%
+ \vss}%
+ }%
+ \kern-.15em%
+ \TeX
\tagmcend
- \tagstructend
- }%
- }%
- {%
- \addcontentsline{toc}{#1}{%
- \tagstructbegin{tag=Lbl}%
- \tagmcbegin{tag=Lbl}%
- \protect\numberline{#2}%
- \tagmcend\tagstructend
- \tagstructbegin{tag=P}%
- \tagmcbegin{tag=P}%
- #3%
- \tagmcend
- \tagstructend
- }%
- }%
- %}
-}%
-
-% the dots must be marked too
-
-\renewcommand*{\TOCLineLeaderFill}[1][.]{
- \leaders\hbox{$\m@th
- \mkern \@dotsep mu\hbox{\tag_mc_begin:n{artifact}#1\tag_mc_end:}\mkern \@dotsep
- mu$}\hfill
-}
-
-%%%%%%%%%
-% Sectioning commands
-% no internal patches, but KOMA-only solution
-%%%%%%%%
-
-% the structure should be opened rather early to catch the refstepcounter!
-\AddtoDoHook{heading/begingroup}{\tagpdfparaOff\use_none:n}
-\cs_new_protected:Npn \__tag_struct_section_begin:n #1 {\tagstructbegin{tag=\prop_item:Nn\g_tag_section_level_prop{#1}}}
-\AddtoDoHook{heading/postinit}{\__tag_struct_section_begin:n}
-\AddtoDoHook{heading/endgroup}{\tagstructend\use_none:n}
-
-\prop_new:N \g_tag_section_level_prop
-\prop_gput:Nnn \g_tag_section_level_prop {section}{H1}
-\prop_gput:Nnn \g_tag_section_level_prop {subsection}{H2}
-\prop_gput:Nnn \g_tag_section_level_prop {subsubsection}{H3}
-\prop_gput:Nnn \g_tag_section_level_prop {paragraph}{H4}
-
-\renewcommand{\sectionlinesformat}[4]
- {
- \@hangfrom
- {\hskip #2
- %\tl_if_empty:nF{#3}
- \tl_if_in:nnF{\@empty}{#3}
- {
- \tag_mc_begin:n {tag=\prop_item:Nn\g_tag_section_level_prop{#1}}
- #3
- \tag_mc_end:
- }
- }
- {\tag_mc_begin:n {tag=\prop_item:Nn\g_tag_section_level_prop{#1}}
- #4
- \tag_mc_end:}%
- }
-
-% minisec is simply P, so we let paratagging handle this.
-% But we add a strong structure
-% TODO: Should changed to H6 as it is no longer required to have H6 only after H5
-% but need to check how to disable paratagging ...
-\cs_new:Nn \__tag_docu_tag_minisec:n
-{
- \tag_struct_begin:n {tag=Strong}
- \tag_mc_begin:n{tag=Strong}
- #1
- \tag_mc_end:
- \tag_struct_end:
-}
-%
-\addtokomafont{minisec}{\__tag_docu_tag_minisec:n}
-
-
+ \tag_struct_end:
+ \tag_mc_begin_pop:n{}
+ }
+
+
+% textbf
+
+\AddToHook{cmd/textbf/before}
+ {\leavevmode\tag_mc_end_push:\tag_struct_begin:n{tag=Strong}\tagmcbegin{}}
+
+\AddToHook{cmd/textbf/after}
+ {\tag_mc_end:\tag_struct_end:\tag_mc_begin_pop:n{}}
+
+
+\newcommand\minisec[1]{%
+ \if@noskipsec \leavevmode \fi
+ \par
+ \@afterindentfalse
+ \if@nobreak
+ \everypar{}%
+ \else
+ \addpenalty\@secpenalty\addvspace{1.5ex}%
+ \fi
+ {\tagpdfsetup{paratag=H10}\parindent \z@
+ \setlength{\parfillskip}{\z@ plus 1fil}%
+ \raggedright\normalfont\bfseries\nobreak
+ \nobreak\interlinepenalty \@M #1\par\nobreak%
+ }\nobreak
+ \@afterheading
+}
+
+
+
%%%%
%% Lists
%% patches enumitem internals!
%%%%
-\AddToHook{env/itemize/begin}{\par\tagstructbegin{tag=L}}%\par is needed to close the paragraph before.
+\tagpdfsetup
+ {
+ newattribute =
+ {itemize}{/O /List /ListNumbering/Unordered},
+ newattribute =
+ {enumerate}{/O /List /ListNumbering/Ordered},
+ newattribute =
+ {description}{/O /List /ListNumbering/Description},
+ }
+\AddToHook{env/itemize/begin}{\par\tagstructbegin{tag=L,attribute-class=itemize}}%\par is needed to close the paragraph before.
\AddToHook{env/itemize/end}{\par\tagstructend\tagstructend\tagstructend}%LBody,LI,L
-\AddToHook{env/enumerate/begin}{\par\tagstructbegin{tag=L}}
+\AddToHook{env/enumerate/begin}{\par\tagstructbegin{tag=L,attribute-class=enumerate}}
\AddToHook{env/enumerate/end}{\par\tagstructend\tagstructend\tagstructend}%LBody,LI,L
-\AddToHook{env/description/begin}{\par\tagstructbegin{tag=L}}
+\AddToHook{env/description/begin}{\par\tagstructbegin{tag=L,attribute-class=description}}
\AddToHook{env/description/end}{\par\tagstructend\tagstructend\tagstructend}%LBody,LI,L
\newcommand\tag@enit@format@preset[1]{%
@@ -151,7 +92,7 @@
\tagstructend\tagstructend} % for the LBody/LI
\tagstructbegin{tag=LI}
\tagstructbegin{tag=Lbl}
- \tagmcbegin{tag=Lbl}
+ \tagmcbegin{}
#1
\tagmcend
\tagstructend
@@ -161,6 +102,7 @@
\ExplSyntaxOff
\xpatchcmd\enit@preset{\@firstofone}{\tag@enit@format@preset}{}{\fail}
%close mc from paratagging and reopen ...
+% this disturbs someone docCommand which has then a MC outside a P.
\xpatchcmd\@item{\box\@labels}{\tagmcend \box\@labels \tagmcbegin{tag=P}}{}{\fail}
\ExplSyntaxOn
@@ -170,20 +112,22 @@
\def\enit@format{%
\tagstructbegin{tag=LI}%
\tagstructbegin{tag=Lbl}%
- \tagmcbegin{tag=Lbl}%
+ \tagmcbegin{}%
#1\tagmcend}}
% listings + verbatim
% the paragraph code could create span around the lines ...
-% it is quite unclear if Code is a sensible structure as it no longer exists in pdf 2.0
+% we use Code for every line.
-\AddToHook{env/lstlisting/begin}{\tagpdfparaOff\tagstructbegin{tag=Code}\tagmcbegin{tag=Code}}
-\AddToHook{env/lstlisting/end}{\tagmcend\tagstructend}
+\AddToHook{env/lstlisting/begin}{\tagpdfsetup{paratag=Code}}
+\AddToHook{env/lstlisting/end}{}
-\AddToHook{env/verbatim/begin}{\tagpdfparaOff\tagstructbegin{tag=Code}\tagmcbegin{tag=Code}}
-\AddToHook{env/verbatim/end}{\tagmcend\tagstructend}
+\AddToHook{env/verbatim/begin}{\tagpdfsetup{paratag=Code}}
+\AddToHook{env/verbatim/end}{}
+\AddToHook{env/docCommand/begin}{\tagstructbegin{tag=P}\tagpdfsetup{paratag=Code}}
+\AddToHook{env/docCommand/end} {\tagstructend}
% ======== marginnote ==========
% TODO marginnote has a bug (a \par is missing) so it messes up tagging.
@@ -209,32 +153,30 @@
%\tcbset{before~upper=\tagpdfparaOn}
\AddToHook{env/tcolorbox/begin}{\tagpdfparaOff \tcbset{before~upper=\tagpdfparaOn}}
\AddToHook{env/docCommand/begin}{\tagpdfparaOff \tcbset{before~upper=\tagpdfparaOn}}
-
- %locally for now
-
-
+\ExplSyntaxOff
% ======= footnote ========
-% TODO
+% done in testphase code
% ======= bibliography ========
% biblatex. Creates some empty mc-chunks.
% no internal patches, but redefining begentry/finentry is not safe.
% better hook is needed.
-\newbibmacro*{begentry}{\tagstructbegin{tag=BibEntry}\tagmcbegin{tag=BibEntry}}
+\newbibmacro*{begentry}{\tagstructbegin{tag=BibEntry}\tagmcbegin{}}
\newbibmacro*{finentry}{\finentry\tagmcend\tagstructend}
% ====== hyperref ========
% this should probably go into tagpdf, but it is related to
% problem of pdf strings and context ....
-\@ifpackageloaded{hyperref}{%
-\pdfstringdefDisableCommands{
- \let\tagstructbegin\@gobble
- \let\tagmcbegin\@gobble
- \let\tagmcend\relax
- \let\tagstructend\relax
-}}{}
+\AddToHook{package/hyperref/after}
+ {%
+ \pdfstringdefDisableCommands{%
+ \let\tagstructbegin\@gobble
+ \let\tagmcbegin\@gobble
+ \let\tagmcend\relax
+ \let\tagstructend\relax
+ }}{}
%====== pictures ========
@@ -243,46 +185,7 @@
\tagpdfsetup
{
newattribute =
- {bbox}{/O /Layout /BBox [0~0~100~100]}
+ {bbox}{/O /Layout /BBox [0 0 100 100]}
}
-%%%%%
-%======== Role maps =========
-%%%%%
-\tagpdfsetup{ add-new-tag=Title/H1,add-new-tag=Strong/Span }
-
-
-
\endinput
-
-% ==========================
-% now unneeded commands
-
-% we need a command which simply starts a paragraph \TagP^,
-% a "continuation" variant which closes the previous paragraph (\TagP),
-% and a final end.
-
-\NewDocumentCommand\TagP{t{^}}
- {
- \tag_mc_if_in:T { \tag_mc_end: }
- \IfBooleanF{#1}
- {
- \tag_struct_end:
- }
- \tag_struct_begin:n{tag=P}
- \tag_mc_begin:n{tag=P}
- }
-% close a mc and one structure
-
-\NewDocumentCommand\TagPend{}
- {
- \tag_mc_if_in:T { \tag_mc_end: }
- \tag_struct_end:
- }
-
-
- \ExplSyntaxOn
-\newcommand\showcurrentstruct{\prop_show:c { g__tag_struct_\g__tag_struct_stack_current_tl _prop }}
-
-
-\ExplSyntaxOff
diff --git a/macros/luatex/generic/luakeys/luakeys-debug.sty b/macros/luatex/generic/luakeys/luakeys-debug.sty
index 6d60271dd8..ceefd6d0e2 100644
--- a/macros/luatex/generic/luakeys/luakeys-debug.sty
+++ b/macros/luatex/generic/luakeys/luakeys-debug.sty
@@ -17,6 +17,6 @@
% luakeys-debug.sty and luakeys-debug.tex.
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{luakeys-debug}[2022/12/16 0.10.0 Debug package for luakeys.]
+\ProvidesPackage{luakeys-debug}[2022/12/23 0.11.0 Debug package for luakeys.]
\input luakeys-debug.tex
diff --git a/macros/luatex/generic/luakeys/luakeys-doc.pdf b/macros/luatex/generic/luakeys/luakeys-doc.pdf
index a44a16094e..ff012a46c6 100644
--- a/macros/luatex/generic/luakeys/luakeys-doc.pdf
+++ b/macros/luatex/generic/luakeys/luakeys-doc.pdf
Binary files differ
diff --git a/macros/luatex/generic/luakeys/luakeys-doc.tex b/macros/luatex/generic/luakeys/luakeys-doc.tex
index 83c708da94..90041ec581 100644
--- a/macros/luatex/generic/luakeys/luakeys-doc.tex
+++ b/macros/luatex/generic/luakeys/luakeys-doc.tex
@@ -60,7 +60,7 @@ The default value of the option “\texttt{#1}” is:
\href{https://github.com/Josef-Friedrich/luakeys}
{github.com/Josef-Friedrich/luakeys}%
}
-\date{0.10.0 from 2022/12/16}
+\date{0.11.0 from 2022/12/23}
\maketitle
@@ -273,8 +273,9 @@ It does the same as the Lua\LaTeX{} wrapper and loads the Lua module
% Das Lua-Modul exportiert diese Funktionen und Tabellen:
The Lua module exports this functions and tables:
-\InputLua[firstline=3,lastline=13]{export.lua}
+\InputLua[firstline=3,lastline=15]{export.lua}
+\noindent
% Diese Dokumentation stellt nur die öffentlichen Funktionen und
% Tabellen vor.
This documentation presents only the public functions and tables.
@@ -333,6 +334,34 @@ The raw result of the Lpeg grammar parser. \\
%
%%
+\subsection{Function “\texttt{get_private_instance(): table}”}
+\label{function:get-private-instance}
+
+% Über die Tabelle \lua{opts} können die Standardoptionen global
+% geändert werden.
+The default options can be changed globally via the \lua{opts} table
+(\ref{table-opts}).
+% Um zu verhindern, dass andere Module die Standardeinstellungen
+% ändern, kann mit Hilfe der Funktion \lua{get_private_instance()} eine neue
+% Instanz des Moduls \lua{luakeys} erzeugt werden.
+To prevent another modules from changing the default settings, a new
+instance of the \lua{luakeys} module can be created using the
+\lua{get_private_instance()} function.
+
+\InputLua[firstline=3,lastline=4]{functions/get-private-instance.lua}
+
+\noindent
+% Die Funktion \lua{require()} gibt standardmäßig beim mehrmaligen
+% Aufruf immer die gleiche Tabelle zurück.
+The \lua{require()} function always returns the same table
+when called multiple times.
+
+\InputLua[firstline=14,lastline=17]{functions/get-private-instance.lua}
+
+%%
+%
+%%
+
\subsection{Function “\texttt{parse(kv_string, opts): result, unknown,
raw}”}
\label{parse}
@@ -355,20 +384,37 @@ In plain \TeX:
\subsection{Options to configure the \texttt{parse} function}
\noindent
-The \lua{parse} function can be called with an options table. This
-options are supported: \catcode`_=12
+% Die Funktion \lua{parse} kann mit einer Optionstabelle aufgerufen
+% werden.
+The \lua{parse} function can be called with an options table.
+% Diese Optionen werden unterstützt:
+This options are supported: \catcode`_=12
\directlua{luakeys.print_names('opts')}
\InputLua[firstline=5,lastline=94]{opts/all-opts.lua}
+\subsection{Table “\texttt{opts}”}
+\label{table-opts}
+
\noindent
+% Die Optionen können auch global über die exportierte Tabelle
+% \lua{opts} gesetzt werden:
The options can also be set globally using the exported table
-|opts|:
+\lua{opts}:
\InputLua[firstline=4,lastline=4]{opts/exported-default-opts.lua}
\InputLua[firstline=10,lastline=11]{opts/exported-default-opts.lua}
+\noindent
+% Damit es zu keinen Wechselwirkungen mit anderen Paketen kommt, die auch
+% |luakeys| verwenden und die Optionen global setzen, ist es anzuraten,
+% die Funktion \lua{get_private_instance()} zum Laden das Paket verwenden.
+To avoid interactions with other packages that also use |luakeys| and
+set the options globally, it is recommended to use the
+\lua{get_private_instance()} function
+(\ref{function:get-private-instance}) to load the package.
+
%%
%
%%
@@ -888,6 +934,8 @@ key-value pair is then stored under this key.
\InputLua[firstline=4,lastline=16]{functions/define.lua}
\noindent
+% Bei verschachtelten Definitionen können nur die letzten beiden
+% Möglichkeiten zur Angabe der Schlüsselnamen verwendet werden.
For nested definitions, only the last two ways of specifying the key
names can be used.
@@ -2029,7 +2077,7 @@ An example of how to use the command in \LaTeX:
“quotation_end”.
* Extend the documentation about the option “format_keys”.
}
-\changes{0.10.0}{2022/12/16}{
+\changes{0.9.0}{2022/11/21}{
* The definition attibute “pick” accepts a new data type: “any”.
* The attribute value “true” for the attribute “pick” is deprecated.
* The attribute “pick” accepts now multiple data types specified in
@@ -2042,6 +2090,10 @@ An example of how to use the command in \LaTeX:
* Add new options to specify which strings are recognized as Boolean
values.
}
+\changes{0.11.0}{2022/12/23}{
+* Add a new function called “get_private_instance()” to load a private
+ version of the luakeys module.
+}
\pagebreak
\PrintChanges
diff --git a/macros/luatex/generic/luakeys/luakeys.lua b/macros/luatex/generic/luakeys/luakeys.lua
index 333b357308..7e86d729cd 100644
--- a/macros/luatex/generic/luakeys/luakeys.lua
+++ b/macros/luatex/generic/luakeys/luakeys.lua
@@ -1270,7 +1270,17 @@ local result_store = {}
-- @section
local export = {
- version = { 0, 10, 0 },
+ version = { 0, 11, 0 },
+
+ ---Get a new instance of the luakeys module.
+ ---
+ ---@return table # A new instance of the luakeys module.
+ get_private_instance = function()
+ package.loaded.luakeys = nil
+ local luakeys = require('luakeys')
+ package.loaded.luakeys = nil
+ return luakeys
+ end,
namespace = namespace,
diff --git a/macros/luatex/generic/luakeys/luakeys.sty b/macros/luatex/generic/luakeys/luakeys.sty
index c76025c114..8cb59cf5ef 100644
--- a/macros/luatex/generic/luakeys/luakeys.sty
+++ b/macros/luatex/generic/luakeys/luakeys.sty
@@ -17,5 +17,5 @@
% luakeys-debug.sty and luakeys-debug.tex.
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{luakeys}[2022/12/16 0.10.0 Parsing key-value options using Lua.]
+\ProvidesPackage{luakeys}[2022/12/23 0.11.0 Parsing key-value options using Lua.]
\directlua{luakeys = require('luakeys')}