# API Reference


## Renderers


Convert Markdown to various output formats


[markdown_to_html()](markdown_to_html.md#multimark.markdown_to_html)  
Parse CommonMark/GFM and render as HTML.

[markdown_to_latex()](markdown_to_latex.md#multimark.markdown_to_latex)  
Parse CommonMark/GFM and render as LaTeX.

[markdown_to_man()](markdown_to_man.md#multimark.markdown_to_man)  
Parse CommonMark/GFM and render as a groff man page.

[markdown_to_commonmark()](markdown_to_commonmark.md#multimark.markdown_to_commonmark)  
Parse CommonMark/GFM and render back as normalized CommonMark.

[markdown_to_xml()](markdown_to_xml.md#multimark.markdown_to_xml)  
Parse CommonMark/GFM and render as XML.


## Options


Parsing and rendering configuration


[Options](Options.md#multimark.Options)  
CommonMark/GFM parsing and rendering options.


## Parsing


Streaming parser, AST nodes, and tree traversal


[Parser](Parser.md#multimark.Parser)  
Streaming CommonMark/GFM parser.

[parse()](parse.md#multimark.parse)  
Parse a Markdown string and return the root AST node.

[Node](Node.md#multimark.Node)  
A node in the CommonMark/GFM abstract syntax tree.

[NodeType](NodeType.md#multimark.NodeType)  
CommonMark/GFM AST node types.

[ListType](ListType.md#multimark.ListType)  
List type for LIST nodes.

[DelimType](DelimType.md#multimark.DelimType)  
Delimiter type for ordered lists.


## Parser Methods


Methods for the Parser class


[Parser.feed()](Parser.feed.md#multimark.Parser.feed)  
Feed a chunk of Markdown text to the parser.

[Parser.finish()](Parser.finish.md#multimark.Parser.finish)  
Finalize parsing and return the root Node of the AST.

[Parser.render_html()](Parser.render_html.md#multimark.Parser.render_html)  
Finish parsing (if needed) and render as HTML.

[Parser.render_xml()](Parser.render_xml.md#multimark.Parser.render_xml)  
Finish parsing (if needed) and render as XML.

[Parser.render_latex()](Parser.render_latex.md#multimark.Parser.render_latex)  
Finish parsing (if needed) and render as LaTeX.

[Parser.render_man()](Parser.render_man.md#multimark.Parser.render_man)  
Finish parsing (if needed) and render as a groff man page.

[Parser.render_commonmark()](Parser.render_commonmark.md#multimark.Parser.render_commonmark)  
Finish parsing (if needed) and render as normalized CommonMark.

[Parser.close()](Parser.close.md#multimark.Parser.close)  
Release all C resources held by this parser.

[Parser.__enter__()](Parser.__enter__.md#multimark.Parser.__enter__)  

[Parser.__exit__()](Parser.__exit__.md#multimark.Parser.__exit__)  

[Parser.__del__()](Parser.__del__.md#multimark.Parser.__del__)  


## Node Methods


Methods for the Node class


[Node.new()](Node.new.md#multimark.Node.new)  
Create a new detached node of the given type.

[Node.type](Node.type.md#multimark.Node.type)  
The node type.

[Node.type_string](Node.type_string.md#multimark.Node.type_string)  
Human-readable node type name from cmark (e.g., `'heading'`).

[Node.parent](Node.parent.md#multimark.Node.parent)  
The parent node, or `None` if this is the root.

[Node.first_child](Node.first_child.md#multimark.Node.first_child)  
The first child node, or `None`.

[Node.last_child](Node.last_child.md#multimark.Node.last_child)  
The last child node, or `None`.

[Node.next](Node.next.md#multimark.Node.next)  
The next sibling, or `None`.

[Node.previous](Node.previous.md#multimark.Node.previous)  
The previous sibling, or `None`.

[Node.children](Node.children.md#multimark.Node.children)  
Iterate over direct child nodes.

[Node.literal](Node.literal.md#multimark.Node.literal)  
Text content for text, code, and HTML nodes. `None` if not applicable.

[Node.url](Node.url.md#multimark.Node.url)  
URL for link and image nodes. `None` if not applicable.

[Node.title](Node.title.md#multimark.Node.title)  
Title for link and image nodes. `None` if not applicable.

[Node.heading_level](Node.heading_level.md#multimark.Node.heading_level)  
Heading level (1-6) for `HEADING` nodes; 0 otherwise.

[Node.list_type](Node.list_type.md#multimark.Node.list_type)  
List type (`BULLET` or `ORDERED`) for `LIST` nodes.

[Node.list_delim](Node.list_delim.md#multimark.Node.list_delim)  
Delimiter type for ordered `LIST` nodes.

[Node.list_start](Node.list_start.md#multimark.Node.list_start)  
Starting number for ordered `LIST` nodes; 0 otherwise.

[Node.list_tight](Node.list_tight.md#multimark.Node.list_tight)  
Whether a `LIST` node is tight (no blank lines between items).

[Node.fence_info](Node.fence_info.md#multimark.Node.fence_info)  
Info string for fenced `CODE_BLOCK` nodes (e.g., `'python'`).

[Node.start_line](Node.start_line.md#multimark.Node.start_line)  
Start line (1-based) in source. 0 if not available.

[Node.start_column](Node.start_column.md#multimark.Node.start_column)  
Start column (1-based) in source. 0 if not available.

[Node.end_line](Node.end_line.md#multimark.Node.end_line)  
End line (1-based) in source. 0 if not available.

[Node.end_column](Node.end_column.md#multimark.Node.end_column)  
End column (1-based) in source. 0 if not available.

[Node.walk()](Node.walk.md#multimark.Node.walk)  
Depth-first walk of the subtree rooted at this node.

[Node.unlink()](Node.unlink.md#multimark.Node.unlink)  
Remove this node from its parent tree.

[Node.insert_before()](Node.insert_before.md#multimark.Node.insert_before)  
Insert *sibling* as the node immediately before this one.

[Node.insert_after()](Node.insert_after.md#multimark.Node.insert_after)  
Insert *sibling* as the node immediately after this one.

[Node.append_child()](Node.append_child.md#multimark.Node.append_child)  
Append *child* as the last child of this node.

[Node.prepend_child()](Node.prepend_child.md#multimark.Node.prepend_child)  
Prepend *child* as the first child of this node.

[Node.replace()](Node.replace.md#multimark.Node.replace)  
Replace this node in the tree with *new_node*.

[Node.render_html()](Node.render_html.md#multimark.Node.render_html)  
Render this subtree as HTML.

[Node.render_xml()](Node.render_xml.md#multimark.Node.render_xml)  
Render this subtree as XML.

[Node.render_latex()](Node.render_latex.md#multimark.Node.render_latex)  
Render this subtree as LaTeX.

[Node.render_man()](Node.render_man.md#multimark.Node.render_man)  
Render this subtree as a groff man page.

[Node.render_commonmark()](Node.render_commonmark.md#multimark.Node.render_commonmark)  
Render this subtree as normalized CommonMark.

[Node.__repr__()](Node.__repr__.md#multimark.Node.__repr__)  

[Node.__eq__()](Node.__eq__.md#multimark.Node.__eq__)  

[Node.__hash__()](Node.__hash__.md#multimark.Node.__hash__)  


## Utility


Package information


[cmark_version()](cmark_version.md#multimark.cmark_version)  
Return the version string of the vendored cmark-gfm library.
