Raw HTML/TeX
The following extensions (especially how they affect Markdown input/output) are also described in more detail in their respective sections of Pandoc’s Markdown.
Extension: raw_html
When converting from HTML, parse elements to raw HTML which are not representable in pandoc’s AST. By default, this is disabled for HTML input.
Extension: raw_tex
Allows raw LaTeX, TeX, and ConTeXt to be included in a document.
This extension can be enabled/disabled for the following formats (in addition to markdown
):
- input formats
latex
, org
, textile
, html
(environments, \ref
, and \eqref
only), ipynb
- output formats
textile
, commonmark
Note: as applied to ipynb
, raw_html
and raw_tex
affect not only raw TeX in markdown cells, but data with mime type text/html
in output cells. Since the ipynb
reader attempts to preserve the richest possible outputs when several options are given, you will get best results if you disable raw_html
and raw_tex
when converting to formats like docx
which don’t allow raw html
or tex
.
Extension: native_divs
This extension is enabled by default for HTML input. This means that div
s are parsed to pandoc native elements. (Alternatively, you can parse them to raw HTML using -f html-native_divs+raw_html
.)
When converting HTML to Markdown, for example, you may want to drop all div
s and span
s:
pandoc -f html-native_divs-native_spans -t markdown
Extension: native_spans
Analogous to native_divs
above.