pandoc

Conversion between markup formats

http://johnmacfarlane.net/pandoc

Version on this page:1.13.2@rev:3
LTS Haskell 22.37:3.1.11.1
Stackage Nightly 2024-10-07:3.4
Latest on Hackage:3.5

See all snapshots pandoc appears in

LicenseRef-GPL licensed and maintained by John MacFarlane
This version can be pinned in stack with:pandoc-1.13.2@sha256:23325052ac34c80bbb51c2f5b73ae474d684d2be3fdea83db875a105f2ffbf87,19698

Module documentation for 1.13.2

  • Text
    • Text.Pandoc
      • Text.Pandoc.MediaBag
      • Text.Pandoc.Options
      • Text.Pandoc.PDF
      • Text.Pandoc.Pretty
      • Text.Pandoc.Process
      • Text.Pandoc.Readers
        • Text.Pandoc.Readers.DocBook
        • Text.Pandoc.Readers.Docx
        • Text.Pandoc.Readers.EPUB
        • Text.Pandoc.Readers.HTML
        • Text.Pandoc.Readers.Haddock
        • Text.Pandoc.Readers.LaTeX
        • Text.Pandoc.Readers.Markdown
        • Text.Pandoc.Readers.MediaWiki
        • Text.Pandoc.Readers.Native
        • Text.Pandoc.Readers.OPML
        • Text.Pandoc.Readers.Org
        • Text.Pandoc.Readers.RST
        • Text.Pandoc.Readers.TWiki
        • Text.Pandoc.Readers.TeXMath
        • Text.Pandoc.Readers.Textile
        • Text.Pandoc.Readers.Txt2Tags
      • Text.Pandoc.SelfContained
      • Text.Pandoc.Shared
      • Text.Pandoc.Templates
      • Text.Pandoc.UTF8
      • Text.Pandoc.Writers
        • Text.Pandoc.Writers.AsciiDoc
        • Text.Pandoc.Writers.ConTeXt
        • Text.Pandoc.Writers.Custom
        • Text.Pandoc.Writers.Docbook
        • Text.Pandoc.Writers.Docx
        • Text.Pandoc.Writers.DokuWiki
        • Text.Pandoc.Writers.EPUB
        • Text.Pandoc.Writers.FB2
        • Text.Pandoc.Writers.HTML
        • Text.Pandoc.Writers.Haddock
        • Text.Pandoc.Writers.ICML
        • Text.Pandoc.Writers.LaTeX
        • Text.Pandoc.Writers.Man
        • Text.Pandoc.Writers.Markdown
        • Text.Pandoc.Writers.MediaWiki
        • Text.Pandoc.Writers.Native
        • Text.Pandoc.Writers.ODT
        • Text.Pandoc.Writers.OPML
        • Text.Pandoc.Writers.OpenDocument
        • Text.Pandoc.Writers.Org
        • Text.Pandoc.Writers.RST
        • Text.Pandoc.Writers.RTF
        • Text.Pandoc.Writers.Texinfo
        • Text.Pandoc.Writers.Textile
      • Text.Pandoc.XML

Pandoc is a Haskell library for converting from one markup format to another, and a command-line tool that uses this library. It can read markdown and (subsets of) HTML, reStructuredText, LaTeX, DocBook, MediaWiki markup, TWiki markup, Haddock markup, OPML, Emacs Org-Mode, txt2tags and Textile, and it can write markdown, reStructuredText, XHTML, HTML 5, LaTeX, ConTeXt, DocBook, OPML, OpenDocument, ODT, Word docx, RTF, MediaWiki, DokuWiki, Textile, groff man pages, plain text, Emacs Org-Mode, AsciiDoc, Haddock markup, EPUB (v2 and v3), FictionBook2, InDesign ICML, and several kinds of HTML/javascript slide shows (S5, Slidy, Slideous, DZSlides, reveal.js).

Pandoc extends standard markdown syntax with footnotes, embedded LaTeX, definition lists, tables, and other features. A compatibility mode is provided for those who need a drop-in replacement for Markdown.pl.

In contrast to existing tools for converting markdown to HTML, which use regex substitutions, 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, 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.