A CommonMark-compliant parser for Julia.
using CommonMark
parser = Parser()
ast = parser("Hello *world*")
html(ast) # "<p>Hello <em>world</em></p>\n"html(ast) # HTML
latex(ast) # LaTeX
typst(ast) # Typst
term(ast) # Terminal with ANSI colors
markdown(ast) # Normalized markdown
notebook(ast) # Jupyter notebookEnable syntax beyond CommonMark:
enable!(parser, TableRule())
enable!(parser, FootnoteRule())
enable!(parser, MathRule())Available extensions: TableRule, FootnoteRule, MathRule, DollarMathRule,
AdmonitionRule, FrontMatterRule, AttributeRule, CitationRule,
AutoIdentifierRule, TypographyRule, StrikethroughRule, SubscriptRule,
SuperscriptRule, TaskListRule, GitHubAlertRule, FencedDivRule,
ReferenceLinkRule, RawContentRule.
See the documentation for details.
Configuration can be provided via a Dict{String,Any} or front matter:
html(ast, Dict("title" => "My Document"))template-engine::Function— Mustache-compatible renderer for standalone documents<format>.template.file::String— Custom template file<format>.template.string::String— Custom template stringtitle,subtitle,authors,abstract,keywords,lang,datehtml.css,html.js,html.header,html.footerlatex.documentclass,latex.preamble