Linux repositories inspector

pandoc - Conversion between markup formats

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, and Textile, and it can write Markdown, reStructuredText, XHTML, HTML 5, LaTeX (including rendering as plain PDF or beamer slide shows), ConTeXt, DocBook, JATS, OPML, TEI, OpenDocument, ODT, Word docx, RTF, MediaWiki, DokuWiki, ZimWiki, Textile, groff man, groff ms, GNU Texinfo, plain text, Emacs Org-Mode, AsciiDoc, Haddock markup,
EPUB (v2 and v3), FictionBook2, InDesign ICML,
Muse, LaTeX beamer slides, PowerPoint,
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.
This package contains the pandoc tool.
Some uses of Pandoc require additional packages:
  • SVG content in PDF output requires librsvg2-bin.
  • YAML metadata in TeX-related output requires texlive-latex-extra.
  • *.hs filters not set executable requires ghc.
  • *.js filters not set executable requires nodejs.
  • *.php filters not set executable requires php.
  • *.pl filters not set executable requires perl.
  • *.py filters not set executable requires python.
  • *.rb filters not set executable requires ruby.
  • *.r filters not set executable requires r-base-core.
  • LaTeX output, and PDF output via PDFLaTeX, require texlive-latex-recommended.
  • XeLaTeX output, and PDF output via XeLaTeX, require texlive-xetex.
  • LuaTeX output, and PDF output via LuaTeX, require texlive-luatex.
  • ConTeXt output, and PDF output via ConTeXt, require context.
  • PDF output via wkhtmltopdf requires wkhtmltopdf.
  • Groff man and groff ms output, and PDF output via groff ms, require groff.
  • MathJax-rendered equations require libjs-mathjax.
  • KaTeX-rendered equations require node-katex.
Original maintainer
Arch iconArch rolling
OpenSUSE iconOpenSUSE Tumbleweed
Manjaro iconManjaro rolling
Manjaro iconManjaro rolling
OpenSUSE iconOpenSUSE Leap 15.1
Debian iconDebian 10.0
Fedora iconFedora 30
Fedora iconFedora rawhide
Ubuntu iconUbuntu 18.10
Ubuntu iconUbuntu 19.04
Ubuntu iconUbuntu 19.10
Fedora iconFedora 29
Fedora iconFedora 28
Ubuntu iconUbuntu 18.04 LTS
Ubuntu iconUbuntu 17.10
OpenSUSE iconOpenSUSE Leap 15.0
OpenSUSE iconOpenSUSE Leap 42.3
Debian iconDebian 9.0
Ubuntu iconUbuntu 16.04 LTS
Arch iconArch rolling community/osxz2.7.3-11Now5.18 MiB43 MiB
Debian iconDebian 10.0 buster/maindeb2.2.1-3+b2Jan 1414 MiB110 MiB
Debian iconDebian 9.0 stretch/maindeb1.17.2~dfsg-32017-11-108.68 MiB67.8 MiB
Fedora iconFedora 28 releases/Everything-osrpm2.0.6-2.fc28Jan 14276 kiB689 kiBFedora Project
Fedora iconFedora 29 releases/Everything-osrpm2.1.2-1.fc29Jan 14279 kiB718 kiBFedora Project
Fedora iconFedora 29 releases-test/Everything-osrpm2.1.2-1.fc29Jan 14279 kiB718 kiBFedora Project
Fedora iconFedora 30 releases/Everything-osrpm2.2.1-1.fc30Jun 1720.3 MiB166 MiBFedora Project
Fedora iconFedora rawhide development/Everything-osrpm2.2.1-1.fc30Mar 1220.3 MiB166 MiBFedora Project
Manjaro iconManjaro rolling stable/communityxz2.7.1-5Apr 034.96 MiB41.4 MiB
Manjaro iconManjaro rolling testing/communityxz2.7.1-8Apr 054.96 MiB41.3 MiB
Manjaro iconManjaro rolling unstable/communityxz2.7.2-2Apr 105.09 MiB42.3 MiB
OpenSUSE iconOpenSUSE Leap 15.0 ossrpm1.19.2.1-lp150.1.25Jan 179.54 MiB81.1 MiB
OpenSUSE iconOpenSUSE Leap 15.1 ossrpm2.6-lp151.1.2Mar 1418.7 MiB124 MiB
OpenSUSE iconOpenSUSE Leap 42.3 ossrpm1.19.2.1-2.2Jan 177.31 MiB59.8 MiB
OpenSUSE iconOpenSUSE Tumbleweed ossrpm2.7.3-1.2Jul 0119.4 MiB129 MiB
Ubuntu iconUbuntu 17.10 artful/universedeb1. MiB49.1 MiB
Ubuntu iconUbuntu 18.04 LTS bionic/universedeb1.19.2.4~dfsg-1build42018-02-016.38 MiB49.7 MiB
Ubuntu iconUbuntu 18.10 cosmic/universedeb2.2.1-2build2Jan 1414 MiB112 MiB
Ubuntu iconUbuntu 19.04 disco/universedeb2.2.1-3build1Jan 1413.8 MiB110 MiB
Ubuntu iconUbuntu 19.10 eoan/universedeb2.2.1-3build1Jun 1713.8 MiB110 MiB
Ubuntu iconUbuntu 16.04 LTS xenial/universedeb1.16.0.2~dfsg-12017-11-106.3 MiB51.2 MiB

