Browse Source

org-latex.el: Fix bug when escaping special characters in a table.

* org-latex.el (org-export-latex-special-chars): Fix bug when
escaping special characters in a table.

Thanks to Alexander Willand for reporting this.
Bastien Guerry 9 years ago
parent
commit
a1fd7c4626
1 changed files with 2 additions and 3 deletions
  1. 2 3
      lisp/org-latex.el

+ 2 - 3
lisp/org-latex.el

@@ -1743,8 +1743,7 @@ See the `org-export-latex.el' code for a complete conversion table."
 	  (goto-char (point-min))
 	  (while (re-search-forward c nil t)
 	    ;; Put the point where to check for org-protected
-	    (unless (or (get-text-property (match-beginning 2) 'org-protected)
-			(save-match-data (org-at-table.el-p)))
+	    (unless (get-text-property (match-beginning 2) 'org-protected)
 	      (cond ((member (match-string 2) '("\\$" "$"))
 		     (if (equal (match-string 2) "\\$")
 			 nil
@@ -1772,7 +1771,7 @@ See the `org-export-latex.el' code for a complete conversion table."
 			   (replace-match (match-string 2) t t)
 			 (replace-match (concat (match-string 1) "\\"
 						(match-string 2)) t t)))))
-	      (unless (save-match-data (org-inside-latex-math-p))
+	      (unless (save-match-data (or (org-inside-latex-math-p) (org-at-table-p)))
 		(cond ((equal (match-string 2) "\\")
 		       (replace-match (or (save-match-data
 					    (org-export-latex-treat-backslash-char