aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-07-22 18:26:10 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-07-22 18:26:10 +0000
commit4905ebadb3fbf6417b89dc9522c4a909dbdacee5 (patch)
treeb4be83c3e24ec89368b33aa484b47b33611277bd
parentb8e1e53053b440695c078c4c49428985b5f9ee65 (diff)
downloadpandoc-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.hs12
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 "\\"))