Manual pages


pandoc - general markup converter

Latest updates

Arch rolling icon

Arch rolling community/os: Updated from 2.7.3-10 to 2.7.3-11

Arch rolling icon

Arch rolling community-staging/os: Version 2.7.3-10 removed

Arch rolling icon

Arch rolling community/os: Updated from 2.7.3-9 to 2.7.3-10

Arch rolling icon

Arch rolling community-staging/os: Version 2.7.3-10 introduced

Arch rolling icon

Arch rolling community-staging/os: Version 2.7.3-9 removed

0 - 13:36
Arch rolling icon

Arch rolling community/os: Updated from 2.7.3-8 to 2.7.3-9

0 - 13:36
Arch rolling icon

Arch rolling community-staging/os: Version 2.7.3-9 introduced

0 - 09:26
Arch rolling icon

Arch rolling community-staging/os: Version 2.7.3-8 removed

0 - 12:31
Arch rolling icon

Arch rolling community/os: Updated from 2.7.3-7 to 2.7.3-8

0 - 12:30
Arch rolling icon

Arch rolling community-staging/os: Version 2.7.3-8 introduced

0 - 11:02
Arch rolling icon

Arch rolling community-staging/os: Version 2.7.3-7 removed

0 - 08:11
Arch rolling icon

Arch rolling community/os: Updated from 2.7.3-6 to 2.7.3-7

0 - 08:11
Arch rolling icon

Arch rolling community-staging/os: Version 2.7.3-7 introduced

0 - 04:06
Arch rolling icon

Arch rolling community-staging/os: Version 2.7.3-6 removed

0 - 22:32
Arch rolling icon

Arch rolling community/os: Updated from 2.7.3-5 to 2.7.3-6

0 - 22:31
Arch rolling icon

Arch rolling community-staging/os: Version 2.7.3-6 introduced

0 - 14:26
Arch rolling icon

Arch rolling community-staging/os: Version 2.7.3-5 removed

0 - 13:09
Arch rolling icon

Arch rolling community/os: Updated from 2.7.3-4 to 2.7.3-5

0 - 13:09
Arch rolling icon

Arch rolling community-staging/os: Version 2.7.3-5 introduced

Jul 01
OpenSUSE Tumbleweed icon

OpenSUSE Tumbleweed oss: Updated from 2.7.3-1.1 to 2.7.3-1.2

