소스 검색

ox-latex: Do not add optional section name when section is unnumbered

* lisp/ox-latex.el (org-latex-headline): Do not add optional section
  name when section is unnumbered.
Nicolas Goaziou 12 년 전
부모
커밋
309ccd9649
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      lisp/ox-latex.el

+ 1 - 1
lisp/ox-latex.el

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