summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2010-10-19 15:03:30 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2010-10-19 15:03:30 -0700
commit4d08bc38a9cad87302bff0ca2fd90750f24edc21 (patch)
treea007e012e0cddbc180ee63d84ab60f63d773db33
parent11672c49873694ac5bce02ed836ce1d5bfa5b47f (diff)
TeXMath: handle variables modified with \acute, \bar, etc.
Complete list: \acute, \grave, \breve, \check, \dot, \mathring, \vec, \overrightarrow, \overleftarrow, \hat, \tilde, \bar.
-rw-r--r--src/Text/Pandoc/Readers/TeXMath.hs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Readers/TeXMath.hs b/src/Text/Pandoc/Readers/TeXMath.hs
index f293299ec..ca839dd08 100644
--- a/src/Text/Pandoc/Readers/TeXMath.hs
+++ b/src/Text/Pandoc/Readers/TeXMath.hs
@@ -94,5 +94,20 @@ expToInlines (EText "bold" x) = Just [Strong [Str x]]
expToInlines (EText "monospace" x) = Just [Code x]
expToInlines (EText "italic" x) = Just [Emph [Str x]]
expToInlines (EText _ x) = Just [Str x]
+expToInlines (EOver (EGrouped [EIdentifier [c]]) (ESymbol Accent [accent])) =
+ case accent of
+ '\x203E' -> Just [Emph [Str [c,'\x0304']]] -- bar
+ '\x00B4' -> Just [Emph [Str [c,'\x0301']]] -- acute
+ '\x0060' -> Just [Emph [Str [c,'\x0300']]] -- grave
+ '\x02D8' -> Just [Emph [Str [c,'\x0306']]] -- breve
+ '\x02C7' -> Just [Emph [Str [c,'\x030C']]] -- check
+ '.' -> Just [Emph [Str [c,'\x0307']]] -- dot
+ '\x00B0' -> Just [Emph [Str [c,'\x030A']]] -- ring
+ '\x20D7' -> Just [Emph [Str [c,'\x20D7']]] -- arrow right
+ '\x20D6' -> Just [Emph [Str [c,'\x20D6']]] -- arrow left
+ '\x005E' -> Just [Emph [Str [c,'\x0302']]] -- hat
+ '\x0302' -> Just [Emph [Str [c,'\x0302']]] -- hat
+ '~' -> Just [Emph [Str [c,'\x0303']]] -- tilde
+ _ -> Nothing
expToInlines _ = Nothing