@@ -94,6 +94,10 @@ inHeaderTags :: Int -> Doc -> Doc
94inHeaderTags i = inTags False "text:h" [ ("text:style-name", "Heading_20_" ++ show i)
94inHeaderTags i = inTags False "text:h" [ ("text:style-name", "Heading_20_" ++ show i)
95 , ("text:outline-level", show i)]
95 , ("text:outline-level", show i)]
97+inQuotes :: QuoteType -> Doc -> Doc
98+inQuotes SingleQuote s = text "‘" <> s <> text "’"
99+inQuotes DoubleQuote s = text "“" <> s <> text "”"
97-- | Convert list of authors to a docbook <author> section
101-- | Convert list of authors to a docbook <author> section
98authorToOpenDocument :: [Char] -> Doc
102authorToOpenDocument :: [Char] -> Doc
99authorToOpenDocument name =
103authorToOpenDocument name =
@@ -297,7 +301,7 @@ inlineToOpenDocument o ils
297 | Ellipses <- ils = return $ text "…"
301 | Ellipses <- ils = return $ text "…"
298 | EmDash <- ils = return $ text "—"
302 | EmDash <- ils = return $ text "—"
299 | EnDash <- ils = return $ text "–"
303 | EnDash <- ils = return $ text "–"
300− | Apostrophe <- ils = return $ char '\''
304+ | Apostrophe <- ils = return $ text "’"
301 | Space <- ils = return $ char ' '
305 | Space <- ils = return $ char ' '
302 | LineBreak <- ils = return $ selfClosingTag "text:line-break" []
306 | LineBreak <- ils = return $ selfClosingTag "text:line-break" []
303 | Str s <- ils = return $ text $ escapeStringForXML s
307 | Str s <- ils = return $ text $ escapeStringForXML s
@@ -306,7 +310,7 @@ inlineToOpenDocument o ils
306 | Strikeout l <- ils = inSpanTags "Strikeout" <$> inlinesToOpenDocument o l
310 | Strikeout l <- ils = inSpanTags "Strikeout" <$> inlinesToOpenDocument o l
307 | Superscript l <- ils = inSpanTags "Superscript" <$> inlinesToOpenDocument o l
311 | Superscript l <- ils = inSpanTags "Superscript" <$> inlinesToOpenDocument o l
308 | Subscript l <- ils = inSpanTags "Subscript" <$> inlinesToOpenDocument o l
312 | Subscript l <- ils = inSpanTags "Subscript" <$> inlinesToOpenDocument o l
309− | Quoted _ l <- ils = inSpanTags "Citation" <$> inlinesToOpenDocument o l
313+ | Quoted t l <- ils = inQuotes t <$> inlinesToOpenDocument o l
310 | Code s <- ils = preformatted s
314 | Code s <- ils = preformatted s
311 | Math s <- ils = inlinesToOpenDocument o (readTeXMath s)
315 | Math s <- ils = inlinesToOpenDocument o (readTeXMath s)
312 | TeX s <- ils = preformatted s
316 | TeX s <- ils = preformatted s