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, , Index, Quick Jump, Text.Pandoc, Text.Pandoc.App, Text.Pandoc.Asciify, Text.Pandoc.Chunks, Text.Pandoc.Citeproc, Text.Pandoc.Class, Text.Pandoc.Class.IO, Text.Pandoc.Data, Text.Pandoc.Emoji, Text.Pandoc.Error, Text.Pandoc.Extensions, Text.Pandoc.Filter, Text.Pandoc.Format, Text.Pandoc.Highlighting, Text.Pandoc.ImageSize, Text.Pandoc.Logging, Text.Pandoc.MIME, Text.Pandoc.MediaBag, Text.Pandoc.Options, Text.Pandoc.PDF, Text.Pandoc.Parsing, Text.Pandoc.Process, Text.Pandoc.Readers, Text.Pandoc.Readers.BibTeX, Text.Pandoc.Readers.CSV, Text.Pandoc.Readers.CommonMark, Text.Pandoc.Readers.Creole, Text.Pandoc.Readers.CslJson, Text.Pandoc.Readers.Djot, Text.Pandoc.Readers.DocBook, Text.Pandoc.Readers.Docx, Text.Pandoc.Readers.DokuWiki, Text.Pandoc.Readers.EPUB, Text.Pandoc.Readers.EndNote, Text.Pandoc.Readers.FB2, Text.Pandoc.Readers.HTML, Text.Pandoc.Readers.Haddock, Text.Pandoc.Readers.Ipynb, Text.Pandoc.Readers.JATS, Text.Pandoc.Readers.Jira, Text.Pandoc.Readers.LaTeX, Text.Pandoc.Readers.Man, Text.Pandoc.Readers.Markdown, Text.Pandoc.Readers.MediaWiki, Text.Pandoc.Readers.Muse, Text.Pandoc.Readers.Native, Text.Pandoc.Readers.ODT, Text.Pandoc.Readers.OPML, Text.Pandoc.Readers.Org, Text.Pandoc.Readers.RIS, Text.Pandoc.Readers.RST, Text.Pandoc.Readers.RTF, Text.Pandoc.Readers.TWiki, Text.Pandoc.Readers.Textile, Text.Pandoc.Readers.TikiWiki, Text.Pandoc.Readers.Txt2Tags, Text.Pandoc.Readers.Typst, Text.Pandoc.Readers.Vimwiki, Text.Pandoc.Scripting, Text.Pandoc.SelfContained, Text.Pandoc.Shared, Text.Pandoc.Slides, Text.Pandoc.Sources, Text.Pandoc.Templates, Text.Pandoc.Transforms, Text.Pandoc.Translations, Text.Pandoc.Translations.Types, Text.Pandoc.UTF8, Text.Pandoc.Version, Text.Pandoc.Writers, Text.Pandoc.Writers.ANSI, Text.Pandoc.Writers.AnnotatedTable, Text.Pandoc.Writers.AsciiDoc, Text.Pandoc.Writers.BibTeX, Text.Pandoc.Writers.ChunkedHTML, Text.Pandoc.Writers.CommonMark, Text.Pandoc.Writers.ConTeXt, Text.Pandoc.Writers.CslJson, Text.Pandoc.Writers.Djot, 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.Ipynb, Text.Pandoc.Writers.JATS, Text.Pandoc.Writers.Jira, 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.Typst, Text.Pandoc.Writers.XWiki, Text.Pandoc.Writers.ZimWiki, Text.Pandoc.XML, More info, pandoc-3.5.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, OpenOffice text document, OPML, Emacs Org mode, RIS, Rich Text Format, reStructuredText, txt2tags, Textile, TikiWiki markup, TWiki markup, typst, Vimwiki, Custom readers and writers, ANSI escape codes, AsciiDoc, AsciiDoctor, asciidoc-py, LaTeX beamer, ConTeXt, HTML5, polyglot markup, XHTML, InDesign ICML, Markua, roff ms, 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-1.15.0.2

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