Process index entries

* lisp/org-latex.el (org-export-latex-preprocess): Pipe index entries
through org-export-latex-fontify-headline.
This commit is contained in:
Carsten Dominik 2011-05-05 10:23:32 +02:00
parent e98237927f
commit cb6425e6a0
1 changed files with 5 additions and 2 deletions

View File

@ -2324,11 +2324,14 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
;; Convert #+INDEX to LaTeX \\index. ;; Convert #+INDEX to LaTeX \\index.
(goto-char (point-min)) (goto-char (point-min))
(let ((case-fold-search t)) (let ((case-fold-search t) entry)
(while (re-search-forward (while (re-search-forward
"^[ \t]*#\\+index:[ \t]*\\([^ \t\r\n].*?\\)[ \t]*$" "^[ \t]*#\\+index:[ \t]*\\([^ \t\r\n].*?\\)[ \t]*$"
nil t) nil t)
(replace-match (format "\\index{%s}" (match-string 1)) t t))) (setq entry
(save-match-data
(org-export-latex-fontify-headline (match-string 1))))
(replace-match (format "\\index{%s}" entry) t t)))
;; Convert center ;; Convert center
(goto-char (point-min)) (goto-char (point-min))