aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2012-02-04 19:31:01 -0800
committerJohn MacFarlane <fiddlosopher@gmail.com>2012-02-04 19:31:01 -0800
commit80505bc49077b69c9413dc60b7e7b876a8ddd99b (patch)
tree26f682cd5f3b926fefa0b97a4e8830280f53f94e /src/Text
parent0ec953793d5fa62e3346790a97fe3aef2882ecf6 (diff)
downloadpandoc-80505bc49077b69c9413dc60b7e7b876a8ddd99b.tar.gz
LaTeX reader: support \. dot accent.
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Readers/LaTeX.hs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs
index 6a3347c0f..ebfc7414c 100644
--- a/src/Text/Pandoc/Readers/LaTeX.hs
+++ b/src/Text/Pandoc/Readers/LaTeX.hs
@@ -342,6 +342,7 @@ inlineCommands = M.fromList
, ("^", option (str "^") $ try $ tok >>= accent hat)
, ("~", option (str "~") $ try $ tok >>= accent circ)
, ("\"", option (str "\"") $ try $ tok >>= accent umlaut)
+ , (".", option (str ".") $ try $ tok >>= accent dot)
, ("i", lit "i")
, ("\\", linebreak <$ optional (bracketed inline *> optional sp))
, (",", pure mempty)
@@ -500,6 +501,18 @@ umlaut 'o' = 'ö'
umlaut 'u' = 'ü'
umlaut c = c
+dot :: Char -> Char
+dot 'C' = 'Ċ'
+dot 'c' = 'ċ'
+dot 'E' = 'Ė'
+dot 'e' = 'ė'
+dot 'G' = 'Ġ'
+dot 'g' = 'ġ'
+dot 'I' = 'İ'
+dot 'Z' = 'Ż'
+dot 'z' = 'ż'
+dot c = c
+
tok :: LP Inlines
tok = try $ grouped inline <|> inlineCommand <|> str <$> (count 1 $ inlineChar)