Pandoc   a universal document converter

Installing

Windows

  • There is a package installer at pandoc’s download page.
  • For PDF output, you’ll also need to install LaTeX. We recommend MiKTeX.

Mac OS X

  • There is a package installer at pandoc’s download page. If you later want to uninstall the package, you can do so by downloading this script and running it with perl uninstall-pandoc.pl.
  • For PDF output, you’ll also need LaTeX. Because a full MacTeX installation takes more than a gigabyte of disk space, we recommend installing BasicTeX (64M), and using the tlmgr tool to install additional packages as needed. If you get errors warning of fonts not found, try

    tlmgr install collection-fontsrecommended

Linux

  • For 64-bit Debian and Ubuntu, we provide a debian package on the download page. This will install the pandoc and pandoc-citeproc executables and man pages. If you use an RPM-based distro, you may be able to install this deb using alien, or try

    ar p $DEB data.tar.gz | sudo tar xvz --strip-components 2 -C /usr/local
    where $DEB is the path to the downloaded deb.
  • Or, try your package manager. Pandoc is in the Debian, Ubuntu, Slackware, Arch, Fedora, NiXOS, openSUSE, and gentoo repositories. Note, however, that versions in the repositories are often old.
  • If the version in your repository is too old and you cannot use the deb we provide, you can install from source, using the instructions below under Installing from source. Note that most distros have the Haskell platform in their package repositories. For example, on Debian/Ubuntu, you can install it with apt-get install haskell-platform.
  • For PDF output, you’ll need LaTeX. We recommend installing TeX Live via your package manager. (On Debian/Ubuntu, apt-get install texlive.)

BSD

Installing from source

If for some reason a binary package is not available for your platform, you can install from source.

Getting the pandoc source code

Source tarballs can be found at https://hackage.haskell.org/package/pandoc. For example, to fetch the source for version 1.17.0.3:

wget https://hackage.haskell.org/package/pandoc-1.17.0.3/pandoc-1.17.0.3.tar.gz
tar xvzf pandoc-1.17.0.3.tar.gz
cd pandoc-1.17.0.3

Or you can fetch the development code by cloning the repository:

git clone https://github.com/jgm/pandoc
cd pandoc
git submodule update --init   # to fetch the templates

Note: there may be times when the development code is broken or depends on other libraries which must be installed separately. Unless you really know what you’re doing, install the last released version.

Building pandoc from source

The easiest approach is to use stack:

  1. Install stack.

  2. Issue the following commands:

    stack setup
    stack install

    stack setup will automatically download the ghc compiler if you don’t have it. stack install will install the pandoc executable into ~/.local/bin, which you should add to your PATH. This process will take a while, and will consume a considerable amount of disk space.

Alternatively, you can follow the instructions in INSTALL, included in the source.