Browse Source

LaTeX export: Protect footnotes in headlines

Carsten Dominik 15 years ago
parent
commit
26b0824f5a
2 changed files with 9 additions and 0 deletions
  1. 5 0
      lisp/ChangeLog
  2. 4 0
      lisp/org-latex.el

+ 5 - 0
lisp/ChangeLog

@@ -1,3 +1,8 @@
+2010-02-23  Carsten Dominik  <carsten.dominik@gmail.com>
+
+	* org-latex.el (org-export-latex-preprocess): Protect footnotes in
+	section headings.
+
 2010-02-21  Carsten Dominik  <carsten.dominik@gmail.com>
 
 	* org-html.el (org-export-as-html-and-open): Kill product buffer

+ 4 - 0
lisp/org-latex.el

@@ -2045,6 +2045,10 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
 		 (add-text-properties (1- (length footnote-rpl))
 				      (length footnote-rpl)
 				      '(org-protected t) footnote-rpl)
+		 (if org-on-heading-p)
+		 (setq footnote-rpl
+		       (concat (org-export-latex-protect-string "\\protect")
+			       footnote-rpl))
 		 (insert footnote-rpl)))
 	     )))))