summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/third
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-06-11 23:15:05 +0000
committerKarl Berry <karl@freefriends.org>2016-06-11 23:15:05 +0000
commita0bab753834e0c87c19800c7748fccccee26b4be (patch)
tree24455a5f82eed5399e434c1ff8f7acefbef5e85e /Master/texmf-dist/tex/context/third
parentc636c196ee98440b64ff0252aec19b5d800b749f (diff)
markdown (6jun16)
git-svn-id: svn://tug.org/texlive/trunk@41376 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/third')
-rw-r--r--Master/texmf-dist/tex/context/third/markdown/t-markdown.tex140
1 files changed, 140 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/context/third/markdown/t-markdown.tex b/Master/texmf-dist/tex/context/third/markdown/t-markdown.tex
new file mode 100644
index 00000000000..115836433e6
--- /dev/null
+++ b/Master/texmf-dist/tex/context/third/markdown/t-markdown.tex
@@ -0,0 +1,140 @@
+%%
+%% This is file `t-markdown.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% markdown.dtx (with options: `context')
+%%
+%% Copyright (C) 2016 Vít Novotný
+%%
+%% 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 Vít Novotný.
+%%
+%% Send bug reports, requests for additions and questions
+%% either to the GitHub issue tracker at
+%%
+%% https://github.com/Witiko/markdown/issues
+%%
+%% or to the e-mail address <witiko@mail.muni.cz>.
+%%
+%% MODIFICATION ADVICE:
+%%
+%% If you want to customize this file, it is best to make a copy of
+%% the source file(s) from which it was produced. Use a different
+%% name for your copy(ies) and modify the copy(ies); this will ensure
+%% that your modifications do not get overwritten when you install a
+%% new release of the standard system. You should also ensure that
+%% your modified source file does not generate any modified file with
+%% the same name as a standard file.
+%%
+%% You will also need to produce your own, suitably named, .ins file to
+%% control the generation of files from your source file; this file
+%% should contain your own preambles for the files it generates, not
+%% those in the standard .ins files.
+%%
+%% The names of the source files used are shown above.
+%%
+\writestatus{loading}{ConTeXt User Module / markdown}%
+\unprotect
+\let\startmarkdown\relax
+\let\stopmarkdown\relax
+\def\dospecials{\do\ \do\\\do\{\do\}\do\$\do\&%
+ \do\#\do\^\do\_\do\%\do\~}%
+\ifx\directlua\undefined
+ \input markdown
+\else
+ \directlua{%
+ local function unescape(str)
+ return (str:gsub("|", string.char(92))) end
+ local old_callback = callback.find("process_input_buffer")
+ callback.register("process_input_buffer", function() end)
+ local new_callback = callback.find("process_input_buffer")
+ if new_callback == false then
+ tex.print(unescape([[|let|markdownDirectLua|directlua
+ |let|directlua|undefined
+ |input markdown
+ |let|directlua|markdownDirectLua
+ |let|markdownDirectLua|undefined]]))
+ else
+ callback.register("process_input_buffer", old_callback)
+ tex.print(unescape("|input markdown"))
+ end}%
+\fi
+\def\markdownInfo#1{\writestatus{markdown}{#1.}}%
+\def\markdownWarning#1{\writestatus{markdown\space warn}{#1.}}%
+\begingroup
+ \catcode`\|=0%
+ \catcode`\\=12%
+ |gdef|startmarkdown{%
+ |markdownReadAndConvert{\stopmarkdown}%
+ {|stopmarkdown}}%
+|endgroup
+\def\markdownRendererLineBreakPrototype{\blank}%
+\long\def\markdownRendererLinkPrototype#1#2#3{%
+ \useURL[#1][#2][][#3]#1\footnote[#1]{\ifx\empty#3\empty\else#3:
+ \fi\tt<\hyphenatedurl{#2}>}}%
+\long\def\markdownRendererImagePrototype#1#2#3{%
+ \placefigure[][fig:#1]{#3}{\externalfigure[#2]}}%
+\def\markdownRendererUlBeginPrototype{\startitemize}%
+\def\markdownRendererUlBeginTightPrototype{\startitemize[packed]}%
+\def\markdownRendererUlItemPrototype{\item}%
+\def\markdownRendererUlEndPrototype{\stopitemize}%
+\def\markdownRendererUlEndTightPrototype{\stopitemize}%
+\def\markdownRendererOlBeginPrototype{\startitemize[n]}%
+\def\markdownRendererOlBeginTightPrototype{\startitemize[packed,n]}%
+\def\markdownRendererOlItemPrototype{\item}%
+\long\def\markdownRendererOlItemWithNumberPrototype#1{\sym{#1.}}%
+\def\markdownRendererOlEndPrototype{\stopitemize}%
+\def\markdownRendererOlEndTightPrototype{\stopitemize}%
+\definedescription
+ [markdownConTeXtDlItemPrototype]
+ [location=hanging,
+ margin=standard,
+ headstyle=bold]%
+\definestartstop
+ [MarkdownConTeXtDlPrototype]
+ [before=\blank,
+ after=\blank]%
+\definestartstop
+ [MarkdownConTeXtDlTightPrototype]
+ [before=\blank\startpacked,
+ after=\stoppacked\blank]%
+\def\markdownRendererDlBeginPrototype{%
+ \startMarkdownConTeXtDlPrototype}%
+\def\markdownRendererDlBeginTightPrototype{%
+ \startMarkdownConTeXtDlTightPrototype}%
+\long\long\def\markdownRendererDlItemPrototype#1{%
+ \markdownConTeXtDlItemPrototype{#1}}%
+\def\markdownRendererDlEndPrototype{%
+ \stopMarkdownConTeXtDlPrototype}%
+\def\markdownRendererDlEndTightPrototype{%
+ \stopMarkdownConTeXtDlTightPrototype}%
+\long\def\markdownRendererEmphasisPrototype#1{{\em#1}}%
+\long\def\markdownRendererStrongEmphasisPrototype#1{{\bf\em#1}}%
+\def\markdownRendererBlockQuoteBeginPrototype{\startquotation}%
+\def\markdownRendererBlockQuoteEndPrototype{\stopquotation}%
+\long\def\markdownRendererInputVerbatimPrototype#1{\typefile{#1}}%
+\long\def\markdownRendererHeadingOnePrototype#1{\chapter{#1}}%
+\long\def\markdownRendererHeadingTwoPrototype#1{\section{#1}}%
+\long\def\markdownRendererHeadingThreePrototype#1{\subsection{#1}}%
+\long\def\markdownRendererHeadingFourPrototype#1{\subsubsection{#1}}%
+\long\def\markdownRendererHeadingFivePrototype#1{\subsubsubsection{#1}}%
+\long\def\markdownRendererHeadingSixPrototype#1{\subsubsubsubsection{#1}}%
+\def\markdownRendererHorizontalRulePrototype{%
+ \blackrule[height=1pt, width=\hsize]}%
+\long\def\markdownRendererFootnotePrototype#1{\footnote{#1}}%
+\stopmodule\protect
+\endinput
+%%
+%% End of file `t-markdown.tex'.