|
Packit |
f2bd10 |
;;; multind.el --- AUCTeX support for multiple indices with multind.sty.
|
|
Packit |
f2bd10 |
|
|
Packit |
f2bd10 |
;; Copyright (C) 1999 Free Software Foundation, Inc.
|
|
Packit |
f2bd10 |
|
|
Packit |
f2bd10 |
;; Author: Carsten Dominik <dominik@strw.leidenuniv.nl>
|
|
Packit |
f2bd10 |
;; Maintainer: auctex-devel@gnu.org
|
|
Packit |
f2bd10 |
|
|
Packit |
f2bd10 |
;; This file is part of AUCTeX.
|
|
Packit |
f2bd10 |
|
|
Packit |
f2bd10 |
;; AUCTeX is free software; you can redistribute it and/or modify it
|
|
Packit |
f2bd10 |
;; under the terms of the GNU General Public License as published by
|
|
Packit |
f2bd10 |
;; the Free Software Foundation; either version 3, or (at your option)
|
|
Packit |
f2bd10 |
;; any later version.
|
|
Packit |
f2bd10 |
|
|
Packit |
f2bd10 |
;; AUCTeX is distributed in the hope that it will be useful, but
|
|
Packit |
f2bd10 |
;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
f2bd10 |
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
f2bd10 |
;; General Public License for more details.
|
|
Packit |
f2bd10 |
|
|
Packit |
f2bd10 |
;; You should have received a copy of the GNU General Public License
|
|
Packit |
f2bd10 |
;; along with AUCTeX; see the file COPYING. If not, write to the Free
|
|
Packit |
f2bd10 |
;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
Packit |
f2bd10 |
;; 02110-1301, USA.
|
|
Packit |
f2bd10 |
|
|
Packit |
f2bd10 |
;;; Code:
|
|
Packit |
f2bd10 |
|
|
Packit |
f2bd10 |
(TeX-add-style-hook "multind"
|
|
Packit |
f2bd10 |
(lambda ()
|
|
Packit |
f2bd10 |
|
|
Packit |
f2bd10 |
;; Commands
|
|
Packit |
f2bd10 |
(TeX-add-symbols
|
|
Packit |
f2bd10 |
'("makeindex" "Indextag")
|
|
Packit |
f2bd10 |
'("index" TeX-arg-index-tag TeX-arg-index)
|
|
Packit |
f2bd10 |
'("printindex" TeX-arg-index-tag "Title")
|
|
Packit |
f2bd10 |
"printindex" "indexspace")
|
|
Packit |
f2bd10 |
|
|
Packit |
f2bd10 |
;; Parsing index macros
|
|
Packit |
f2bd10 |
(setq LaTeX-auto-regexp-list
|
|
Packit |
f2bd10 |
(append
|
|
Packit |
f2bd10 |
;; The first regexp is faster, but less accurate
|
|
Packit |
f2bd10 |
;; '(("\\\\index\\*?{[^{}]*}{\\([^}]*\\)" 1 LaTeX-auto-index-entry))
|
|
Packit |
f2bd10 |
;; The second regexp is very good, but slower
|
|
Packit |
f2bd10 |
'(("\\\\index\\*?{[^{}]*}{\\([^}{]*\\({[^}{]*\\({[^}{]*\\({[^}{]*}[^}{]*\\)*}[^}{]*\\)*}[^}{]*\\)*\\)}"
|
|
Packit |
f2bd10 |
1 LaTeX-auto-index-entry))
|
|
Packit |
f2bd10 |
LaTeX-auto-regexp-list))
|
|
Packit |
f2bd10 |
|
|
Packit |
f2bd10 |
;; Completion for index entries in the |see and \index commands
|
|
Packit |
f2bd10 |
(setq TeX-complete-list
|
|
Packit |
f2bd10 |
(append
|
|
Packit |
f2bd10 |
'(("\\\\index{[^{}]*}{\\([^{}\n\r]*\\)" 1 LaTeX-index-entry-list)
|
|
Packit |
f2bd10 |
("|see{\\([^}]*\\)" 1 LaTeX-index-entry-list))
|
|
Packit |
f2bd10 |
TeX-complete-list))
|
|
Packit |
f2bd10 |
|
|
Packit |
f2bd10 |
;; RefTeX support
|
|
Packit |
f2bd10 |
(and (fboundp 'reftex-add-index-macros)
|
|
Packit |
f2bd10 |
(reftex-add-index-macros '(multind))))
|
|
Packit |
f2bd10 |
LaTeX-dialect)
|
|
Packit |
f2bd10 |
|
|
Packit |
f2bd10 |
(defvar LaTeX-multind-package-options nil
|
|
Packit |
f2bd10 |
"Package options for the multind package.")
|
|
Packit |
f2bd10 |
|
|
Packit |
f2bd10 |
;;; multind.el ends here
|