Skip to content

Commit

Permalink
Merge pull request #176 from Witiko/feature/improve-context-interface
Browse files Browse the repository at this point in the history
Add `\setupmarkdown` and `\inputmarkdown` commands to the ConTeXt interface
  • Loading branch information
github-actions[bot] authored Aug 26, 2022
2 parents 59ae1b2 + 4ddada4 commit 2e67f1b
Show file tree
Hide file tree
Showing 5 changed files with 299 additions and 140 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Development:
- Add support for strike-throughs, fenced divs, inline spans, subscripts,
superscripts, and fancy lists. (#149, #160, #162, #168, #170)
- Add facade in front of expl3 inferface for YAML metadata. (#118, #175)
- Add `\setupmarkdown` and `\inputmarkdown` commands to ConTeXt. (#17, #176)

Fixes:

Expand Down
33 changes: 18 additions & 15 deletions examples/context-mkii.tex
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,23 @@
\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}
\def\markdownOptionStrikeThrough{true}
\def\markdownOptionSuperscripts{true}
\def\markdownOptionSubscripts{true}
\def\markdownOptionFancyLists{true}
\setupmarkdown
[
hashEnumerators = yes,
definitionLists = yes,
smartEllipses = yes,
footnotes = yes,
inlineFootnotes = yes,
fencedCode = yes,
contentBlocks = yes,
pipeTables = yes,
tableCaptions = yes,
taskLists = yes,
strikeThrough = yes,
superscripts = yes,
subscripts = yes,
fancyLists = yes,
]

% Set renderers of the Markdown module.
\definetyping
Expand All @@ -34,7 +37,7 @@

% Typeset the document `example.md` by letting the Markdown package handle
% the conversion internally.
\markdownInput{./example.md}
\inputmarkdown{./example.md}

% Typeset the document `example.tex` that we prepared separately using the
% Lua command-line interface and that contains a plain TeX representation
Expand Down
33 changes: 18 additions & 15 deletions examples/context-mkiv.tex
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,23 @@
\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}
\def\markdownOptionStrikeThrough{true}
\def\markdownOptionSuperscripts{true}
\def\markdownOptionSubscripts{true}
\def\markdownOptionFancyLists{true}
\setupmarkdown
[
hashEnumerators = yes,
definitionLists = yes,
smartEllipses = yes,
footnotes = yes,
inlineFootnotes = yes,
fencedCode = yes,
contentBlocks = yes,
pipeTables = yes,
tableCaptions = yes,
taskLists = yes,
strikeThrough = yes,
superscripts = yes,
subscripts = yes,
fancyLists = yes,
]

% Set renderers of the Markdown module.
\definehighlight
Expand All @@ -46,7 +49,7 @@

% Typeset the document `example.md` by letting the Markdown package handle
% the conversion internally.
\markdownInput{./example.md}
\inputmarkdown{./example.md}

% Typeset the document `example.tex` that we prepared separately using the
% Lua command-line interface and that contains a plain TeX representation
Expand Down
Loading

0 comments on commit 2e67f1b

Please sign in to comment.