浏览代码

LaTeX export: Fix bug with export of x^{(0)}

Report by Dan Davison
Carsten Dominik 15 年之前
父节点
当前提交
9fdff15758
共有 2 个文件被更改,包括 6 次插入1 次删除
  1. 3 0
      lisp/ChangeLog
  2. 3 1
      lisp/org-latex.el

+ 3 - 0
lisp/ChangeLog

@@ -1,5 +1,8 @@
 2010-04-28  Carsten Dominik  <carsten.dominik@gmail.com>
 
+	* 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.
 

+ 3 - 1
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)))