git.iko.soy/typeable/pandoc
on master help sign in
Added Text.Pandoc.UTF8 as a backup for when utf8-string is not present.
80715bdfiddlosopher
INSTALL+47−63
@@ -1,43 +1,32 @@
1% Installing pandoc
1% Installing pandoc
2
2
3−Installing from Source
3+Installing pandoc from Source
4−======================
4+=============================
5−
6−This method will work on all architectures, but requires that you first
7−install the GHC compiler and some build tools: [GNU `make`], `sed`,
8−`bash`, and `perl`. These are standard on unix systems (including MacOS
9−X). If you're using Windows, you can install [Cygwin].
10
5
11−[Cygwin]: http://www.cygwin.com/
6+This method will work on all architectures for which the GHC compiler
12−[GNU `make`]: http://www.gnu.org/software/make/
7+is available.
13
8
14Installing GHC
9Installing GHC
15--------------
10--------------
16
11
17−To compile Pandoc, you'll need [GHC] version 6.6 or greater and [Cabal]
12+To compile Pandoc, you'll need [GHC] version 6.8 or greater. If you
18−version 1.2 or greater. If you don't have GHC already, you can get it
13+don't have GHC already, you can get it from the [GHC Download] page.
19−from the [GHC Download] page. If you're compiling GHC from source, be
14+If you're compiling GHC from source, be sure to get the `extralibs`
20−sure to get the `extralibs` in addition to the base tarball. GHC comes
15+in addition to the base tarball. Pandoc requires Cabal version 1.2 or
21−with a version of Cabal. Note, however, that the version of Cabal that
16+greater. If your GHC comes with an older version of Cabal, you'll need
22−comes with GHC 6.6 is not recent enough. So if you are using GHC 6.6,
23−you'll probably need to [install Cabal] separately. You can check your
17+to to [install Cabal] separately. You can check your Cabal version using
24−Cabal version using `ghc-pkg list`.
18+`ghc-pkg list`.
25
19
26−If you're running MacOS X, it may be more convenient to install GHC
20+If you're running MacOS X, you can also install GHC using [MacPorts] or [Fink].
27−using [MacPorts] or [Fink].
28
21
29If you're on a [debian]-based linux system (such as [Ubuntu]), you can get
22If you're on a [debian]-based linux system (such as [Ubuntu]), you can get
30GHC and the required libraries using `apt-get`:
23GHC and the required libraries using `apt-get`:
31
24
32− sudo apt-get install ghc6 libghc6-xhtml-dev libghc6-mtl-dev libghc6-network-dev libghc6-utf8-string-dev
25+ sudo apt-get install ghc6 libghc6-xhtml-dev libghc6-mtl-dev libghc6-network-dev
33
26
34−Otherwise, you should already have all the libraries you need except for
27+Pandoc will use the [utf8-string] library if it is installed; otherwise, it
35−`utf8-string`. Download the [utf8-string] tarball from HackageDB, extract it, and
28+will use its own internal module for UTF-8 I/O. The utf8-string library is
36−switch to that directory. Then:
29+not a required dependency, but it may improve performance slightly.
37−
38− runghc Setup.lhs configure
39− runghc Setup.lhs build
40− sudo runghc Setup.lhs install
41
30
42[GHC]: http://www.haskell.org/ghc/
31[GHC]: http://www.haskell.org/ghc/
43[GHC Download]: http://www.haskell.org/ghc/download.html
32[GHC Download]: http://www.haskell.org/ghc/download.html
@@ -52,15 +41,23 @@ switch to that directory. Then:
52Getting the source
41Getting the source
53------------------
42------------------
54
43
55−Download the source tarball from pandoc's [pandoc's google code site].
44+Download the source tarball from [pandoc's google code site].
56Extract the contents into a subdirectory:
45Extract the contents into a subdirectory:
57
46
58− tar xvzf pandoc-0.xy.tar.gz
47+ tar xvzf pandoc-x.y.tar.gz
59
48
60[pandoc's google code site]: http://pandoc.googlecode.com
49[pandoc's google code site]: http://pandoc.googlecode.com
61
50
51+Now choose one of the following methods for compiling and installing
52+pandoc. If you are on a linux or unix-based system, you can [install
53+pandoc using Make]. If not, you should [install pandoc using Cabal].
54+
55+[install pandoc using Make]: #installing-pandoc-using-make
56+[install pandoc using Cabal]: #installing-pandoc-using-cabal
57+[build options]: #build-options
58+
62−Installing Pandoc
59+Installing Pandoc using Make
63−-----------------
60+----------------------------
64
61
651. Change to the directory containing the Pandoc distribution.
621. Change to the directory containing the Pandoc distribution.
66
63
@@ -109,20 +106,26 @@ Installing Pandoc
109
106
110 Note that building the library documentation requires [haddock].
107 Note that building the library documentation requires [haddock].
111
108
109+6. If you decide you don't want pandoc on your system, each of the
110+ installation steps described above can be reversed:
111+
112+ sudo make uninstall
113+
114+ PREFIX=~ make uninstall-exec
115+
116+ sudo make uninstall-all
117+
112[haddock]: http://www.haskell.org/haddock/
118[haddock]: http://www.haskell.org/haddock/
113
119
114Installing pandoc using Cabal
120Installing pandoc using Cabal
115-----------------------------
121-----------------------------
116
122
117−Pandoc can also be installed using the standard Haskell packaging tool,
123+Change to the directory containing the pandoc source, and type:
118−[Cabal](http://www.haskell.org/cabal/). You'll need GHC 6.6 or greater
119−and Cabal 1.2 or greater (see [Installing GHC](#installing-ghc), above).
120−Just download the source tarball, unpack, and type:
121
124
122 runhaskell Setup.hs configure
125 runhaskell Setup.hs configure
123 runhaskell Setup.hs build
126 runhaskell Setup.hs build
124 runhaskell Setup.hs haddock # optional, to build library documentation
127 runhaskell Setup.hs haddock # optional, to build library documentation
125− runhaskell Setup.hs install # this one as root
128+ runhaskell Setup.hs install # this one as root or sudo
126
129
127This will install the pandoc executable and the Haskell libraries,
130This will install the pandoc executable and the Haskell libraries,
128but not the shell scripts, man pages, or other documentation.
131but not the shell scripts, man pages, or other documentation.
@@ -134,19 +137,17 @@ flag):
134 runhaskell Setup.hs configure -f-library # just the executable
137 runhaskell Setup.hs configure -f-library # just the executable
135 runhaskell Setup.hs configure -f-executable # just the libraries
138 runhaskell Setup.hs configure -f-executable # just the libraries
136
139
137−Note: If you are using GHC 6.6.*, you will need to start by
140+You can also specify the directory tree into which pandoc will be
138−replacing `pandoc.cabal` with a version suitable for GHC 6.6:
141+installed using the `--prefix=` option to `configure`. For more details,
142+see the [Cabal User's Guide].
139
143
140− cp pandoc.cabal pandoc.cabal.orig
144+[Cabal User's Guide]: http://www.haskell.org/cabal/release/latest/doc/users-guide/builders.html#setup-configure-paths
141− cp pandoc.cabal.ghc66 pandoc.cabal
142
145
143Optional syntax highlighting support
146Optional syntax highlighting support
144------------------------------------
147------------------------------------
145
148
146Pandoc can optionally be compiled with support for syntax highlighting of
149Pandoc can optionally be compiled with support for syntax highlighting of
147delimited code blocks. This feature requires the [`highlighting-kate` library].
150delimited code blocks. This feature requires the [`highlighting-kate` library].
148−It also requires Cabal version 1.2 or greater.
149−
150If you are using Cabal to compile pandoc, specify the `highlighting` flag in
151If you are using Cabal to compile pandoc, specify the `highlighting` flag in
151the configure step:
152the configure step:
152
153
@@ -161,17 +162,6 @@ If you have already built pandoc, you may need to do a `make clean` or
161
162
162[`highlighting-kate` library]: http://johnmacfarlane.net/highlighting-kate
163[`highlighting-kate` library]: http://johnmacfarlane.net/highlighting-kate
163
164
164−Removing Pandoc
165−---------------
166−
167−Each of the installation steps described above can be reversed:
168−
169− sudo make uninstall
170−
171− PREFIX=~ make uninstall-exec
172−
173− sudo make uninstall-all
174−
175Other targets
165Other targets
176-------------
166-------------
177
167
@@ -180,11 +170,7 @@ but are documented here for packagers and developers:
180
170
181### Building and installing
171### Building and installing
182
172
183−* `configure`: Performs the needed preprocessing to create a proper
173+* `configure`:
184− Cabal package for Pandoc:
185− - Builds `ASCIIMathML.hs`, `DefaultHeaders.hs`, and `S5.hs`
186− from templates in `src/templates` and data in `src/ASCIIMathML.js`,
187− `src/ui`, and `src/headers`.
188 - Stores values of relevant environment variables in `vars` for
174 - Stores values of relevant environment variables in `vars` for
189 persistence.
175 persistence.
190 - Runs Cabal's "configure" command.
176 - Runs Cabal's "configure" command.
@@ -204,7 +190,7 @@ but are documented here for packagers and developers:
204
190
205* `test`: Runs Pandoc's test suite. (All tests should pass.)
191* `test`: Runs Pandoc's test suite. (All tests should pass.)
206* `test-markdown`: Runs the Markdown regression test suite, using
192* `test-markdown`: Runs the Markdown regression test suite, using
207− `pandoc --strict`. (Three of the tests will fail.)
193+ `pandoc --strict`. (One test will fail.)
208
194
209### Cleaning
195### Cleaning
210
196
@@ -245,14 +231,12 @@ Extract the files from the archive, and put `pandoc.exe` somewhere
245in your PATH.
231in your PATH.
246
232
247Note that the Windows binary distribution does not include the shell
233Note that the Windows binary distribution does not include the shell
248−scripts `markdown2pdf`, `html2markdown`, or `hsmarkdown`. If you need
234+scripts `markdown2pdf`, `html2markdown`, or `hsmarkdown`.
249−these, compile from source.
250
235
251Installing pandoc on Debian
236Installing pandoc on Debian
252===========================
237===========================
253
238
254−Pandoc is now in the debian unstable archive, and can be installed
239+Pandoc is now in the debian archives, and can be installed using `apt-get` (as root):
255−using `apt-get` (as root):
256
240
257 apt-get install pandoc # the program, shell scripts, and docs
241 apt-get install pandoc # the program, shell scripts, and docs
258 apt-get install libghc6-pandoc-dev # the libraries
242 apt-get install libghc6-pandoc-dev # the libraries
Main.hs+6−6
@@ -41,11 +41,11 @@ import System.Console.GetOpt
41import Data.Maybe ( fromMaybe )
41import Data.Maybe ( fromMaybe )
42import Data.Char ( toLower )
42import Data.Char ( toLower )
43import Prelude hiding ( putStrLn, writeFile, readFile, getContents )
43import Prelude hiding ( putStrLn, writeFile, readFile, getContents )
44−#ifdef _UTF8
45−import System.IO.UTF8
46import System.IO ( stdout, stderr )
44import System.IO ( stdout, stderr )
45+#ifdef _UTF8STRING
46+import System.IO.UTF8
47#else
47#else
48−import System.IO
48+import Text.Pandoc.UTF8
49#endif
49#endif
50#ifdef _CITEPROC
50#ifdef _CITEPROC
51import Text.CSL
51import Text.CSL
@@ -60,10 +60,10 @@ copyrightMessage = "\nCopyright (C) 2006-7 John MacFarlane\n" ++
60
60
61compileInfo :: String
61compileInfo :: String
62compileInfo =
62compileInfo =
63−#ifdef _UTF8
63+#ifdef _UTF8STRING
64− " +utf8" ++
64+ " +utf8-string" ++
65#else
65#else
66− " -utf8" ++
66+ " -utf8-string" ++
67#endif
67#endif
68#ifdef _CITEPROC
68#ifdef _CITEPROC
69 " +citeproc" ++
69 " +citeproc" ++
Makefile−7
@@ -120,13 +120,6 @@ cleanup_files+=$(WRAPPERS)
120$(WRAPPERS): %: $(SRCDIR)/wrappers/%.in $(SRCDIR)/wrappers/*.sh
120$(WRAPPERS): %: $(SRCDIR)/wrappers/%.in $(SRCDIR)/wrappers/*.sh
121 @$(generate-shell-script)
121 @$(generate-shell-script)
122
122
123−CABAL_BACKUP=$(CABAL).orig
124−$(CABAL_BACKUP):
125− cp $(CABAL) $(CABAL_BACKUP) ; \
126− if echo $(GHC_VERSION) | grep -q '^6.6'; then \
127− cp $(CABAL).ghc66 $(CABAL); \
128− fi
129−
130.PHONY: configure
123.PHONY: configure
131cleanup_files+=Setup.hi Setup.o $(BUILDCMD) $(BUILDVARS)
124cleanup_files+=Setup.hi Setup.o $(BUILDCMD) $(BUILDVARS)
132ifdef GHC_PKG
125ifdef GHC_PKG
Text/Pandoc/ODT.hs+3−3
@@ -43,11 +43,11 @@ import Network.URI ( isURI )
43import qualified Data.ByteString as B ( writeFile, pack )
43import qualified Data.ByteString as B ( writeFile, pack )
44import Data.ByteString.Internal ( c2w )
44import Data.ByteString.Internal ( c2w )
45import Prelude hiding ( writeFile, readFile )
45import Prelude hiding ( writeFile, readFile )
46−#ifdef _UTF8
47−import System.IO.UTF8
48import System.IO ( stderr )
46import System.IO ( stderr )
47+#ifdef _UTF8STRING
48+import System.IO.UTF8
49#else
49#else
50−import System.IO
50+import Text.Pandoc.UTF8
51#endif
51#endif
52
52
53-- | Produce an ODT file from OpenDocument XML.
53-- | Produce an ODT file from OpenDocument XML.
Text/Pandoc/Shared.hs+3−3
@@ -116,11 +116,11 @@ import Network.URI ( parseURI, URI (..), isAllowedInURI )
116import System.FilePath ( (</>), (<.>) )
116import System.FilePath ( (</>), (<.>) )
117import System.IO.Error ( catch, ioError, isAlreadyExistsError )
117import System.IO.Error ( catch, ioError, isAlreadyExistsError )
118import System.Directory
118import System.Directory
119−import Prelude hiding ( putStrLn )
119+import Prelude hiding ( putStrLn, writeFile, readFile, getContents )
120−#ifdef _UTF8
120+#ifdef _UTF8STRING
121import System.IO.UTF8
121import System.IO.UTF8
122#else
122#else
123−import System.IO
123+import Text.Pandoc.UTF8
124#endif
124#endif
125
125
126--
126--
Text/Pandoc/TH.hs+2−2
@@ -39,10 +39,10 @@ import Language.Haskell.TH.Syntax (Lift (..))
39import qualified Data.ByteString as B
39import qualified Data.ByteString as B
40import Data.ByteString.Internal ( w2c )
40import Data.ByteString.Internal ( w2c )
41import Prelude hiding ( readFile )
41import Prelude hiding ( readFile )
42−#ifdef _UTF8
42+#ifdef _UTF8STRING
43import System.IO.UTF8
43import System.IO.UTF8
44#else
44#else
45−import System.IO
45+import Text.Pandoc.UTF8
46#endif
46#endif
47
47
48-- | Insert contents of text file into a template.
48-- | Insert contents of text file into a template.
Text/Pandoc/UTF8.hsnew file+76
@@ -0,0 +1,76 @@
1+-- | Functions for IO using UTF-8 encoding.
2+--
3+-- The basic encoding and decoding functions are taken from
4+-- <http://www.cse.ogi.edu/~hallgren/Talks/LHiH/base/lib/UTF8.hs>.
5+-- (c) 2003, OGI School of Science & Engineering, Oregon Health and
6+-- Science University.
7+--
8+-- From the Char module supplied with HBC.
9+-- Modified by Martin Norbaeck to pass illegal UTF-8 sequences unchanged.
10+-- Modified by John MacFarlane to use [Word8] and export IO functions.
11+
12+module Text.Pandoc.UTF8 (
13+ putStrLn
14+ , putStr
15+ , hPutStrLn
16+ , hPutStr
17+ , getContents
18+ , readFile
19+ , writeFile
20+ ) where
21+import Data.Word
22+import System.IO ( Handle )
23+import qualified Data.ByteString.Lazy as BS
24+import Prelude hiding ( putStrLn, putStr, getContents, readFile, writeFile )
25+
26+putStrLn :: String -> IO ()
27+putStrLn = BS.putStrLn . BS.pack . toUTF8
28+
29+putStr :: String -> IO ()
30+putStr = BS.putStr . BS.pack . toUTF8
31+
32+hPutStrLn :: Handle -> String -> IO ()
33+hPutStrLn h = BS.hPut h . BS.pack . toUTF8 . (++ "\n")
34+
35+hPutStr :: Handle -> String -> IO ()
36+hPutStr h = BS.hPut h . BS.pack . toUTF8
37+
38+readFile :: FilePath -> IO String
39+readFile p = BS.readFile p >>= return . fromUTF8 . BS.unpack
40+
41+writeFile :: FilePath -> String -> IO ()
42+writeFile p = BS.writeFile p . BS.pack . toUTF8
43+
44+getContents :: IO String
45+getContents = BS.getContents >>= return . fromUTF8 . BS.unpack
46+
47+-- | Take a list of bytes in UTF-8 encoding and decode it into a Unicode string.
48+fromUTF8 :: [Word8] -> String
49+fromUTF8 [] = ""
50+fromUTF8 (0xef : 0xbb : 0xbf :cs) = fromUTF8 cs -- skip BOM (byte order marker)
51+fromUTF8 (c:c':cs) | 0xc0 <= c && c <= 0xdf &&
52+ 0x80 <= c' && c' <= 0xbf =
53+ toEnum ((fromEnum c `mod` 0x20) * 0x40 + fromEnum c' `mod` 0x40) : fromUTF8 cs
54+fromUTF8 (c:c':c'':cs) | 0xe0 <= c && c <= 0xef &&
55+ 0x80 <= c' && c' <= 0xbf &&
56+ 0x80 <= c'' && c'' <= 0xbf =
57+ toEnum ((fromEnum c `mod` 0x10 * 0x1000) + (fromEnum c' `mod` 0x40) * 0x40 + fromEnum c'' `mod` 0x40) : fromUTF8 cs
58+fromUTF8 (c:cs) = toEnum (fromEnum c) : fromUTF8 cs
59+
60+-- | Take a Unicode string and encode it as a list of bytes in UTF-8 encoding.
61+toUTF8 :: String -> [Word8]
62+toUTF8 "" = []
63+toUTF8 (c:cs) =
64+ if c > '\x0000' && c < '\x0080' then
65+ toEnum (fromEnum c) : toUTF8 cs
66+ else if c < toEnum 0x0800 then
67+ let i = fromEnum c
68+ in toEnum (0xc0 + i `div` 0x40) :
69+ toEnum (0x80 + i `mod` 0x40) :
70+ toUTF8 cs
71+ else
72+ let i = fromEnum c
73+ in toEnum (0xe0 + i `div` 0x1000) :
74+ toEnum (0x80 + (i `mod` 0x1000) `div` 0x40) :
75+ toEnum (0x80 + i `mod` 0x40) :
76+ toUTF8 cs
debian/control+2−2
@@ -2,7 +2,7 @@ Source: pandoc
2Section: text
2Section: text
3Priority: optional
3Priority: optional
4Maintainer: Recai Oktaş <roktas@debian.org>
4Maintainer: Recai Oktaş <roktas@debian.org>
5−Build-Depends: debhelper (>= 4.0.0), haskell-devscripts (>=0.5.12), ghc6 (>= 6.8.2-1), libghc6-xhtml-dev, libghc6-mtl-dev, libghc6-network-dev, libghc6-utf8-string-dev
5+Build-Depends: debhelper (>= 4.0.0), haskell-devscripts (>=0.5.12), ghc6 (>= 6.8.2-1), libghc6-xhtml-dev, libghc6-mtl-dev, libghc6-network-dev
6Build-Depends-Indep: haddock
6Build-Depends-Indep: haddock
7Standards-Version: 3.7.3
7Standards-Version: 3.7.3
8Homepage: http://johnmacfarlane.net/pandoc/
8Homepage: http://johnmacfarlane.net/pandoc/
@@ -38,7 +38,7 @@ Description: general markup converter
38Package: libghc6-pandoc-dev
38Package: libghc6-pandoc-dev
39Section: libdevel
39Section: libdevel
40Architecture: any
40Architecture: any
41−Depends: ${haskell:Depends}, libghc6-xhtml-dev, libghc6-mtl-dev, libghc6-network-dev, libghc6-utf8-string-dev
41+Depends: ${haskell:Depends}, libghc6-xhtml-dev, libghc6-mtl-dev, libghc6-network-dev
42Suggests: pandoc-doc
42Suggests: pandoc-doc
43Description: general markup converter
43Description: general markup converter
44 Pandoc is a Haskell library for converting from one markup format to
44 Pandoc is a Haskell library for converting from one markup format to
debian/copyright+41
@@ -37,6 +37,12 @@ Copyright (C) 2008 John MacFarlane and Peter Wang
37
37
38Released under the GPL.
38Released under the GPL.
39
39
40+----------------------------------------------------------------------
41+Text/Pandoc/Writers/OpenDocument.hs
42+Copyright (C) 2008 Andrea Rossato
43+
44+Released under the GPL.
45+
40----------------------------------------------------------------------
46----------------------------------------------------------------------
41ASCIIMathML.js
47ASCIIMathML.js
42Copyright 2005, Peter Jipsen, Chapman University
48Copyright 2005, Peter Jipsen, Chapman University
@@ -51,6 +57,41 @@ by Eric A. Meyer
51
57
52Released under an explicit Public Domain License
58Released under an explicit Public Domain License
53
59
60+----------------------------------------------------------------------
61+UTF8.hs
62+Copyright (c) 2003, OGI School of Science & Engineering, Oregon Health &
63+Science University, All rights reserved.
64+Modified by Martin Norbäck, to pass illegal utf-8 sequences through unchanged.
65+Modified 2006-8 John MacFarlane.
66+
67+Redistribution and use in source and binary forms, with or without
68+modification, are permitted provided that the following conditions
69+are met:
70+
71+- Redistributions of source code must retain the above copyright
72+ notice, this list of conditions and the following disclaimer.
73+
74+- Redistributions in binary form must reproduce the above
75+ copyright notice, this list of conditions and the following
76+ disclaimer in the documentation and/or other materials provided
77+ with the distribution.
78+
79+- Neither the name of OGI or OHSU nor the names of its
80+ contributors may be used to endorse or promote products derived
81+ from this software without specific prior written permission.
82+
83+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
84+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
85+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
86+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
87+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
88+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
89+TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
90+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
91+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
92+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
93+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
94+
54----------------------------------------------------------------------
95----------------------------------------------------------------------
55Text/XML/Light/*
96Text/XML/Light/*
56(c) 2007 Galois Inc.
97(c) 2007 Galois Inc.
pandoc.cabal+11−6
@@ -64,8 +64,8 @@ Flag executable
64Flag library
64Flag library
65 Description: Build the pandoc library.
65 Description: Build the pandoc library.
66 Default: True
66 Default: True
67−Flag utf8
67+Flag utf8-string
68− Description: Compile in support for UTF-8 input and output.
68+ Description: Use utf8-string library for UTF-8 I/O.
69 Default: True
69 Default: True
70Flag citeproc
70Flag citeproc
71 Description: Compile in support for citeproc-hs bibliographic formatting.
71 Description: Compile in support for citeproc-hs bibliographic formatting.
@@ -79,9 +79,11 @@ Library
79 if flag(highlighting)
79 if flag(highlighting)
80 Build-depends: highlighting-kate
80 Build-depends: highlighting-kate
81 cpp-options: -D_HIGHLIGHTING
81 cpp-options: -D_HIGHLIGHTING
82− if flag(utf8)
82+ if flag(utf8-string)
83 Build-depends: utf8-string
83 Build-depends: utf8-string
84− cpp-options: -D_UTF8
84+ cpp-options: -D_UTF8STRING
85+ else
86+ Other-Modules: Text.Pandoc.UTF8
85 if flag(citeproc)
87 if flag(citeproc)
86 Build-depends: citeproc-hs
88 Build-depends: citeproc-hs
87 cpp-options: -D_CITEPROC
89 cpp-options: -D_CITEPROC
@@ -141,8 +143,11 @@ Executable pandoc
141
143
142 if flag(highlighting)
144 if flag(highlighting)
143 cpp-options: -D_HIGHLIGHTING
145 cpp-options: -D_HIGHLIGHTING
144− if flag(utf8)
146+ if flag(utf8-string)
147+ Build-depends: utf8-string
145− cpp-options: -D_UTF8
148+ cpp-options: -D_UTF8STRING
149+ else
150+ Other-Modules: Text.Pandoc.UTF8
146 if flag(citeproc)
151 if flag(citeproc)
147 Build-depends: citeproc-hs
152 Build-depends: citeproc-hs
148 cpp-options: -D_CITEPROC
153 cpp-options: -D_CITEPROC
pandoc.cabal.ghc66deleted−64
@@ -1,64 +0,0 @@
1−Name: pandoc
2−Version: 0.47
3−License: GPL
4−License-File: COPYING
5−Copyright: (c) 2006-2007 John MacFarlane
6−Author: John MacFarlane <jgm@berkeley.edu>
7−Maintainer: John MacFarlane <jgm@berkeley.edu>
8−Stability: alpha
9−Homepage: http://johnmacfarlane.net/pandoc
10−Package-URL: http://pandoc.googlecode.com/files/pandoc-0.47.tar.gz
11−Category: Text
12−Tested-With: GHC
13−Synopsis: Conversion between markup formats
14−Description: Pandoc is a Haskell library for converting from one markup
15− format to another, and a command-line tool that uses
16− this library. It can read markdown and (subsets of)
17− reStructuredText, HTML, and LaTeX, and it can write
18− markdown, reStructuredText, HTML, LaTeX, ConTeXt, Docbook,
19− RTF, groff man pages, and S5 HTML slide shows.
20− .
21− Pandoc extends standard markdown syntax with footnotes,
22− embedded LaTeX, definition lists, tables, and other
23− features. A compatibility mode is provided for those
24− who need a drop-in replacement for Markdown.pl.
25− .
26− In contrast to existing tools for converting markdown
27− to HTML, which use regex substitutions, pandoc has
28− a modular design: it consists of a set of readers,
29− which parse text in a given format and produce a native
30− representation of the document, and a set of writers,
31− which convert this native representation into a target
32− format. Thus, adding an input or output format requires
33− only adding a reader or writer.
34−Build-Depends: base, parsec, xhtml, mtl, regex-compat, network
35−Hs-Source-Dirs: .
36−Exposed-Modules: Text.Pandoc,
37− Text.Pandoc.Blocks,
38− Text.Pandoc.Definition,
39− Text.Pandoc.CharacterReferences,
40− Text.Pandoc.Shared,
41− Text.Pandoc.UTF8,
42− Text.Pandoc.ASCIIMathML,
43− Text.Pandoc.DefaultHeaders,
44− Text.Pandoc.Highlighting,
45− Text.Pandoc.Readers.HTML,
46− Text.Pandoc.Readers.LaTeX,
47− Text.Pandoc.Readers.Markdown,
48− Text.Pandoc.Readers.RST,
49− Text.Pandoc.Readers.TeXMath,
50− Text.Pandoc.Writers.Docbook,
51− Text.Pandoc.Writers.HTML,
52− Text.Pandoc.Writers.LaTeX,
53− Text.Pandoc.Writers.ConTeXt,
54− Text.Pandoc.Writers.Man,
55− Text.Pandoc.Writers.Markdown,
56− Text.Pandoc.Writers.RST,
57− Text.Pandoc.Writers.RTF,
58− Text.Pandoc.Writers.S5
59−Ghc-Options: -O0
60−
61−Executable: pandoc
62−Hs-Source-Dirs: .
63−Main-Is: Main.hs
64−Ghc-Options: -O0