瀏覽代碼

ox-latex: Don't add optional title on unnumbered headlines

* lisp/ox-latex.el (org-latex-headline): Don't add optional title on
  unnumbered headlines.
Nicolas Goaziou 12 年之前
父節點
當前提交
cd23825d62
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      lisp/ox-latex.el

+ 2 - 1
lisp/ox-latex.el

@@ -1487,7 +1487,8 @@ holding contextual information."
 			(org-export-data
 			 (org-export-get-alt-title headline info) info)
 			(and (eq (plist-get info :with-tags) t) tags))))
-	  (if (and opt-title (string-match "\\`\\\\\\(.*?[^*]\\){" section-fmt))
+	  (if (and numberedp opt-title
+		   (string-match "\\`\\\\\\(.*?[^*]\\){" section-fmt))
 	      (format (replace-match "\\1[%s]" nil nil section-fmt 1)
 		      ;; Replace square brackets with parenthesis
 		      ;; since square brackets are not supported in