Pandoc
The universal markup converter
Pandoc is a Haskell(link is external) library for converting from
one markup format to another, and a command-line tool that uses this
library. It can convert from
bibtex
(BibTeX(link is external) bibliography)biblatex
(BibLaTeX(link is external) bibliography)commonmark
(CommonMark(link is external) Markdown)commonmark_x
(CommonMark(link is external) Markdown with
extensions)creole
(Creole 1.0(link is external))csljson
(CSL
JSON(link is external)
bibliography)csv
(CSV(link is external) table)tsv
(TSV(link is external)
table)docbook
(DocBook(link is external))docx
(Word docx(link is external))dokuwiki
(DokuWiki markup(link is external))endnotexml
(EndNote XML
bibliography(link is external))epub
(EPUB(link is external))fb2
(FictionBook2(link is external)
e-book)gfm
(GitHub-Flavored
Markdown(link is external)),
or the deprecated and less accuratemarkdown_github
; use
markdown_github
(link is external)
only if you need extensions not supported in
gfm
(link is external).haddock
(Haddock
markup(link is external))html
(HTML(link is external))ipynb
(Jupyter
notebook(link is external))jats
(JATS(link is external) XML)jira
(Jira(link is external)/Confluence
wiki markup)json
(JSON version of native AST)latex
(LaTeX(link is external))markdown
(Pandoc’s
Markdown(link is external))markdown_mmd
(MultiMarkdown(link is external))markdown_phpextra
(PHP Markdown
Extra(link is external))markdown_strict
(original unextended
Markdown(link is external))mediawiki
(MediaWiki
markup(link is external))man
(roff man(link is external))muse
(Muse(link is external))native
(native Haskell)odt
(ODT(link is external))opml
(OPML(link is external))org
(Emacs Org mode(link is external))ris
(RIS(link is external)
bibliography)rtf
(Rich Text
Format(link is external))rst
(reStructuredText(link is external))t2t
(txt2tags(link is external))textile
(Textile(link is external))tikiwiki
(TikiWiki
markup(link is external))twiki
(TWiki
markup(link is external))vimwiki
(Vimwiki(link is external))- the path of a custom Lua reader, see Custom readers and
writers(link is external)
below
It can convert to
asciidoc
(AsciiDoc(link is external)) or
asciidoctor
(AsciiDoctor(link is external))beamer
(LaTeX beamer(link is external) slide show)bibtex
(BibTeX(link is external) bibliography)biblatex
(BibLaTeX(link is external) bibliography)commonmark
(CommonMark(link is external) Markdown)commonmark_x
(CommonMark(link is external) Markdown with
extensions)context
(ConTeXt(link is external))csljson
(CSL
JSON(link is external)
bibliography)docbook
ordocbook4
(DocBook(link is external) 4)docbook5
(DocBook 5)docx
(Word docx(link is external))dokuwiki
(DokuWiki markup(link is external))epub
orepub3
(EPUB(link is external) v3 book)epub2
(EPUB v2)fb2
(FictionBook2(link is external)
e-book)gfm
(GitHub-Flavored
Markdown(link is external)),
or the deprecated and less accuratemarkdown_github
; use
markdown_github
(link is external)
only if you need extensions not supported in
gfm
(link is external).haddock
(Haddock
markup(link is external))html
orhtml5
(HTML(link is external),
i.e. HTML5(link is external)/XHTML polyglot
markup(link is external))html4
(XHTML(link is external) 1.0 Transitional)icml
(InDesign
ICML(link is external))ipynb
(Jupyter
notebook(link is external))jats_archiving
(JATS(link is external) XML, Archiving and
Interchange Tag Set)jats_articleauthoring
(JATS(link is external) XML, Article
Authoring Tag Set)jats_publishing
(JATS(link is external) XML, Journal
Publishing Tag Set)jats
(alias forjats_archiving
)jira
(Jira(link is external)/Confluence
wiki markup)json
(JSON version of native AST)latex
(LaTeX(link is external))man
(roff man(link is external))markdown
(Pandoc’s
Markdown(link is external))markdown_mmd
(MultiMarkdown(link is external))markdown_phpextra
(PHP Markdown
Extra(link is external))markdown_strict
(original unextended
Markdown(link is external))markua
(Markua(link is external))mediawiki
(MediaWiki
markup(link is external))ms
(roff ms(link is external))muse
(Muse(link is external))native
(native Haskell)odt
(OpenOffice text
document(link is external))opml
(OPML(link is external))opendocument
(OpenDocument(link is external))org
(Emacs Org mode(link is external))pdf
(PDF(link is external))plain
(plain text)pptx
(PowerPoint(link is external)
slide show)rst
(reStructuredText(link is external))rtf
(Rich Text
Format(link is external))texinfo
(GNU Texinfo(link is external))textile
(Textile(link is external))slideous
(Slideous(link is external) HTML
and JavaScript slide show)slidy
(Slidy(link is external) HTML and
JavaScript slide show)dzslides
(DZSlides(link is external) HTML5 +
JavaScript slide show)revealjs
(reveal.js(link is external) HTML5 + JavaScript
slide show)s5
(S5(link is external) HTML and JavaScript
slide show)tei
(TEI Simple(link is external))xwiki
(XWiki
markup(link is external))zimwiki
(ZimWiki
markup(link is external))- the path of a custom Lua writer, see Custom readers and
writers(link is external)
below
Pandoc can also produce PDF output via LaTeX, Groff ms, or HTML.
Pandoc’s enhanced version of Markdown includes syntax for tables,
definition lists, metadata blocks, footnotes, citations, math, and much
more. See the User’s Manual below under Pandoc’s
Markdown(link is external).
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(link is external) and
Lua filters(link is external)).
Because pandoc’s 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 pandoc’s simple document model.
While conversions from pandoc’s Markdown to all formats aspire to be
perfect, conversions from formats more expressive than pandoc’s Markdown
can be expected to be lossy.
Installing
Here’s how to install pandoc.
Documentation
Pandoc’s website contains a full User’s
Guide(link is external). It is also available
here as pandoc-flavored Markdown. The website also
contains some examples of the use of
pandoc(link is external) and a limited online
demo(link is external).
Contributing
Pull requests, bug reports, and feature requests are welcome. Please
make sure to read the contributor guidelines before
opening a new issue.
License
© 2006-2022 John MacFarlane (jgm@berkeley.edu(link sends e-mail)). Released under the
GPL(link is external),
version 2 or greater. This software carries no warranty of any kind.
(See COPYRIGHT for full copyright and warranty notices.)