summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-05-09 00:44:56 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-05-09 00:44:56 +0000
commit71cf0a11b37000df1bd9996fbdb65d98c1c30584 (patch)
treef9d1a2373e6ec21d881c6eac9d04b449a04a22b4 /src
parentc6323b2c78d076cb0f2032b1c0f8fe10dcfa34ed (diff)
+ Use new alignment parameter in title/author/date,
instead of hardcoded \qc. + Adjusted test suite to account for changes in RTF writer. git-svn-id: https://pandoc.googlecode.com/svn/trunk@594 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Writers/RTF.hs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/Text/Pandoc/Writers/RTF.hs b/src/Text/Pandoc/Writers/RTF.hs
index 865fe0fec..770afa79b 100644
--- a/src/Text/Pandoc/Writers/RTF.hs
+++ b/src/Text/Pandoc/Writers/RTF.hs
@@ -83,10 +83,10 @@ rtfParSpaced :: Int -- ^ space after (in twips)
-> String
rtfParSpaced spaceAfter indent firstLineIndent alignment content =
let alignString = case alignment of
- AlignLeft -> "\\ql"
- AlignRight -> "\\qr"
- AlignCenter -> "\\qc"
- AlignDefault -> "\\ql"
+ AlignLeft -> "\\ql "
+ AlignRight -> "\\qr "
+ AlignCenter -> "\\qc "
+ AlignDefault -> "\\ql "
in "{\\pard " ++ alignString ++
"\\f0 \\sa" ++ (show spaceAfter) ++ " \\li" ++ (show indent) ++
" \\fi" ++ (show firstLineIndent) ++ " " ++ content ++ "\\par}\n"
@@ -131,15 +131,15 @@ rtfHeader :: String -- ^ header text
rtfHeader headerText (Meta title authors date) =
let titletext = if null title
then ""
- else rtfPar 0 0 AlignDefault ("\\qc \\b \\fs36 " ++
- inlineListToRTF title)
+ else rtfPar 0 0 AlignCenter ("\\b \\fs36 " ++
+ inlineListToRTF title)
authorstext = if null authors
then ""
- else rtfPar 0 0 AlignDefault ("\\qc " ++ (joinWithSep "\\"
+ else rtfPar 0 0 AlignCenter (" " ++ (joinWithSep "\\"
(map stringToRTF authors)))
datetext = if date == ""
then ""
- else rtfPar 0 0 AlignDefault ("\\qc " ++ stringToRTF date) in
+ else rtfPar 0 0 AlignCenter (" " ++ stringToRTF date) in
let spacer = if null (titletext ++ authorstext ++ datetext)
then ""
else rtfPar 0 0 AlignDefault "" in