diff options
-rw-r--r-- | Main.hs | 8 | ||||
-rw-r--r-- | Setup.hs | 4 | ||||
-rw-r--r-- | Text/Pandoc/Writers/LaTeX.hs | 8 | ||||
-rw-r--r-- | Text/Pandoc/Writers/RST.hs | 4 | ||||
-rw-r--r-- | pandoc.cabal | 1 |
5 files changed, 13 insertions, 12 deletions
@@ -45,10 +45,10 @@ import Data.Char ( toLower ) import Control.Monad ( (>>=) ) copyrightMessage :: String -copyrightMessage = "\nCopyright (C) 2006-7 John MacFarlane\n\ - \Web: http://johnmacfarlane.net/pandoc\n\ - \This is free software; see the source for copying conditions. There is no\n\ - \warranty, not even for merchantability or fitness for a particular purpose." +copyrightMessage = "\nCopyright (C) 2006-7 John MacFarlane\n" ++ + "Web: http://johnmacfarlane.net/pandoc\n" ++ + "This is free software; see the source for copying conditions. There is no\n" ++ + "warranty, not even for merchantability or fitness for a particular purpose." compileOptions :: String compileOptions = @@ -49,8 +49,8 @@ fillDefaultHeadersTemplate = do writeTemplate :: FilePath -> String -> IO () writeTemplate outfile contents = do putStrLn $ " " ++ outfile - let warning = "-- This file is generated from a template in the templates subdirectory.\n\ - \-- Modify that file, not this one.\n" + let warning = "-- This file is generated from a template in the templates subdirectory.\n" ++ + "-- Modify that file, not this one.\n" writeFile outfile (warning ++ contents) -- Read contents of fpath and insert in template replacing @fpath@. diff --git a/Text/Pandoc/Writers/LaTeX.hs b/Text/Pandoc/Writers/LaTeX.hs index 57c763bdc..b523dea9e 100644 --- a/Text/Pandoc/Writers/LaTeX.hs +++ b/Text/Pandoc/Writers/LaTeX.hs @@ -209,10 +209,10 @@ blockToLaTeX (Table caption aligns widths heads rows) = do headers $$ text "\\hline" $$ vcat rows' $$ text "\\end{tabular}" let centered txt = text "\\begin{center}" $$ txt $$ text "\\end{center}" - addToHeader "\\usepackage{array}\n\ - \% This is needed because raggedright in table elements redefines \\\\:\n\ - \\\newcommand{\\PreserveBackslash}[1]{\\let\\temp=\\\\#1\\let\\\\=\\temp}\n\ - \\\let\\PBS=\\PreserveBackslash" + addToHeader $ "\\usepackage{array}\n" ++ + "% This is needed because raggedright in table elements redefines \\\\:\n" ++ + "\\newcommand{\\PreserveBackslash}[1]{\\let\\temp=\\\\#1\\let\\\\=\\temp}\n" ++ + "\\let\\PBS=\\PreserveBackslash" return $ if isEmpty captionText then centered tableBody <> char '\n' else text "\\begin{table}[h]" $$ centered tableBody $$ diff --git a/Text/Pandoc/Writers/RST.hs b/Text/Pandoc/Writers/RST.hs index 4b9f3da10..93a592132 100644 --- a/Text/Pandoc/Writers/RST.hs +++ b/Text/Pandoc/Writers/RST.hs @@ -291,8 +291,8 @@ inlineToRST (Code str) = return $ text $ "``" ++ str ++ "``" inlineToRST (Str str) = return $ text $ escapeString str inlineToRST (Math str) = do includes <- get >>= (return . stIncludes) - let rawMathRole = ".. role:: math(raw)\n\ - \ :format: html latex\n" + let rawMathRole = ".. role:: math(raw)\n" ++ + " :format: html latex\n" if not (rawMathRole `elem` includes) then modify $ \st -> st { stIncludes = rawMathRole : includes } else return () diff --git a/pandoc.cabal b/pandoc.cabal index 8c78d9eb4..96fcfda53 100644 --- a/pandoc.cabal +++ b/pandoc.cabal @@ -111,6 +111,7 @@ Library Other-Modules: Text.Pandoc.XML Ghc-Options: -O2 -Wall -threaded Ghc-Prof-Options: -auto-all + Extensions: CPP if flag(library) Buildable: True |