aboutsummaryrefslogtreecommitdiff
path: root/Text
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2008-07-31 23:55:27 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2008-07-31 23:55:27 +0000
commit8440385f45e18f43172c0cf4409cf4b8b538bbeb (patch)
tree3b839e838163800ace3bc031484d86c3e75c0e6b /Text
parent22846086c19b14a74c194ac06c1738f8bfd7fd46 (diff)
downloadpandoc-8440385f45e18f43172c0cf4409cf4b8b538bbeb.tar.gz
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
Diffstat (limited to 'Text')
-rw-r--r--Text/Pandoc/Writers/LaTeX.hs8
-rw-r--r--Text/Pandoc/Writers/RST.hs4
2 files changed, 6 insertions, 6 deletions
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 ()