5 - There is a package installer at pandoc's [download page].
6 This will install pandoc, replacing older versions, and
7 update your path to include the directory where pandoc's
8 binaries are installed.
10 - If you prefer not to use the msi installer, we also provide
11 a zip file that contains pandoc's binaries and
12 documentation. Simply unzip this file and move the binaries
13 to a directory of your choice.
15 - For PDF output, you'll also need to install LaTeX.
16 We recommend [MiKTeX](http://miktex.org/).
20 - There is a package installer at pandoc's [download page].
21 If you later want to uninstall the package, you can do so
22 by downloading [this script][uninstaller]
23 and running it with `perl uninstall-pandoc.pl`.
25 - We also provide a zip file containing the binaries and man
26 pages, for those who prefer not to use the installer. Simply
27 unzip the file and move the binaries and man pages to
28 whatever directory you like.
30 - Alternatively, you can install pandoc using
31 [homebrew](http://brew.sh): `brew install pandoc`.
32 Note: If you are using macOS < 10.10, this method installs
33 pandoc from source, so it will take a long time and a lot of
34 disk space for the ghc compiler and dependent Haskell libraries.
36 - For PDF output, you'll also need LaTeX. Because a full [MacTeX]
37 installation takes more than a gigabyte of disk space, we recommend
38 installing [BasicTeX](http://www.tug.org/mactex/morepackages.html)
39 (64M) and using the `tlmgr` tool to install additional packages
40 as needed. If you get errors warning of fonts not found, try
42 tlmgr install collection-fontsrecommended
46 - First, try your package manager.
47 Pandoc is in the [Debian], [Ubuntu], [Slackware],
48 [Arch], [Fedora], [NiXOS], [openSUSE], and [gentoo] repositories.
49 Note, however, that versions in the repositories are often
52 - We provide a binary package for amd64 architecture on
53 the [download page]. This provides both `pandoc` and
54 `pandoc-citeproc`. The executables are statically linked and
55 have no dynamic dependencies or dependencies on external
56 data files. Note: because of the static
57 linking, the pandoc binary from this package cannot use lua
58 filters that require external lua modules written in C.
60 Both a tarball and a deb installer are provided. To install the deb:
64 where `$DEB` is the path to the downloaded deb. This will
65 install the `pandoc` and `pandoc-citeproc` executables and
68 If you use an RPM-based distro, you may be able to install
69 the deb from our download page using `alien`.
71 On any distro, you may install from the tarball into `$DEST`
72 (say, `/usr/local/` or `$HOME/.local`) by doing
74 tar xvzf $TGZ --strip-components 1 -C $DEST
76 where `$TGZ` is the path to the downloaded zipped tarball.
77 For Pandoc versions before 2.0, which don't provide
78 a tarball, try instead
80 ar p $DEB data.tar.gz | tar xvz --strip-components 2 -C $DEST
82 - You can also install from source, using the
83 instructions below under [Compiling from source].
84 Note that most distros have the Haskell platform in their
85 package repositories. For example, on Debian/Ubuntu,
86 you can install it with `apt-get install haskell-platform`.
88 - For PDF output, you'll need LaTeX. We recommend installing
89 [TeX Live](http://www.tug.org/texlive/) via your package
90 manager. (On Debian/Ubuntu, `apt-get install texlive`.)
94 - Pandoc is in the [NetBSD] and [FreeBSD ports] repositories.
96## Compiling from source
98If for some reason a binary package is not available for your
99platform, or if you want to hack on pandoc or use a non-released
100version, you can install from source.
102### Getting the pandoc source code
104Source tarballs can be found at
105<https://hackage.haskell.org/package/pandoc>. For example, to
106fetch the source for version 1.17.0.3:
108 wget https://hackage.haskell.org/package/pandoc-1.17.0.3/pandoc-1.17.0.3.tar.gz
109 tar xvzf pandoc-1.17.0.3.tar.gz
112Or you can fetch the development code by cloning the repository:
114 git clone https://github.com/jgm/pandoc
117Note: there may be times when the development code is broken
118or depends on other libraries which must be installed
119separately. Unless you really know what you're doing, install
120the last released version.
122### Quick stack method
124The easiest way to build pandoc from source is to use [stack]:
1261. Install [stack]. Note that Pandoc requires stack >= 1.6.0.
1282. Change to the pandoc source directory and issue the following commands:
133 `stack setup` will automatically download the ghc compiler
134 if you don't have it. `stack install` will install the
135 `pandoc` executable into `~/.local/bin`, which you should
136 add to your `PATH`. This process will take a while, and
137 will consume a considerable amount of disk space.
139### Quick cabal method
1411. Install the [Haskell platform]. This will give you [GHC] and
142 the [cabal-install] build tool. Note that pandoc requires
1452. Update your package database:
1493. Use `cabal` to install pandoc and its dependencies:
153 This procedure will install the released version of pandoc,
154 which will be downloaded automatically from HackageDB.
156 If you want to install a modified or development version
157 of pandoc instead, switch to the source directory and do
158 as above, but without the 'pandoc':
1624. Make sure the `$CABALDIR/bin` directory is in your path. You should
163 now be able to run `pandoc`:
167 [Not sure where `$CABALDIR` is?](http://www.haskell.org/haskellwiki/Cabal-Install#The_cabal-install_configuration_file)
1695. If you want to process citations with pandoc, you will also need to
170 install a separate package, `pandoc-citeproc`. This can be installed
173 cabal install pandoc-citeproc
175 By default `pandoc-citeproc` uses the "i;unicode-casemap" method
176 to sort bibliography entries (RFC 5051). If you would like to
177 use the locale-sensitive unicode collation algorithm instead,
178 specify the `unicode_collation` flag:
180 cabal install pandoc-citeproc -funicode_collation
182 Note that this requires the `text-icu` library, which in turn
183 depends on the C library `icu4c`. Installation directions
184 vary by platform. Here is how it might work on macOS with homebrew:
187 cabal install --extra-lib-dirs=/usr/local/Cellar/icu4c/51.1/lib \
188 --extra-include-dirs=/usr/local/Cellar/icu4c/51.1/include \
189 -funicode_collation text-icu pandoc-citeproc
1916. The `pandoc.1` man page will be installed automatically. cabal shows
192 you where it is installed: you may need to set your `MANPATH`
193 accordingly. If `MANUAL.txt` has been modified, the man page can be
194 rebuilt: `make man/pandoc.1`.
196 The `pandoc-citeproc.1` man page will also be installed automatically.
199### Custom cabal method
201This is a step-by-step procedure that offers maximal control
202over the build and installation. Most users should use the
203quick install, but this information may be of use to packagers.
204For more details, see the [Cabal User's Guide]. These instructions
205assume that the pandoc source directory is your working directory.
2071. Install dependencies: in addition to the [Haskell platform],
208 you will need a number of additional libraries. You can install
212 cabal install --only-dependencies
216 cabal configure --prefix=DIR --bindir=DIR --libdir=DIR \
217 --datadir=DIR --libsubdir=DIR --datasubdir=DIR --docdir=DIR \
218 --htmldir=DIR --program-prefix=PREFIX --program-suffix=SUFFIX \
219 --mandir=DIR --flags=FLAGSPEC --enable-tests
221 All of the options have sensible defaults that can be overridden
224 `FLAGSPEC` is a list of Cabal configuration flags, optionally
225 preceded by a `-` (to force the flag to `false`), and separated
226 by spaces. Pandoc's flags include:
228 - `embed_data_files`: embed all data files into the binary (default no).
229 This is helpful if you want to create a relocatable binary.
231 - `https`: enable support for downloading resources over https
232 (using the `http-client` and `http-client-tls` libraries).
2394. Build API documentation:
241 cabal haddock --html-location=URL --hyperlink-source
245 cabal copy --destdir=PATH
247 The default destdir is `/`.
2496. Register pandoc as a GHC package:
253 Package managers may want to use the `--gen-script` option to
254 generate a script that can be run to register the package at
257### Creating a relocatable binary
259It is possible to compile pandoc such that the data files
260pandoc uses are embedded in the binary. The resulting binary
261can be run from any directory and is completely self-contained.
262With cabal, add `-fembed_data_files` to the `cabal configure`
263or `cabal install` commands.
265With stack, use `--flag pandoc:embed_data_files`.
271Pandoc comes with an automated test suite.
272To run with cabal, `cabal test`; to run with stack, `stack
275To run particular tests (pattern-matching on their names), use
278 cabal install pandoc --enable-tests
279 cabal test --test-options='-p markdown'
283 stack test --test-arguments='-p markdown'
285It is often helpful to add `-j4` (run tests in parallel)
286and `--hide-successes` (don't clutter output with successes)
287to the test arguments as well.
289If you add a new feature to pandoc, please add tests as well, following
290the pattern of the existing tests. The test suite code is in
291`test/test-pandoc.hs`. If you are adding a new reader or writer, it is
292probably easiest to add some data files to the `test` directory, and
293modify `test/Tests/Old.hs`. Otherwise, it is better to modify the module
294under the `test/Tests` hierarchy corresponding to the pandoc module you
297### Running benchmarks
299To build and run the benchmarks:
301 cabal configure --enable-benchmarks && cabal build
308To use a smaller sample size so the benchmarks run faster:
310 cabal bench --benchmark-options='-s 20'
312To run just the markdown benchmarks:
314 cabal bench --benchmark-options='markdown'
317[Arch]: https://www.archlinux.org/packages/community/x86_64/pandoc/
318[Cabal User's Guide]: http://www.haskell.org/cabal/release/latest/doc/users-guide/builders.html#setup-configure-paths
319[Debian]: https://packages.debian.org/pandoc
320[Fedora]: https://apps.fedoraproject.org/packages/pandoc
321[FreeBSD ports]: http://www.freshports.org/textproc/pandoc/
322[GHC]: http://www.haskell.org/ghc/
323[GPL]: http://www.gnu.org/copyleft/gpl.html
324[Haskell platform]: http://hackage.haskell.org/platform/
325[MacPorts]: http://trac.macports.org/browser/trunk/dports/textproc/pandoc/Portfile
326[MacTeX]: https://tug.org/mactex/
327[NetBSD]: http://pkgsrc.se/wip/pandoc
328[NixOS]: https://nixos.org/nixos/packages.html
329[Slackware]: https://www.slackbuilds.org/result/?search=pandoc&sv=
330[Ubuntu]: https://packages.ubuntu.com/pandoc
331[download page]: https://github.com/jgm/pandoc/releases/latest
332[gentoo]: http://packages.gentoo.org/package/app-text/pandoc
333[haskell repository]: https://wiki.archlinux.org/index.php/Haskell_Package_Guidelines#.5Bhaskell.5D
334[openSUSE]: https://software.opensuse.org/package/pandoc
335[source tarball]: http://hackage.haskell.org/package/pandoc
336[stack]: http://docs.haskellstack.org/en/stable/install_and_upgrade.html
337[cabal-install]: http://hackage.haskell.org/trac/hackage/wiki/CabalInstall
338[uninstaller]: https://raw.githubusercontent.com/jgm/pandoc/master/macos/uninstall-pandoc.pl
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list