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
This commit is contained in:
parent
b8e1e53053
commit
4905ebadb3
1 changed files with 10 additions and 2 deletions
|
@ -472,19 +472,27 @@ sect = try (do
|
||||||
return (Str [chr 167]))
|
return (Str [chr 167]))
|
||||||
|
|
||||||
escapedChar = do
|
escapedChar = do
|
||||||
result <- escaped (oneOf " $%^&_#{}\n")
|
result <- escaped (oneOf " $%&_#{}\n")
|
||||||
return (if result == Str "\n" then Str " " else result)
|
return (if result == Str "\n" then Str " " else result)
|
||||||
|
|
||||||
unescapedChar = do -- ignore standalone, nonescaped special characters
|
unescapedChar = do -- ignore standalone, nonescaped special characters
|
||||||
oneOf "$^&_#{}|<>"
|
oneOf "$^&_#{}|<>"
|
||||||
return (Str "")
|
return (Str "")
|
||||||
|
|
||||||
specialChar = choice [ backslash, bar, lt, gt ]
|
specialChar = choice [ backslash, tilde, caret, bar, lt, gt ]
|
||||||
|
|
||||||
backslash = try (do
|
backslash = try (do
|
||||||
string "\\textbackslash"
|
string "\\textbackslash"
|
||||||
return (Str "\\"))
|
return (Str "\\"))
|
||||||
|
|
||||||
|
tilde = try (do
|
||||||
|
string "\\ensuremath{\\sim}"
|
||||||
|
return (Str "~"))
|
||||||
|
|
||||||
|
caret = try (do
|
||||||
|
string "\\^{}"
|
||||||
|
return (Str "^"))
|
||||||
|
|
||||||
bar = try (do
|
bar = try (do
|
||||||
string "\\textbar"
|
string "\\textbar"
|
||||||
return (Str "\\"))
|
return (Str "\\"))
|
||||||
|
|
Loading…
Reference in a new issue