pandoc: Conversion between markup formats

[ gpl, library, program, text ] [ Propose Tags ]

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 several dialects of Markdown and (subsets of) HTML, reStructuredText, LaTeX, DocBook, JATS, MediaWiki markup, TWiki markup, TikiWiki markup, Creole 1.0, Haddock markup, OPML, Emacs Org-Mode, Emacs Muse, txt2tags, Vimwiki, Word Docx, ODT, EPUB, FictionBook2, roff man, and Textile, and it can write Markdown, reStructuredText, XHTML, HTML 5, LaTeX, ConTeXt, DocBook, JATS, OPML, TEI, OpenDocument, ODT, Word docx, PowerPoint pptx, RTF, MediaWiki, DokuWiki, ZimWiki, Textile, roff man, roff ms, plain text, Emacs Org-Mode, AsciiDoc, Haddock markup, EPUB (v2 and v3), FictionBook2, InDesign ICML, Muse, LaTeX beamer slides, and several kinds of HTML/JavaScript slide shows (S5, Slidy, Slideous, DZSlides, reveal.js).

In contrast to most existing tools for converting Markdown to HTML, 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.


[Skip to Readme]
Versions 0.4, 0.41, 0.42, 0.43, 0.44, 0.45, 0.46, 1.0, 1.0.0.1, 1.1, 1.2, 1.2.1, 1.3, 1.4, 1.5, 1.5.0.1, 1.5.1, 1.5.1.1, 1.6, 1.6.0.1, 1.8, 1.8.0.1, 1.8.0.2, 1.8.0.3, 1.8.1, 1.8.1.1, 1.8.1.2, 1.8.2, 1.8.2.1, 1.9, 1.9.0.2, 1.9.0.3, 1.9.0.4, 1.9.0.5, 1.9.1, 1.9.1.1, 1.9.1.2, 1.9.2, 1.9.3, 1.9.4, 1.9.4.1, 1.9.4.2, 1.9.4.3, 1.9.4.4, 1.9.4.5, 1.10, 1.10.0.1, 1.10.0.2, 1.10.0.3, 1.10.0.4, 1.10.0.5, 1.10.1, 1.11, 1.11.1, 1.12, 1.12.0.1, 1.12.0.2, 1.12.1, 1.12.2, 1.12.2.1, 1.12.3, 1.12.3.1, 1.12.3.2, 1.12.3.3, 1.12.4, 1.12.4.2, 1.13, 1.13.0.1, 1.13.1, 1.13.2, 1.13.2.1, 1.14, 1.14.0.1, 1.14.0.2, 1.14.0.3, 1.14.0.4, 1.14.1, 1.15, 1.15.0.1, 1.15.0.2, 1.15.0.3, 1.15.0.4, 1.15.0.5, 1.15.0.6, 1.15.1, 1.15.1.1, 1.15.2, 1.15.2.1, 1.16, 1.16.0.1, 1.16.0.2, 1.17, 1.17.0.1, 1.17.0.2, 1.17.0.3, 1.17.1, 1.17.2, 1.18, 1.19, 1.19.1, 1.19.2, 1.19.2.1, 1.19.2.2, 1.19.2.3, 1.19.2.4, 2.0, 2.0.0.1, 2.0.1, 2.0.1.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.0.6, 2.1, 2.1.1, 2.1.2, 2.1.3, 2.2, 2.2.1, 2.2.2, 2.2.2.1, 2.2.3, 2.2.3.1, 2.2.3.2, 2.3, 2.3.1, 2.4, 2.5 (info)
Change log changelog
Dependencies aeson (>=0.7 && <1.5), aeson-pretty (>=0.8.5 && <0.9), base (>=4.8 && <5), base-compat (>=0.9), base64-bytestring (>=0.1 && <1.1), basement (<0.0.8), binary (>=0.5 && <0.11), blaze-html (==0.9.*), blaze-markup (==0.8.*), bytestring (>=0.9 && <0.11), case-insensitive (==1.2.*), cmark-gfm (>=0.1.1 && <0.2), containers (>=0.4.2.1 && <0.7), data-default (>=0.4 && <0.8), deepseq (>=1.3 && <1.5), directory (>=1 && <1.4), doctemplates (>=0.2.1 && <0.3), exceptions (>=0.8 && <0.11), file-embed (==0.0.*), filepath (>=1.1 && <1.5), foundation (<0.0.21), Glob (>=0.7 && <0.10), haddock-library (==1.7.*), hslua (>=1.0.1 && <1.1), hslua-module-text (==0.2.*), HsYAML (>=0.1.1.1 && <0.2), HTTP (>=4000.0.5 && <4000.4), http-client (>=0.4.30 && <0.6), http-client-tls (>=0.2.4 && <0.4), http-types (>=0.8 && <0.13), JuicyPixels (>=3.1.6.1 && <3.4), mtl (==2.2.*), network (>=2.6), network-uri (==2.6.*), pandoc, pandoc-types (>=1.17.5 && <1.18), parsec (==3.1.*), process (>=1.2.3 && <1.7), random (>=1 && <1.2), safe (==0.3.*), semigroups (==0.18.*), SHA (==1.6.*), skylighting (>=0.7.4 && <0.8), split (==0.2.*), syb (>=0.1 && <0.8), tagsoup (>=0.14.6 && <0.15), temporary (>=1.1 && <1.4), texmath (==0.11.*), text (>=1.1.1.0 && <1.3), time (>=1.5 && <1.10), unicode-transforms (==0.3.*), unix (>=2.4 && <2.8), unordered-containers (==0.2.*), vector (>=0.10 && <0.13), wai (>=0.3), wai-extra, xml (>=1.3.12 && <1.4), zip-archive (>=0.2.3.4 && <0.5), zlib (>=0.5 && <0.7) [details]
License GPL-2.0-only
Copyright (c) 2006-2018 John MacFarlane
Author John MacFarlane <jgm@berkeley.edu>
Maintainer John MacFarlane <jgm@berkeley.edu>
Revised Revision 1 made by JohnMacFarlane at Tue Dec 4 16:52:53 UTC 2018
Category Text
Home page https://pandoc.org
Bug tracker https://github.com/jgm/pandoc/issues
Source repo head: git clone git://github.com/jgm/pandoc.git
Uploaded by JohnMacFarlane at Tue Nov 27 17:34:37 UTC 2018
Distributions Arch:2.5, Debian:2.2.1, Fedora:2.1.2, FreeBSD:1.15.0.6, LTSHaskell:2.2.1, NixOS:2.5, Stackage:2.5, openSUSE:2.5
Executables trypandoc, pandoc
Downloads 142420 total (1056 in the last 30 days)
Rating 2.75 (votes: 13) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2018-11-27 [all 3 reports]
Hackage Matrix CI

