0
0
Fork 1
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:
Nicolas Goaziou 2015-06-26 09:50:22 +02:00
parent a833d35159
commit 5a5e4a5eee

View file

@ -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 "\\\\\\&")))