2008-08-01 23:29:55 +00:00
|
|
|
{-# LANGUAGE CPP, TemplateHaskell #-}
|
2007-11-03 23:27:58 +00:00
|
|
|
{-
|
|
|
|
Copyright (C) 2006-7 John MacFarlane <jgm@berkeley.edu>
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
-}
|
|
|
|
|
|
|
|
{- |
|
2008-02-09 03:20:55 +00:00
|
|
|
Module : Text.Pandoc.DefaultHeaders
|
2007-11-03 23:27:58 +00:00
|
|
|
Copyright : Copyright (C) 2006-7 John MacFarlane
|
|
|
|
License : GNU GPL, version 2 or above
|
|
|
|
|
|
|
|
Maintainer : John MacFarlane <jgm@berkeley.edu>
|
|
|
|
Stability : alpha
|
|
|
|
Portability : portable
|
|
|
|
|
|
|
|
Default headers for Pandoc writers.
|
|
|
|
-}
|
2008-02-09 03:20:55 +00:00
|
|
|
module Text.Pandoc.DefaultHeaders (
|
|
|
|
defaultLaTeXHeader,
|
|
|
|
defaultConTeXtHeader,
|
|
|
|
defaultDocbookHeader,
|
2008-03-19 18:45:51 +00:00
|
|
|
defaultOpenDocumentHeader,
|
2008-02-09 03:20:55 +00:00
|
|
|
defaultS5Header,
|
|
|
|
defaultRTFHeader
|
|
|
|
) where
|
2007-11-03 23:27:58 +00:00
|
|
|
import Text.Pandoc.Writers.S5
|
2008-08-01 06:35:42 +00:00
|
|
|
import System.FilePath ( (</>) )
|
2008-08-02 17:22:55 +00:00
|
|
|
import Text.Pandoc.TH ( contentsOf )
|
2007-11-03 23:27:58 +00:00
|
|
|
|
|
|
|
defaultLaTeXHeader :: String
|
2008-08-01 23:29:55 +00:00
|
|
|
#ifndef __HADDOCK__
|
2008-08-01 06:35:42 +00:00
|
|
|
defaultLaTeXHeader = $(contentsOf $ "data" </> "headers" </> "LaTeX.header")
|
2008-08-01 23:29:55 +00:00
|
|
|
#endif
|
2007-11-03 23:27:58 +00:00
|
|
|
|
|
|
|
defaultConTeXtHeader :: String
|
2008-08-01 23:29:55 +00:00
|
|
|
#ifndef __HADDOCK__
|
2008-08-01 06:35:42 +00:00
|
|
|
defaultConTeXtHeader = $(contentsOf $ "data" </> "headers" </> "ConTeXt.header")
|
2008-08-01 23:29:55 +00:00
|
|
|
#endif
|
2007-11-03 23:27:58 +00:00
|
|
|
|
|
|
|
defaultDocbookHeader :: String
|
2008-08-01 23:29:55 +00:00
|
|
|
#ifndef __HADDOCK__
|
2008-08-01 06:35:42 +00:00
|
|
|
defaultDocbookHeader = $(contentsOf $ "data" </> "headers" </> "Docbook.header")
|
2008-08-01 23:29:55 +00:00
|
|
|
#endif
|
2007-11-03 23:27:58 +00:00
|
|
|
|
2008-03-19 18:45:51 +00:00
|
|
|
defaultOpenDocumentHeader :: String
|
2008-08-01 23:29:55 +00:00
|
|
|
#ifndef __HADDOCK__
|
2008-08-01 06:35:42 +00:00
|
|
|
defaultOpenDocumentHeader = $(contentsOf $ "data" </> "headers" </> "OpenDocument.header")
|
2008-08-01 23:29:55 +00:00
|
|
|
#endif
|
2008-03-19 18:45:51 +00:00
|
|
|
|
2007-11-03 23:27:58 +00:00
|
|
|
defaultS5Header :: String
|
|
|
|
defaultS5Header = s5Meta ++ s5CSS ++ s5Javascript
|
|
|
|
|
|
|
|
defaultRTFHeader :: String
|
2008-08-01 23:29:55 +00:00
|
|
|
#ifndef __HADDOCK__
|
2008-08-01 06:35:42 +00:00
|
|
|
defaultRTFHeader = $(contentsOf $ "data" </> "headers" </> "RTF.header")
|
2008-08-01 23:29:55 +00:00
|
|
|
#endif
|