From 8440385f45e18f43172c0cf4409cf4b8b538bbeb Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Thu, 31 Jul 2008 23:55:27 +0000 Subject: Compatibility fixes for CPP, Cabal, and haddock: + Use CPP in "Extensions" field in pandoc.cabal. + Removed use of backslash string continuations in source files. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1350 788f1e2b-df1e-0410-8736-df70ead52e1b --- Text/Pandoc/Writers/LaTeX.hs | 8 ++++---- Text/Pandoc/Writers/RST.hs | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'Text/Pandoc') 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 () -- cgit v1.2.3