Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add \setupmarkdown and \inputmarkdown commands to the ConTeXt interface #176

Merged
merged 3 commits into from
Aug 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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