mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-09-29 19:07:52 +00:00
ox-latex: Fix backslash escaping in plain text
* lisp/ox-latex.el (org-latex-plain-text): Fix backslash escaping.
This commit is contained in:
parent
a833d35159
commit
5a5e4a5eee
|
@ -2228,10 +2228,10 @@ contextual information."
|
|||
;; However, if special strings are used, be careful not
|
||||
;; to protect "\" in "\-" constructs.
|
||||
(replace-regexp-in-string
|
||||
(concat "[%$#&{}_~^]\\|\\\\" (and specialp "\\(?:[^-]\\|$\\)"))
|
||||
(concat "[%$#&{}_~^]\\|\\\\" (and specialp "\\([^-]\\|$\\)"))
|
||||
(lambda (m)
|
||||
(case (aref m 0)
|
||||
(?\\ "$\\\\backslash$")
|
||||
(case (string-to-char m)
|
||||
(?\\ "$\\\\backslash$\\1")
|
||||
(?~ "\\\\textasciitilde{}")
|
||||
(?^ "\\\\^{}")
|
||||
(t "\\\\\\&")))
|
||||
|
|
Loading…
Reference in a new issue