.TH MARKDOWN 2 .SH NAME mkd_in, mkd_string, markdown, mkd_compile, mkd_css, mkd_generatecss, mkd_document, mkd_generatehtml, mkd_xhtmlpage, mkd_toc, mkd_generatetoc, mkd_cleanup, mkd_doc_title, mkd_doc_author, mkd_doc_date, mkd_line, mkd_generateline \- convert Markdown text to HTML .SH SYNOPSIS .ta \w'MMIOT* 'u .B #include .PP .B MMIOT* mkd_in(FILE *input, int flags) .PP .B MMIOT* mkd_string(char *buf, int size, int flags) .PP .B int markdown(MMIOT *doc, FILE *output, int flags) .PP .B int mkd_compile(MMIOT *document, int flags) .PP .B int mkd_css(MMIOT *document, char **doc) .PP .B int mkd_generatecss(MMIOT *document, FILE *output) .PP .B int mkd_document(MMIOT *document, char **doc) .PP .B int mkd_generatehtml(MMIOT *document, FILE *output) .PP .B int mkd_xhtmlpage(MMIOT *document, int flags, FILE *output) .PP .B int mkd_toc(MMIOT *document, char **doc) .PP .B int mkd_generatetoc(MMIOT *document, FILE *output) .PP .B void mkd_cleanup(MMIOT*); .PP .B char* mkd_doc_title(MMIOT*) .PP .B char* mkd_doc_author(MMIOT*) .PP .B char* mkd_doc_date(MMIOT*) .PP .B int mkd_line(char *string, int size, char **doc, int flags) .PP .B int mkd_generateline(char *string, int size, FILE *output, int flags) .PD .PP .SH DESCRIPTION These functions convert .IR Markdown (6) text into .SM HTML markup. .PP .I Mkd_in reads the text referenced by pointer to .B FILE .I input and returns a pointer to an .B MMIOT structure of the form expected by .I markdown and the other converters. .I Mkd_string accepts one .I string and returns a pointer to .BR MMIOT . .PP After such preparation, .I markdown converts .I doc and writes the result to .IR output , while .I mkd_compile transforms .I document in-place. .PP One or more of the following .I flags (combined with .BR OR ) control .IR markdown 's processing of .IR doc : .TF MKD_NOIMAGE .TP .B MKD_NOIMAGE Do not process .B ![] and remove .B tags from the output. .TP .B MKD_NOLINKS Do not process .B [] and remove .B tags from the output. .TP .B MKD_NOPANTS Suppress Smartypants-style replacement of quotes, dashes, or ellipses. .TP .B MKD_STRICT Disable superscript and relaxed emphasis processing if configured; otherwise a no-op. .TP .B MKD_TAGTEXT Process as inside an .SM HTML tag: no .BR , no .BR , no .SM HTML or .B [] expansion. .TP .B MKD_NO_EXT Don't process pseudo-protocols (in .IR markdown (6)). .TP .B MKD_CDATA Generate code for .SM XML .B ![CDATA[...]] element. .TP .B MKD_NOHEADER Don't process Pandoc-style headers. .TP .B MKD_TABSTOP When reading documents, expand tabs to 4 spaces, overriding any compile-time configuration. .TP .B MKD_TOC Label headings for use with the .I mkd_generatetoc and .I mkd_toc functions. .TP .B MKD_1_COMPAT MarkdownTest_1.0 compatibility. Trim trailing spaces from first line of code blocks and disable implicit reference links (in .IR markdown (6)). .TP .B MKD_AUTOLINK Greedy .SM URL generation. When set, any .SM URL is converted to a hyperlink, even those not encased in .BR <> . .TP .B MKD_SAFELINK Don't make hyperlinks from .B [][] links that have unknown .SM URL protocol types. .TP .B MKD_NOTABLES Do not process the syntax extension for tables (in .IR markdown (6)). .TP .B MKD_EMBED All of .BR MKD_NOLINKS , .BR MKD_NOIMAGE , and .BR MKD_TAGTEXT . .PD .PP This implementation supports Pandoc-style headers and inline .SM CSS .B