diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index 4b2e797d0..6507a1c42 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -2402,10 +2402,10 @@ holding contextual information." (string-match-p "\\" v) (format "\\stopcontents[level-%d]" level))))) info t))))) - (if (and (or (and opt-title (not (equal opt-title full-text))) + (if (and numberedp (or (and opt-title (not (equal opt-title full-text))) ;; Heading contains footnotes. Add optional title ;; version without footnotes to avoid footnotes in - ;; TOC/footers. + ;; TOC/footers for numbered sections *only* (and (not (equal full-text-no-footnote full-text)) (setq opt-title full-text-no-footnote))) (string-match "\\`\\\\\\(.+?\\){" section-fmt))