summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/LaTeX.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2013-07-25 10:00:11 -0700
committerJohn MacFarlane <fiddlosopher@gmail.com>2013-07-25 10:00:11 -0700
commitfb9f2e4bd5f71c7b515566921c5c5a7bff73c52c (patch)
treee3d88f99201ace28cac5fe7a43bd22afd2480c82 /src/Text/Pandoc/Readers/LaTeX.hs
parent85cc140744b01148da944a58948d9e4a87cb64c4 (diff)
LaTeX reader: Support `\v{}` for hacek.
Closes #926.
Diffstat (limited to 'src/Text/Pandoc/Readers/LaTeX.hs')
-rw-r--r--src/Text/Pandoc/Readers/LaTeX.hs37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs
index 7c7ae9fef..6b5035d93 100644
--- a/src/Text/Pandoc/Readers/LaTeX.hs
+++ b/src/Text/Pandoc/Readers/LaTeX.hs
@@ -415,6 +415,7 @@ inlineCommands = M.fromList $
, (".", option (str ".") $ try $ tok >>= accent dot)
, ("=", option (str "=") $ try $ tok >>= accent macron)
, ("c", option (str "c") $ try $ tok >>= accent cedilla)
+ , ("v", option (str "v") $ try $ tok >>= accent hacek)
, ("i", lit "i")
, ("\\", linebreak <$ (optional (bracketed inline) *> optional sp))
, (",", pure mempty)
@@ -671,6 +672,42 @@ cedilla 's' = 'ş'
cedilla 'S' = 'Ş'
cedilla c = c
+hacek :: Char -> Char
+hacek 'A' = 'Ǎ'
+hacek 'a' = 'ǎ'
+hacek 'C' = 'Č'
+hacek 'c' = 'č'
+hacek 'D' = 'Ď'
+hacek 'd' = 'ď'
+hacek 'E' = 'Ě'
+hacek 'e' = 'ě'
+hacek 'G' = 'Ǧ'
+hacek 'g' = 'ǧ'
+hacek 'H' = 'Ȟ'
+hacek 'h' = 'ȟ'
+hacek 'I' = 'Ǐ'
+hacek 'i' = 'ǐ'
+hacek 'j' = 'ǰ'
+hacek 'K' = 'Ǩ'
+hacek 'k' = 'ǩ'
+hacek 'L' = 'Ľ'
+hacek 'l' = 'ľ'
+hacek 'N' = 'Ň'
+hacek 'n' = 'ň'
+hacek 'O' = 'Ǒ'
+hacek 'o' = 'ǒ'
+hacek 'R' = 'Ř'
+hacek 'r' = 'ř'
+hacek 'S' = 'Š'
+hacek 's' = 'š'
+hacek 'T' = 'Ť'
+hacek 't' = 'ť'
+hacek 'U' = 'Ǔ'
+hacek 'u' = 'ǔ'
+hacek 'Z' = 'Ž'
+hacek 'z' = 'ž'
+hacek c = c
+
tok :: LP Inlines
tok = try $ grouped inline <|> inlineCommand <|> str <$> (count 1 $ inlineChar)