summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/context
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-01-30 21:14:20 +0000
committerKarl Berry <karl@freefriends.org>2022-01-30 21:14:20 +0000
commitd88c12c479ddbadc494d4967e6c4777f1afeb537 (patch)
tree6392333f6f77518cfb8a6b4f71116138225703da /Master/texmf-dist/doc/context
parent88ea99da9ff53c27e892b7524db90febe4a28b22 (diff)
markdown (30jan22)
git-svn-id: svn://tug.org/texlive/trunk@61807 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/context')
-rw-r--r--Master/texmf-dist/doc/context/third/markdown/examples/context-mkii.tex (renamed from Master/texmf-dist/doc/context/third/markdown/examples/context.tex)20
-rw-r--r--Master/texmf-dist/doc/context/third/markdown/examples/context-mkiv.tex65
2 files changed, 83 insertions, 2 deletions
diff --git a/Master/texmf-dist/doc/context/third/markdown/examples/context.tex b/Master/texmf-dist/doc/context/third/markdown/examples/context-mkii.tex
index 85815149d16..b5aaa0e04e8 100644
--- a/Master/texmf-dist/doc/context/third/markdown/examples/context.tex
+++ b/Master/texmf-dist/doc/context/third/markdown/examples/context-mkii.tex
@@ -2,7 +2,11 @@
\usetypescript[modern][ec]
\setupbodyfont[10pt,rm]
\setupexternalfigures[location={local,global,default}]
+
+% Load the Markdown module.
\usemodule[t][markdown]
+
+% Set options of the Markdown module.
\def\markdownOptionHashEnumerators{true}
\def\markdownOptionDefinitionLists{true}
\def\markdownOptionSmartEllipses{true}
@@ -13,9 +17,17 @@
\def\markdownOptionPipeTables{true}
\def\markdownOptionTableCaptions{true}
\def\markdownOptionTaskLists{true}
-\definetyping [latex]
-\setuptyping [latex] [option=TEX]
+
+% Set renderers of the Markdown module.
+\definetyping
+ [latex]
+
+\setuptyping
+ [latex]
+ [option=TEX]
+
\starttext
+
% Typeset the document `example.md` by letting the Markdown package handle
% the conversion internally.
\markdownInput{./example.md}
@@ -25,7 +37,9 @@
% of the document `example.md`.
\doiffileelse{./example.tex}{\input example}{}
+% Typeset inline markdown text.
\startmarkdown
+
Here are some non-ASCII characters: *ěščřžýáíé*
and ConTeXt special characters: *|*.
@@ -33,5 +47,7 @@ Here is a hard line break that we inserted directly from the TeX source
by typing two spaces at the end of a line.
This is stretching TeX's abilities and is only supported in ConTeXt MkIV
and later.
+
\stopmarkdown
+
\stoptext
diff --git a/Master/texmf-dist/doc/context/third/markdown/examples/context-mkiv.tex b/Master/texmf-dist/doc/context/third/markdown/examples/context-mkiv.tex
new file mode 100644
index 00000000000..65d1d054683
--- /dev/null
+++ b/Master/texmf-dist/doc/context/third/markdown/examples/context-mkiv.tex
@@ -0,0 +1,65 @@
+\enableregime[utf]
+\usetypescript[modern][ec]
+\setupbodyfont[10pt,rm]
+\setupexternalfigures[location={local,global,default}]
+
+% Load the Markdown module.
+\usemodule[t][markdown]
+
+% Set options of the Markdown module.
+\def\markdownOptionHashEnumerators{true}
+\def\markdownOptionDefinitionLists{true}
+\def\markdownOptionSmartEllipses{true}
+\def\markdownOptionFootnotes{true}
+\def\markdownOptionInlineFootnotes{true}
+\def\markdownOptionFencedCode{true}
+\def\markdownOptionContentBlocks{true}
+\def\markdownOptionPipeTables{true}
+\def\markdownOptionTableCaptions{true}
+\def\markdownOptionTaskLists{true}
+
+% Set renderers of the Markdown module.
+\definehighlight
+ [markdownRendererEmphasis]
+ [style=\em]
+
+\definehighlight
+ [markdownRendererStrongEmphasis]
+ [style=bold]
+
+\definehighlight
+ [markdownRendererCodeSpan]
+ [style=mono]
+
+\definetyping
+ [latex]
+
+\setuptyping
+ [latex]
+ [option=TEX]
+
+\starttext
+
+% Typeset the document `example.md` by letting the Markdown package handle
+% the conversion internally.
+\markdownInput{./example.md}
+
+% Typeset the document `example.tex` that we prepared separately using the
+% Lua command-line interface and that contains a plain TeX representation
+% of the document `example.md`.
+\doiffileelse{./example.tex}{\input example}{}
+
+% Typeset inline markdown text.
+\startmarkdown
+
+Here are some non-ASCII characters: *ěščřžýáíé*
+and ConTeXt special characters: *|*.
+
+Here is a hard line break that we inserted directly from the TeX source
+by typing two spaces at the end of a line.
+This is stretching TeX's abilities and is only supported in ConTeXt MkIV
+and later.
+
+\stopmarkdown
+
+\stoptext