Jul 01
  • Update pandoc to version 2.7.3.
    pandoc (2.7.3)
    • Add `jira` (Atlassian's Jira wiki markup) as output format (#2497, Albert Krewinkel).
    • Add `tex_math_dollars` to `multimarkdownExtensions` (#5512). This form is now supported in multimarkdown,
      in addition to `tex_math_double_backslash`.
    • Fix `--self-contained` so it works when output format has extensions. Previously if you used `--self-contained` with `html-smart` or `html+smart`, it wouldn't work.
    • Add template variable `curdir` with working directory from which pandoc is run (#5464).
    • Markdown reader: don't create implicit reference for empty header (#5549).
    • Muse reader: allow images inside link descriptions (Alexander Krotov).
    • HTML reader: epub related fixes.
      • With epub extensions, check for `epub:type` in addition to `type`.
      • Fix problem with noteref parsing which caused block-level
      content to be eaten with the noteref.
      • Rename `pAnyTag` to `pAny`.
      • Refactor note resolution.
      • Trim definition list terms (Alexander Krotov).
    • LaTeX reader:
      • Add braces when resolving `\DeclareMathOperator`
      (#5441). These seem to be needed for xelatex but not pdflatex.
      • Allow newlines in `\mintinline`.
      • Pass through unknown listings language as class (#5540).
      Previously if the language was not in the list of languages supported by listings, it would not be added as a class, so highlighting would not be triggered.
      • `rawLaTeXInline`: Include trailing `{}`s in raw latex commands (#5439).
      This change affects the markdown reader and other readers that allow raw LaTeX. Previously, trailing `{}` would be included for unknown commands, but not for known commands. However, they are sometimes used to avoid a trailing space after the command. The chances that a `{}` after a LaTeX command is not part of the command are very small.
    • MediaWiki reader: handle multiple attributes in table row (#5471, chinapedia).
    • Docx reader: Add support for `w:rtl` (#5545). Elements with this property are put into Span inlines with `dir="rtl"`.
    • DocBook reader: Issue `IgnoredElement` warnings.
    • Org reader (Albert Krewinkel):
      • Fix planning elements in headers level 3 and higher
      (#5494). Planning info is now always placed before
      the subtree contents. Previously, the planning info was placed after the content if the header's subtree was converted to a list, which happens with headers of level 3 and higher per default.
      • Omit, but warn about unknown export options. Unknown export
      options are properly ignored and omitted from the output.
      • Prefer plain symbols over math symbols (#5483).
      Symbols like `\alpha` are output plain and unemphasized, not as math.
      • Recognize emphasis after TODO/DONE keyword (#5484).
    • FB2 reader:
      • Skip unknown elements rather than throwing errors (#5560).
      Sometimes custom elements are used (e.g. `id` element inside `author`); previously the reader would halt with an error. Now it skips the element and issues an `IgnoredElement` warning.
      • Parse notes (#5493, Alexander Krotov).
      • Internal improvements (Alexander Krotov).
    • OpenDocument writer: Roll back automatic figure/table numbering (#5474). This was added in pandoc 2.7.2, but it makes it impossible to use pandoc-crossref. So this has been rolled back for now, until we find a good solution to make this behavior optional (or a creative way to let pandoc-crossref and this feature to coexist).
    • New module Text.Pandoc.Writers.Jira, exporting `writeJira` [API change] (Albert Krewinkel).
    • EPUB writer:
      • Don't include 'landmarks' if there aren't any.
      Previously we could get an empty ol element, which caused validation errors with epubcheck.
      • Ensure unique ids for styleesheets in content.opf (#5463).
      • Make stylesheet link compatible with kindlegen (#5466,
      Eric Schrijver). Pandoc omitted `type="text/css"` from both `<style>` and `<rel="stylesheet">` elements in all templates, which is valid according to the spec. However, Amazon?s kindlegen software relies on this attribute on `<link>` elements when detecting stylesheets to include.
    • HTML writer:
      • Output video and audio elements depending on file
      extension of the image path (Mauro Bieg).
      • Emit empty alt tag in figures (#5518, Mauro Bieg).
      The same text is already in the <figcaption> and screen-readers would read it twice, see #4737.
      • Don't add variation selector if it's already there.
      This fixes round-trip failures.
      • Prevent gratuitious emojification on iOS (#5469).
      iOS chooses to render a number of Unicode entities, including '?', as big colorful emoji. This can be defeated by appending Unicode VARIATION SELECTOR-15'/'VARIATION SELECTOR-16'. So we now append this character when escaping strings, for both '?' and '?'. If other characters prove problematic, they can simply be added to `needsVariationSelector`.
      • Add `class="heading"` to level 7+ Headers rendered as `<p>` elements
    • RST writer: treat Span with no attributes as transparent (#5446). Previously an Emph inside a Span was being treated as nested markup and ignored. With this patch, the Span
      is just ignored.
    • LaTeX writer:
      • Include inline code attributes with `--listings` (#5420).
      • Don't produce columns environment unless beamer (#5485).
      • Fix footnote in image caption. Regression: the fix for #4683 broke
      this case.
      • Don't highlight code in headings (#5574). This causes
      compilation errors.
      • Use `\mbox` to get proper behavior inside `\sout` (#5529).
    • EPUB writer: Fix document section assignments (#5546). For example, introduction should go in bodymatter, not frontmatter, and epigraph, conclusion, and afterward should go in bodymatter, not backmatter. For the full list of assignments, see the manual.
    • Markdown writer:
      • Add backslashes to avoid unwanted interpretation of
      definition list terms as other kinds of block (#554).
      • Ensure the code fence is long enough (#5519).
      Previously too few backticks were used when the code block contained an indented line of backticks. (Ditto tildes.)
      • Handle labels with integer names (Jesse Rosenthal, #5495).
      Previously if labels had integer names, it could produce a conflict with auto-labeled reference links. Now we test for a conflict and find the next available integer. This involves adding a new state variable `stPrevRefs` to keep track of refs used in other document parts when using `--reference-location=block|section`
    • Textile writer: fix closing tag for math output (Albert Krewinkel). Opening and closing tag for math output match now.
    • Org writer: always indent src blocks content by 2 spaces (#5440, Albert Krewinkel). Emacs always uses two spaces when indenting the content of src blocks, e.g., when exiting a `C-c '` edit-buffer. Pandoc used to indent contents by the space-equivalent of one tab, but now always uses two spaces, too.
    • Asciidoc writer:
      • Use `` `+...+` `` form for inline code.
      The old `` `a__b__c` `` yields emphasis inside code in asciidoc. To get a pure literal code span, use `` `+a__b__c+` ``.
      • Use proper smart quotes with asciidoctor (#5487).
      Asciidoctor has a different format for smart quotes.
      • Use doubled ## when necessary for spans (#5566).
      • Ensure correct nesting of strong/emph (#5565): strong
      must be the outer element.
    • JATS writer:
      • Wrap elements with p when needed (#5570). The JATS spec restricts
      what elements can go inside `fn` and `list-item`. So we wrap other elements inside `<p specific-use="wrapper">` when needed.
      • Properly handle footnotes (#5511) according to "best practice."
      (Group them at the end in `<fn-group>` and use `<xref>` elements to link them.)
      • Fix citations with PMID so they validate (#5481). This includes
      an update to data/jats.csl.
      • Ensure validity of `<pub-date>` by parsing the date and
      extracting year, month, and day, as expected. Also add an iso-8601-date attribute automatically.
      • Don't use `<break>` element for LineBreak. It is only
      allowed in a few special contexts, and not in `<p>` elements.
      • Don't make `<string-name>` a child of `<string>`, which is illegal.
    • FB2 writer:
      • Do not wrap note references into `<sup>` and brackets
      (Alexander Krotov). Existing FB2 readers, such as FBReader, already display links with type="note" as a superscript.
      • Use genre metadata field (#5478).
    • Muse writer: do not escape empty line after `<br>` (Alexander Krotov).
    • Add unicode code point in "Missing character" warning (#5538). If the character isn't in the console font, the message is pretty useless, so we show the code point for anything non-ASCII.
    • Lua: add Version type to simplify comparisons (Albert Krewinkel). Version specifiers like `PANDOC_VERSION` and `PANDOC_API_VERSION` are turned into `Version` objects. The objects simplify version-appropriate comparisons while maintaining backward-compatibility.
      A function `pandoc.types.Version` is added as part of the newly introduced module `pandoc.types`, allowing users to create version objects in scripts.
    • pandoc lua module (Albert Krewinkel):
    • Fix deletion of nonexistent attributes (#5569).
    • Better tests for Attr and AttributeList.
    • pandoc.mediabag lua module (Albert Krewinkel):
      • Add function `delete` for deleting a single item.
      • Add function `empty` for removing all entries.
      • Add function `items` for iterating over mediabag.
    • Text.Pandoc.Class: Fix handling of `file:` URL scheme in
      `downloadOrRead` (#5517, Mauro Bieg). Previously `file:/` URLs were handled wrongly and pandoc attempted to make HTTP requests, which failed.
    • Text.Pandoc.MIME: add `mediaCategory` [API change] (Mauro Bieg).
    • Text.Pandoc.Shared:
      • Add `onlySimpleTableCells` [API change]
      (Mauro Bieg) and use this to consolidate simple-table detection (#5524). This fixes an inconsistency in the HTML reader, which did not treat tables with `<p>` inside cells as simple.
      • `metaToJSON`: treat digits starting with 0 as a string, not a number
      (#5479). This fixes a regression in YAML metadata in pandoc 2.7.2.
    • Text.Pandoc.Logging: Add `IgnoredElement` constructor for `LogMessage`. `SkippedConetnt` doesn't work for some XML-based readers which don't have access to parsec source positions.
    • Text.Pandoc.Asciify: Add Turkish undotted-i (#5433, Mauro Bieg).
    • Improve output of Lua tests (#5499, Albert Krewinkel). This makes use of tasty-lua, a package to write tests in Lua and integrate the results into Tasty output. Test output becomes more informative: individual tests and test groups become visible in test output. Failures are reported with helpful error messages.
    • Lua: add `pandoc.system` module (#5468, Albert Krewinkel). The `system` Lua module provides utility functions to interact with the operating- and file system. E.g.
      pandoc.system.with_temporary_directory('tikz', function (dir)
    • - write and compile a TikZ file with pdflatex
    • LaTeX template: Add pdflang to hypersetup if lang is set (#5443).
    • beamer template: Fix using Beamer with geometry (#5505, Daniel Maslowski). Beamer already loads geometry, so we need to use the `\geometry` command to set geometry options.
    • EPUB2/3 templates: Move inline styles to default epub.css (#5466). NOTE: Those who use a custom CSS stylesheet with EPUB should add these lines:
      code{ white-space: pre-wrap; }
      span.smallcaps{ font-variant: small-caps; }
      span.underline{ text-decoration: underline; }
      q { quotes: "?" "?" "?" "?"; }
      div.column{ display: inline-block; vertical-align: top; width: 50%; }
    • reveal.js template:
      • Updates for revealjs 3.8.0 (#5435, ebiim).
      • Remove reference to head.min.js (#5448, Winnie Hellmann).
      NOTE: users will need to update reveal.js to at least 3.8.0 for their presentations generated with this version of pandoc to work correctly.
    • Text.Pandoc.PDF:
      • Replace `</>` with literal `/` (#5451).
      We use forward-slash for a directory separator in tmpDir, even on Windows (because that's what tex likes). So we should not put a backslash between the tmpDir and the filename on Windows. This is harmless enough in normal Windows setups, but it breaks on Cygwin.
      Thanks to @cc2x for noticing and diagnosing the problem.
      • Allow use of `-output-directory` in `--pdf-engine-opt` (#5462).
      This is currently possible with `mklatex` and `-outdir`, but was not yet possible with xelatex and `-output-directory`.
      • For PDF via ms/pdfroff, make TOC appear at beginning and in
      PDF bookmarks (#5553). Previously the TOC appeared at the end of the document, and was not bookmarked. To keep it at the end, add `--pdf-engine-opt=--no-toc-relocation` to your command line.
    • Fix broken links in documents (#5473, Shim Myeongseob). Also, use absolute links to when possible, so that the links can be followed by people viewing these documents on GitHub.
    • Improved sample lua tikz filter in lua-filters docs (#5445, Matthew Doty). There are three changes:
      • It only processes elements which begin with `\begin{tikzpicture}`
      • It uses pdf2svg instead of imagemagick to preserve fidelity
      • The images produced have transparent backgrounds
    • MANUAL.txt:
      • Add note about `title-meta`, `author-meta`, `date-meta` (#5486).
      • Fix typo (#5489, Christian Krause).
    • add test/tables.xwiki to git and pandoc.cabal (#5498, Mauro Bieg).
    • Disable missing-home-modules warning in `stack.yaml`. Otherwise `stack ghci` fails.

Related packages

pandoc-citeproc - Pandoc support for Citation Style Language - tools
pandoc-citeproc-common - Pandoc Citeproc data files
pandoc-citeproc-preamble - insert a preamble before pandoc-citeproc's bibliography
pandoc-common - pandoc common files
pandoc-crossref - Pandoc filter for cross-references
pandoc-data - general markup converter - data files
pandoc-pdf - Meta package for support generating pdf with pandoc
pandoc-plantuml-filter - Pandoc filter: converts PlantUML code blocks to PlantUML images
pandoc-sidenote - footnotes-to-sidenotes converter for Pandoc
⇧ Top