Modules

  • Text
    • Text.Pandoc
      • Text.Pandoc.App
      • Text.Pandoc.Asciify
      • Text.Pandoc.BCP47
      • Text.Pandoc.Class
      • Text.Pandoc.Emoji
      • Text.Pandoc.Error
      • Text.Pandoc.Extensions
      • Text.Pandoc.Filter
      • Text.Pandoc.Highlighting
      • Text.Pandoc.ImageSize
      • Text.Pandoc.Logging
      • Text.Pandoc.Lua
      • Text.Pandoc.MIME
      • Text.Pandoc.MediaBag
      • Text.Pandoc.Options
      • Text.Pandoc.PDF
      • Text.Pandoc.Parsing
      • Text.Pandoc.Pretty
      • Text.Pandoc.Process
      • Text.Pandoc.Readers
        • Text.Pandoc.Readers.CommonMark
        • Text.Pandoc.Readers.Creole
        • Text.Pandoc.Readers.DocBook
        • Text.Pandoc.Readers.Docx
        • Text.Pandoc.Readers.EPUB
        • Text.Pandoc.Readers.FB2
        • Text.Pandoc.Readers.HTML
        • Text.Pandoc.Readers.Haddock
        • Text.Pandoc.Readers.JATS
        • Text.Pandoc.Readers.LaTeX
          • Text.Pandoc.Readers.LaTeX.Types
        • Text.Pandoc.Readers.Man
        • Text.Pandoc.Readers.Markdown
        • Text.Pandoc.Readers.MediaWiki
        • Text.Pandoc.Readers.Muse
        • Text.Pandoc.Readers.Native
        • Text.Pandoc.Readers.OPML
        • Text.Pandoc.Readers.Odt
        • Text.Pandoc.Readers.Org
        • Text.Pandoc.Readers.RST
        • Text.Pandoc.Readers.TWiki
        • Text.Pandoc.Readers.Textile
        • Text.Pandoc.Readers.TikiWiki
        • Text.Pandoc.Readers.Txt2Tags
        • Text.Pandoc.Readers.Vimwiki
      • Text.Pandoc.SelfContained
      • Text.Pandoc.Shared
      • Text.Pandoc.Templates
      • Text.Pandoc.UTF8
      • Text.Pandoc.Writers
        • Text.Pandoc.Writers.AsciiDoc
        • Text.Pandoc.Writers.CommonMark
        • 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.JATS
        • Text.Pandoc.Writers.LaTeX
        • Text.Pandoc.Writers.Man
        • Text.Pandoc.Writers.Markdown
        • Text.Pandoc.Writers.Math
        • Text.Pandoc.Writers.MediaWiki
        • Text.Pandoc.Writers.Ms
        • Text.Pandoc.Writers.Muse
        • Text.Pandoc.Writers.Native
        • Text.Pandoc.Writers.ODT
        • Text.Pandoc.Writers.OOXML
        • Text.Pandoc.Writers.OPML
        • Text.Pandoc.Writers.OpenDocument
        • Text.Pandoc.Writers.Org
        • Text.Pandoc.Writers.Powerpoint
        • Text.Pandoc.Writers.RST
        • Text.Pandoc.Writers.RTF
        • Text.Pandoc.Writers.Shared
        • Text.Pandoc.Writers.TEI
        • Text.Pandoc.Writers.Texinfo
        • Text.Pandoc.Writers.Textile
        • Text.Pandoc.Writers.ZimWiki
      • Text.Pandoc.XML

Flags

NameDescriptionDefaultType
static

Use static linking for pandoc executable.

DisabledAutomatic
embed_data_files

Embed data files in binary for relocatable executable.

DisabledAutomatic
derive_json_via_th

Use Template Haskell instead of GHC Generics to derive ToJSON and FromJSON instances.

EnabledAutomatic
trypandoc

Build trypandoc cgi executable.

DisabledAutomatic

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

For package maintainers and hackage trustees


Readme for pandoc-2.5

[back to package description]
<!-- Do not edit this file. It is generated automatically from README.template and MANUAL.txt via the command: pandoc --lua-filter tools/update-readme.lua README.template -o README.md -->

Pandoc

github
release hackage
release homebrew stackage LTS
package travis build
status appveyor build
status license pandoc-discuss on google
groups

The universal markup converter

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

<div id="input-formats"> </div>

It can convert to

<div id="output-formats"> </div>

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.

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 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. 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.

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-2018 John MacFarlane (jgm@berkeley.edu). Released under the GPL, version 2 or greater. This software carries no warranty of any kind. (See COPYRIGHT for full copyright and warranty notices.)