diff options
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/Readers/LaTeX.hs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs index 9e03ebc85..0ba6cd560 100644 --- a/src/Text/Pandoc/Readers/LaTeX.hs +++ b/src/Text/Pandoc/Readers/LaTeX.hs @@ -472,19 +472,27 @@ sect = try (do return (Str [chr 167])) escapedChar = do - result <- escaped (oneOf " $%^&_#{}\n") + result <- escaped (oneOf " $%&_#{}\n") return (if result == Str "\n" then Str " " else result) unescapedChar = do -- ignore standalone, nonescaped special characters oneOf "$^&_#{}|<>" return (Str "") -specialChar = choice [ backslash, bar, lt, gt ] +specialChar = choice [ backslash, tilde, caret, bar, lt, gt ] backslash = try (do string "\\textbackslash" return (Str "\\")) +tilde = try (do + string "\\ensuremath{\\sim}" + return (Str "~")) + +caret = try (do + string "\\^{}" + return (Str "^")) + bar = try (do string "\\textbar" return (Str "\\")) |