From 5a5e4a5eeee6b9b9477726e1a1038f53cb1e8251 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Fri, 26 Jun 2015 09:50:22 +0200 Subject: [PATCH] ox-latex: Fix backslash escaping in plain text * lisp/ox-latex.el (org-latex-plain-text): Fix backslash escaping. --- lisp/ox-latex.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index d0bc3b4cb..11fa00d7f 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -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 "\\\\\\&")))