3These instructions explain how to install pandoc from source.
4Binary packages or ports of pandoc are available for freebsd
5and several linux distributions, so check your package manager.
6There is also a Windows installer.
111. Install the [Haskell platform]. This will give you [GHC] and
12the [cabal-install] build tool.
142. Use `cabal` to install pandoc and its dependencies:
18 If you want support for source code syntax highlighting, set
19 the `highlighting` flag:
21 cabal install -fhighlighting pandoc
23 This procedure will install the released version of pandoc,
24 which will be downloaded automatically from HackageDB.
25 If you want to install a modified or development version
26 of pandoc instead, switch to the source directory and do
27 as above, but without the 'pandoc':
313. Make sure the `$CABALDIR/bin` directory is in your path. You should
32now be able to run `pandoc`:
364. Make sure the `$CABALDIR/share/man/man1` directory is in your `MANPATH`.
37You should now be able to access the `pandoc` man page:
41[GHC]: http://www.haskell.org/ghc/
42[Haskell platform]: http://hackage.haskell.org/platform/
43[cabal-install]: http://hackage.haskell.org/trac/hackage/wiki/CabalInstall
48This is a step-by-step procedure that offers maximal control
49over the build and installation. Most users should use the
50quick install, but this information may be of use to packagers.
51For more details, see the [Cabal User's Guide].
531. Install dependencies: in addition to the [Haskell platform],
54you will need [zip-archive] and (if you want syntax highlighting)
59 runghc Setup.hs configure --prefix=DIR --bindir=DIR --libdir=DIR \
60 --datadir=DIR --libsubdir=DIR --datasubdir=DIR --docdir=DIR \
61 --htmldir=DIR --program-prefix=PREFIX --program-suffix=SUFFIX \
62 --mandir=DIR --flags=FLAGSPEC
64 All of the options have sensible defaults that can be overridden
67 `FLAGSPEC` is a list of Cabal configuration flags, optionally
68 preceded by a `-` (to force the flag to `false`), and separated
69 by spaces. Pandoc's flags include:
71 - `executable`: build the pandoc executable (default yes)
72 - `library`: build the pandoc library (default yes)
73 - `wrappers`: build the wrapper `markdown2pdf` (default yes)
74 - `highlighting`: compile with syntax highlighting support (increases
75 the size of the executable) (default no)
76 - `citeproc`: compile with bibliographic support using `citeproc-hs`
81 --flags="-executable -wrappers highlighting"
83 tells Cabal to build the library but not the executables,
84 and to compile with syntax highlighting support.
904. Build API documentation:
92 runghc Setup.hs haddock --html-location=URL --hyperlink-source
96 runghc Setup.hs copy --destdir=PATH
98 The default destdir is `/`.
1006. Register pandoc as a GHC package:
102 runghc Setup.hs register
104 Package managers may want to use the `--gen-script` option to
105 generate a script that can be run to register the package at
108[zip-archive]: http://hackage.haskell.org/package/zip-archive
109[highlighting-kate]: http://hackage.haskell.org/package/highlighting-kate
110[Cabal User's Guide]: http://www.haskell.org/cabal/release/latest/doc/users-guide/builders.html#setup-configure-paths
112Optional citeproc support
113-------------------------
115Pandoc can optionally be compiled with support for bibliographic citations
116using Andrea Rossato's [`citeproc-hs` library]. This allows you
117to specify citations in markdown using an intuitive syntax (for example,
118`[jones2005@p. 3; smith2006]`). These are automatically changed into
119appropriately styled citations in the output, and a bibliography is
120added. The bibliography data and style information are taken from XML
121files that must be specified on the command line. (Note: `citeproc-hs`
122support is experimental, and the interface may change in the future.)
124If you are using Cabal to compile pandoc, specify the `citeproc` flag in
127 runhaskell Setup configure --flags="citeproc"
129[`citeproc-hs` library]: http://code.haskell.org/citeproc-hs/
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