浏览代码

Protect starred commands in LaTeX export correctly

* lisp/org-latex.el (org-export-latex-preprocess): Correctly
match starred command names.

Many LaTeX commands exist in both normal and starred forms.  Adjust
the regexp in `org-export-latex-preprocess' to match the starred form
as well.
Lawrence Mitchell 14 年之前
父节点
当前提交
c109334152
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lisp/org-latex.el

+ 1 - 1
lisp/org-latex.el

@@ -2345,7 +2345,7 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
   ;; Protect LaTeX commands like \command[...]{...} or \command{...}
   (goto-char (point-min))
   (let ((re (concat
-	     "\\\\\\([a-zA-Z]+\\)"
+	     "\\\\\\([a-zA-Z]+\\*?\\)"
 	     "\\(?:<[^<>\n]*>\\)*"
 	     "\\(?:\\[[^][\n]*?\\]\\)*"
 	     "\\(?:<[^<>\n]*>\\)*"