mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-08-25 12:02:52 +00:00
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.
This commit is contained in:
parent
c2a6f5de6e
commit
a1fd7c4626
|
@ -1743,8 +1743,7 @@ See the `org-export-latex.el' code for a complete conversion table."
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(while (re-search-forward c nil t)
|
(while (re-search-forward c nil t)
|
||||||
;; Put the point where to check for org-protected
|
;; Put the point where to check for org-protected
|
||||||
(unless (or (get-text-property (match-beginning 2) 'org-protected)
|
(unless (get-text-property (match-beginning 2) 'org-protected)
|
||||||
(save-match-data (org-at-table.el-p)))
|
|
||||||
(cond ((member (match-string 2) '("\\$" "$"))
|
(cond ((member (match-string 2) '("\\$" "$"))
|
||||||
(if (equal (match-string 2) "\\$")
|
(if (equal (match-string 2) "\\$")
|
||||||
nil
|
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 (match-string 2) t t)
|
||||||
(replace-match (concat (match-string 1) "\\"
|
(replace-match (concat (match-string 1) "\\"
|
||||||
(match-string 2)) t t)))))
|
(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) "\\")
|
(cond ((equal (match-string 2) "\\")
|
||||||
(replace-match (or (save-match-data
|
(replace-match (or (save-match-data
|
||||||
(org-export-latex-treat-backslash-char
|
(org-export-latex-treat-backslash-char
|
||||||
|
|
Loading…
Reference in a new issue