aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2016-11-01 10:17:15 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2016-11-01 10:17:15 +0100
commiteb5cb0f30401b02e9ad78a8523299e33e8859fee (patch)
tree9752b08e9a4101eee517d89d0cb598bb54384ecc /src/Text/Pandoc
parent01a21dd43fe170ba215b83179f6e10d51e77f3f5 (diff)
downloadpandoc-eb5cb0f30401b02e9ad78a8523299e33e8859fee.tar.gz
Handle hungarumlaut in LaTeX reader. Closes #3201.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Readers/LaTeX.hs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs
index d35bf5182..6fa4fb8b8 100644
--- a/src/Text/Pandoc/Readers/LaTeX.hs
+++ b/src/Text/Pandoc/Readers/LaTeX.hs
@@ -523,6 +523,7 @@ inlineCommands = M.fromList $
, ("copyright", lit "©")
, ("textasciicircum", lit "^")
, ("textasciitilde", lit "~")
+ , ("H", try $ tok >>= accent hungarumlaut)
, ("`", option (str "`") $ try $ tok >>= accent grave)
, ("'", option (str "'") $ try $ tok >>= accent acute)
, ("^", option (str "^") $ try $ tok >>= accent circ)
@@ -762,6 +763,21 @@ umlaut 'o' = "ö"
umlaut 'u' = "ü"
umlaut c = [c]
+hungarumlaut :: Char -> String
+hungarumlaut 'A' = "A̋"
+hungarumlaut 'E' = "E̋"
+hungarumlaut 'I' = "I̋"
+hungarumlaut 'O' = "Ő"
+hungarumlaut 'U' = "Ű"
+hungarumlaut 'Y' = "ӳ"
+hungarumlaut 'a' = "a̋"
+hungarumlaut 'e' = "e̋"
+hungarumlaut 'i' = "i̋"
+hungarumlaut 'o' = "ő"
+hungarumlaut 'u' = "ű"
+hungarumlaut 'y' = "ӳ"
+hungarumlaut c = [c]
+
dot :: Char -> String
dot 'C' = "Ċ"
dot 'c' = "ċ"