Pandoc is a Haskell library for converting from one markupformat to another, and a command-line tool that usesthis library. It can read several dialects of Markdown and(subsets of) HTML, reStructuredText, LaTeX, DocBook,MediaWiki markup, TWiki markup, TikiWiki markup, Creole 1.0,Haddock markup, OPML, Emacs Org-Mode, Emacs Muse, txt2tags,Vimwiki, Word Docx, ODT, and Textile, and it can writeMarkdown, reStructuredText, XHTML, HTML 5, LaTeX, ConTeXt,DocBook, JATS, OPML, TEI, OpenDocument, ODT, Word docx,RTF, MediaWiki, DokuWiki, ZimWiki, Textile, groff man,groff ms, plain text, Emacs Org-Mode, AsciiDoc,Haddock markup, EPUB (v2 and v3), FictionBook2, InDesignICML, Muse, and several kinds of HTML/JavaScript slideshows (S5, Slidy, Slideous, DZSlides, reveal.js).
In contrast to most existing tools for converting Markdownto HTML, pandoc has a modular design: it consists of a set ofreaders, which parse text in a given format and produce anative representation of the document, and a set of writers,which convert this native representation into a targetformat. Thus, adding an input or output format requiresonly adding a reader or writer.
[Index]
Name | Description | Default |
---|---|---|
static | Use static linking for pandoc executable. | Disabled |
embed_data_files | Embed data files in binary for relocatable executable. | Disabled |
trypandoc | Build trypandoc cgi executable. | Disabled |
weigh-pandoc | Build weigh-pandoc to measure memory usage. | Disabled |
network-uri | Get Network.URI from the network-uri package | Enabled |
old-locale | Use old-locale and time < 1.5 | Disabled |
Use-f <flag> to enable a flag, or-f -<flag> to disable that flag.More info
Note: This package hasmetadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.
For package maintainers and hackage trustees
Candidates
Pandoc is aHaskell library for converting from one markup format toanother, and a command-line tool that uses this library. It can readMarkdown,CommonMark,PHP Markdown Extra,GitHub-FlavoredMarkdown,MultiMarkdown, and (subsets of)Textile,reStructuredText,HTML,LaTeX,MediaWiki markup,TWiki markup,[TikiWiki markup],Creole 1.0,Haddock markup,OPML,Emacs Org mode,DocBook,Muse,txt2tags,Vimwiki,EPUB,ODT, andWord docx;and it can write plain text,Markdown,CommonMark,PHP MarkdownExtra,GitHub-Flavored Markdown,MultiMarkdown,reStructuredText,XHTML,HTML5,LaTeX (includingbeamer
slide shows),ConTeXt,RTF,OPML,DocBook,OpenDocument,ODT,Word docx,GNU Texinfo,MediaWikimarkup,DokuWiki markup,ZimWiki markup,Haddock markup,EPUB (v2 or v3),FictionBook2,Textile,groff man,[groff ms],Emacs Org mode,AsciiDoc,InDesign ICML,TEISimple,Muse andSlidy,Slideous,DZSlides,reveal.jsorS5 HTML slide shows. It can also producePDF output onsystems where LaTeX, ConTeXt,pdfroff
,wkhtmltopdf
,prince
, orweasyprint
is installed.
Pandoc's enhanced version of Markdown includes syntax forfootnotes,tables, flexibleordered lists,definition lists,fenced codeblocks,superscripts and subscripts,strikeout,metadata blocks,automatic tables of contents, embedded LaTeXmath,citations, and[Markdown inside HTML block elements][Extension:markdown_in_html_blocks
]. (These enhancements, described further underPandoc's Markdown, can be disabled using themarkdown_strict
inputor output format.)
In contrast to most existing tools for converting Markdown to HTML, whichuse regex substitutions, pandoc has a modular design: it consists of aset of readers, which parse text in a given format and produce a nativerepresentation of the document, and a set of writers, which convertthis native representation into a target format. Thus, adding an inputor output format requires only adding a reader or writer.
Because pandoc's intermediate representation of a document is lessexpressive than many of the formats it converts between, one shouldnot expect perfect conversions between every format and every other.Pandoc attempts to preserve the structural elements of a document, butnot formatting details such as margin size. And some document elements,such as complex tables, may not fit into pandoc's simple documentmodel. While conversions from pandoc's Markdown to all formats aspireto be perfect, conversions from formats more expressive than pandoc'sMarkdown can be expected to be lossy.
Here'show to install pandoc.
Pandoc's website contains a fullUser's Guide.It is also availablehere as pandoc-flavored Markdown.The website also contains someexamples of the use ofpandoc and a limitedonlinedemo.
Pull requests, bug reports, and feature requests are welcome. Please makesure to readthe contributor guidelines before opening anew issue.
© 2006-2017 John MacFarlane (jgm@berkeley.edu). Released under theGPL, version 2 or greater. This software carries no warranty ofany kind. (See COPYRIGHT for full copyright and warranty notices.)