mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-08-24 13:02:52 +00:00
Make the latex export preprocessor rewrite #+INDEX to \index.
* lisp/org-latex.el (org-export-latex-preprocess): Replace index entries.
This commit is contained in:
parent
62c12cc50f
commit
bf7ce56a72
|
@ -2322,6 +2322,15 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
|
||||||
(and (looking-at "[ \t]*ORG-VERSE-END.*")
|
(and (looking-at "[ \t]*ORG-VERSE-END.*")
|
||||||
(org-replace-match-keep-properties "\\end{verse}" t t)))
|
(org-replace-match-keep-properties "\\end{verse}" t t)))
|
||||||
|
|
||||||
|
;; Convert #+INDEX to LaTeX \\index.
|
||||||
|
(goto-char (point-min))
|
||||||
|
(let ((case-fold-search t))
|
||||||
|
(while (re-search-forward
|
||||||
|
"^[ \t]*#\\+index:[ \t]*\\([^ \t\r\n].*?\\)[ \t]*$"
|
||||||
|
nil t)
|
||||||
|
(let ((entry (match-string 1)))
|
||||||
|
(replace-match (format "\\index{%s}" (match-string 1)) t t))))
|
||||||
|
|
||||||
;; Convert center
|
;; Convert center
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(while (search-forward "ORG-CENTER-START" nil t)
|
(while (search-forward "ORG-CENTER-START" nil t)
|
||||||
|
|
Loading…
Reference in a new issue