From cd23825d62c1c2cb7b1fc819f25f1f410f1a9bc4 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Mon, 4 Mar 2013 21:18:34 +0100 Subject: [PATCH] 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. --- lisp/ox-latex.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index d4dceeeec..99f06b4b2 100644 --- a/lisp/ox-latex.el +++ b/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 -- 2.11.4.GIT