git.iko.soy/typeable/pandoc
on master help sign in
TeXMath: handle variables modified with \acute, \bar, etc.

Complete list: \acute, \grave, \breve, \check, \dot, \mathring, \vec, \overrightarrow, \overleftarrow, \hat, \tilde, \bar.

commit4d08bc38a9cad87302bff0ca2fd90750f24edc21 authorJohn MacFarlane <jgm@berkeley.edu> dateTue 19 Oct 2010, 15:03 (16 years ago) parent11672c4
1 file changed+15
src/Text/Pandoc/Readers/TeXMath.hs+15
src/Text/Pandoc/Readers/TeXMath.hs+15
@@ -94,5 +94,20 @@ expToInlines (EText "bold" x) = Just [Strong [Str x]]
9494expToInlines (EText "monospace" x) = Just [Code x]
9595expToInlines (EText "italic" x) = Just [Emph [Str x]]
9696expToInlines (EText _ x) = Just [Str x]
97+expToInlines (EOver (EGrouped [EIdentifier [c]]) (ESymbol Accent [accent])) =
98+ case accent of
99+ '\x203E' -> Just [Emph [Str [c,'\x0304']]] -- bar
100+ '\x00B4' -> Just [Emph [Str [c,'\x0301']]] -- acute
101+ '\x0060' -> Just [Emph [Str [c,'\x0300']]] -- grave
102+ '\x02D8' -> Just [Emph [Str [c,'\x0306']]] -- breve
103+ '\x02C7' -> Just [Emph [Str [c,'\x030C']]] -- check
104+ '.' -> Just [Emph [Str [c,'\x0307']]] -- dot
105+ '\x00B0' -> Just [Emph [Str [c,'\x030A']]] -- ring
106+ '\x20D7' -> Just [Emph [Str [c,'\x20D7']]] -- arrow right
107+ '\x20D6' -> Just [Emph [Str [c,'\x20D6']]] -- arrow left
108+ '\x005E' -> Just [Emph [Str [c,'\x0302']]] -- hat
109+ '\x0302' -> Just [Emph [Str [c,'\x0302']]] -- hat
110+ '~' -> Just [Emph [Str [c,'\x0303']]] -- tilde
111+ _ -> Nothing
97112expToInlines _ = Nothing
98113