pandoc

Pandoc is a Haskell library for converting from one markup format to another. The formats it can handle include light markup formats (many variants of Markdown, reStructuredText, AsciiDoc, Org-mode, Muse, Textile, txt2tags, djot) HTML formats (HTML 4 and 5) Ebook formats (EPUB v2 and v3, FB2) Documentation formats (GNU TexInfo, Haddock) Roff formats (man, ms) TeX formats (LaTeX, ConTeXt) Typst XML formats (DocBook 4 and 5, JATS, TEI Simple, OpenDocument) Outline formats (OPML) Bibliography formats (BibTeX, BibLaTeX, CSL JSON, CSL YAML, RIS) Word processor formats (Docx, RTF, ODT) Interactive notebook formats (Jupyter notebook ipynb) Page layout formats (InDesign ICML) Wiki markup formats (MediaWiki, DokuWiki, TikiWiki, TWiki, Vimwiki, XWiki, ZimWiki, Jira wiki, Creole) Slide show formats (LaTeX Beamer, PowerPoint, Slidy, reveal.js, Slideous, S5, DZSlides) Data formats (CSV and TSV tables) PDF (via external programs such as pdflatex or wkhtmltopdf) Pandoc can convert mathematical content in documents between TeX, MathML, Word equations, roff eqn, typst, and plain text. It includes a powerful system for automatic citations and bibliographies, and it can be customized extensively using templates, filters, and custom readers and writers written in Lua. For the pandoc command-line program, see the pandoc-cli package.


Keywords
library, text, Propose Tags, Skip to Readme, Last Documentation, More info, pandoc-3.1.12.3.tar.gz, browse, Package description, Package maintainers, JohnMacFarlane, edit package information , Haskell, BibTeX, BibLaTeX, BITS, CommonMark, Creole 1.0, CSL JSON, CSV, TSV, Djot markup, DocBook, Word docx, DokuWiki markup, EndNote XML bibliography, EPUB, FictionBook2, GitHub-Flavored Markdown, markdown_github, gfm, Haddock markup, HTML, Jupyter notebook, JATS, Jira, LaTeX, Pandoc’s Markdown, MultiMarkdown, PHP Markdown Extra, Markdown, MediaWiki markup, roff man, Muse, ODT, OPML, Emacs Org mode, RIS, Rich Text Format, reStructuredText, txt2tags, Textile, TikiWiki markup, TWiki markup, typst, Vimwiki, Custom readers and writers, AsciiDoc, AsciiDoctor, asciidoc-py, LaTeX beamer, ConTeXt, HTML5, polyglot markup, XHTML, InDesign ICML, Markua, roff ms, OpenOffice text document, OpenDocument, PDF, PowerPoint, GNU Texinfo, Slideous, Slidy, DZSlides, reveal.js, S5, TEI Simple, XWiki markup, ZimWiki markup, filters, Lua filters, how to install pandoc, User’s Guide, here, examples of the use of pandoc, online demo, the contributor guidelines, jgm@berkeley.edu, GPL, converter, document, markup, pandoc, presentation, publishing
License
CNRI-Python-GPL-Compatible
Install
cabal install pandoc-2.12

Documentation

Pandoc

github release hackage release homebrew stackage LTS package CI tests 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

It can convert to

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