diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5a3aa4c2d..7dc8135bf 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2010-04-28 Carsten Dominik + * org-latex.el (org-export-latex-treat-sub-super-char): Make + sure parenthesis matching is consistent. + * org-table.el (org-table-colgroup-line-p) (org-table-cookie-line-p): New functions. diff --git a/lisp/org-latex.el b/lisp/org-latex.el index 2ec41ea5c..2051de193 100644 --- a/lisp/org-latex.el +++ b/lisp/org-latex.el @@ -1472,7 +1472,9 @@ Convert CHAR depending on STRING-BEFORE and STRING-AFTER." ((and (> (length string-after) 1) (or (eq subsup t) (and (equal subsup '{}) (eq (string-to-char string-after) ?\{))) - (string-match "[({]?\\([^)}]+\\)[)}]?" string-after)) + (or (string-match "[{]?\\([^}]+\\)[}]?" string-after) + (string-match "[(]?\\([^)]+\\)[)]?" string-after))) + (org-export-latex-protect-string (format "%s$%s{%s}$" string-before char (if (and (> (match-end 1) (1+ (match-beginning 1)))