forked from jgm/lunamark
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add example document for ConTeXt MkIV
Progresses #17
- Loading branch information
Showing
5 changed files
with
90 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |