Pandoc is a Haskell library for converting from one markup format to another, and a command-line tool that uses this library.
It can convert from
bibtex
(BibTeX bibliography)biblatex
(BibLaTeX bibliography)bits
(BITS XML, aliasjats
)commonmark
(CommonMark Markdown)commonmark_x
(CommonMark Markdown withcreole
(Creole 1.0)csljson
(CSLcsv
(CSV table)tsv
djot
(Djot markup)docbook
(DocBook)docx
(Word docx)dokuwiki
(DokuWiki markup)endnotexml
(EndNote XMLepub
(EPUB)fb2
gfm
(GitHub-Flavoredmarkdown_github
; usemarkdown_github
gfm
.haddock
(Haddockhtml
(HTML)ipynb
(Jupyterjats
(JATS XML)jira
json
(JSON version of native AST)latex
(LaTeX)markdown
(Pandocsmarkdown_mmd
markdown_phpextra
(PHP Markdownmarkdown_strict
(original unextendedmediawiki
(MediaWikiman
(roff man)muse
(Muse)native
(native Haskell)odt
(OpenOffice textopml
(OPML)org
(Emacs Org mode)ris
(RISrtf
(Rich Textrst
t2t
(txt2tags)textile
(Textile)tikiwiki
(TikiWikitwiki
(TWikitypst
(typst)vimwiki
(Vimwiki)It can convert to
ansi
(text with ANSI escapeasciidoc
(modern AsciiDoc as interpreted byasciidoc_legacy
(AsciiDoc as interpreted byasciidoc-py
).asciidoctor
(deprecated synonym for asciidoc
)beamer
(LaTeX beamer slide show)bibtex
(BibTeX bibliography)biblatex
(BibLaTeX bibliography)chunkedhtml
(zip archive of multiple linked HTML files)commonmark
(CommonMark Markdown)commonmark_x
(CommonMark Markdown withcontext
(ConTeXt)csljson
(CSLdjot
(Djot markup)docbook
or docbook4
(DocBook 4)docbook5
(DocBook 5)docx
(Word docx)dokuwiki
(DokuWiki markup)epub
or epub3
(EPUB v3 book)epub2
(EPUB v2)fb2
gfm
(GitHub-Flavoredmarkdown_github
; usemarkdown_github
gfm
.haddock
(Haddockhtml
or html5
(HTML,html4
(XHTML 1.0 Transitional)icml
(InDesignipynb
(Jupyterjats_archiving
(JATS XML, Archiving andjats_articleauthoring
(JATS XML, Articlejats_publishing
(JATS XML, Journaljats
(alias for jats_archiving
)jira
json
(JSON version of native AST)latex
(LaTeX)man
(roff man)markdown
(Pandocsmarkdown_mmd
markdown_phpextra
(PHP Markdownmarkdown_strict
(original unextendedmarkua
(Markua)mediawiki
(MediaWikims
(roff ms)muse
(Muse)native
(native Haskell)odt
(OpenOffice textopml
(OPML)opendocument
(OpenDocument)org
(Emacs Org mode)pdf
(PDF)plain
(plain text)pptx
rst
rtf
(Rich Texttexinfo
(GNU Texinfo)textile
(Textile)slideous
(Slideous HTMLslidy
(Slidy HTML anddzslides
(DZSlides HTML5 +revealjs
(reveal.js HTML5 + JavaScripts5
(S5 HTML and JavaScripttei
(TEI Simple)typst
(typst)xwiki
(XWikizimwiki
(ZimWikiPandoc can also produce PDF output via LaTeX, Groff ms, or HTML.
Pandocs enhanced version of Markdown includes syntax for tables, definition lists, metadata blocks, footnotes, citations, math, and much more. See the Users Manual below under Pandocs Markdown.
Pandoc has a modular design: it consists of a set of readers, which parse text in a given format and produce a native representation of the document (an abstract syntax tree or AST), and a set of writers, which convert this native representation into a target format. Thus, adding an input or output format requires only adding a reader or writer. Users can also run custom pandoc filters to modify the intermediate AST (see the documentation for filters and Lua filters).
Because pandocs intermediate representation of a document is less expressive than many of the formats it converts between, one should not expect perfect conversions between every format and every other. Pandoc attempts to preserve the structural elements of a document, but not formatting details such as margin size. And some document elements, such as complex tables, may not fit into pandocs simple document model. While conversions from pandocs Markdown to all formats aspire to be perfect, conversions from formats more expressive than pandocs Markdown can be expected to be lossy.
Heres how to install pandoc.
Pandocs website contains a full Users Guide. It is also available here as pandoc-flavored Markdown. The website also contains some examples of the use of pandoc and a limited online demo.
Pull requests, bug reports, and feature requests are welcome. Please make sure to read the contributor guidelines before opening a new issue.
2006-2024 John MacFarlane ([email protected]). Released under the GPL, version 2 or greater. This software carries no warranty of any kind. (See COPYRIGHT for full copyright and warranty notices.)