summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/m-markdown.mkiv
diff options
context:
space:
mode:
authorMojca Miklavec <mojca.miklavec@gmail.com>2012-05-14 17:38:55 +0000
committerMojca Miklavec <mojca.miklavec@gmail.com>2012-05-14 17:38:55 +0000
commit15995e10bfc68edf79970c4ea4fbb6678566c46e (patch)
tree2de7ca2a83f2d37ef043ad7429a5cb945bb79ddb /Master/texmf-dist/tex/context/base/m-markdown.mkiv
parentc9a39f716f1e5ec820ed3aab2c9aef25c5a9d730 (diff)
ConTeXt 2012.05.14 16:00
git-svn-id: svn://tug.org/texlive/trunk@26371 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/m-markdown.mkiv')
-rw-r--r--Master/texmf-dist/tex/context/base/m-markdown.mkiv88
1 files changed, 88 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/context/base/m-markdown.mkiv b/Master/texmf-dist/tex/context/base/m-markdown.mkiv
new file mode 100644
index 00000000000..6e003651309
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/m-markdown.mkiv
@@ -0,0 +1,88 @@
+%D \module
+%D [ file=x-markdown,
+%D version=2011.07.19,
+%D title=\CONTEXT\ Modules,
+%D subtitle=Processing MarkDown,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Modules / MarkDown Renderer}
+
+%D This module deals with markdown which is a document encoding that
+%D some \CONTEXT\ like much. It reminds me of the kind of minimal coding
+%D we used before we ran into \TEX\ and were using a somewhat simple
+%D rendering (pagination, etc) of documents. As I'm no user myself, it
+%D is up to others to provide documentation and examples.
+
+\registerctxluafile{m-markdown}{1.001}
+
+\unprotect
+
+% basic interface
+
+\definebuffer[markdown]
+
+\unexpanded\def\stopmarkdown
+ {\ctxlua{moduledata.markdown.typesetbuffer("\thedefinedbuffer{markdown}")}}
+
+\unexpanded\def\processmarkdownfile#1% maybe [] or both
+ {\ctxlua{moduledata.markdown.typesetfile("#1")}}
+
+\unexpanded\def\markdown#1% maybe [] or both
+ {\ctxlua{moduledata.markdown.typesetstring(\!!bs#1\!!es)}}
+
+% commands
+
+\defineitemgroup
+ [markdownitemize]
+
+\definetyping
+ [markdowntyping]
+
+\definetype
+ [markdowntype]
+
+\definetype
+ [markdowninlinehtml]
+
+\definetyping
+ [markdowndisplayhtml]
+
+\definedelimitedtext
+ [markdownblockquote]
+ [quotation]
+
+\definehighlight
+ [markdownemphasis]
+ [style=\em]
+
+\definehighlight
+ [markdownstrong]
+ [style=\bf]
+
+\definestructurelevels
+ [markdown]
+ [\v!chapter,
+ \v!section,
+ \v!subsection,
+ \v!subsubsection,
+ \v!subsubsubsection,
+ \v!subsubsubsubsection]
+
+\unexpanded\def\markdownrule
+ {\hairline\par}
+
+\protect
+
+\continueifinputfile{m-markdown.mkiv}
+
+\starttext
+ \startmarkdown
+ % some examples needed
+ \stopmarkdown
+\stoptext