diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-07-22 18:26:10 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-07-22 18:26:10 +0000 |
commit | 4905ebadb3fbf6417b89dc9522c4a909dbdacee5 (patch) | |
tree | b4be83c3e24ec89368b33aa484b47b33611277bd | |
parent | b8e1e53053b440695c078c4c49428985b5f9ee65 (diff) | |
download | pandoc-4905ebadb3fbf6417b89dc9522c4a909dbdacee5.tar.gz |
LaTeX reader: Added clauses for tilde and caret.
Tilde is \ensuremath{\sim}, and caret is \^{},
not \^ as before.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@764 788f1e2b-df1e-0410-8736-df70ead52e1b
-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 "\\")) |