1 ;;; index.el --- AUCTeX support for indices with index.sty.
3 ;; Copyright (C) 1999 Free Software Foundation, Inc.
5 ;; Author: Carsten Dominik <dominik@strw.leidenuniv.nl>
6 ;; Maintainer: auctex-devel@gnu.org
8 ;; This file is part of AUCTeX.
10 ;; AUCTeX is free software; you can redistribute it and/or modify it
11 ;; under the terms of the GNU General Public License as published by
12 ;; the Free Software Foundation; either version 3, or (at your option)
15 ;; AUCTeX is distributed in the hope that it will be useful, but
16 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 ;; General Public License for more details.
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with AUCTeX; see the file COPYING. If not, write to the Free
22 ;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
27 (TeX-add-style-hook "index"
33 '("newindex" [ "Counter" ] "Tag"
34 "Extension of raw index" "Extension of processed index" "Index title")
35 '("renewindex" [ "Counter" ] "Tag"
36 "Extension of raw index" "Extension of processed index" "Index title")
38 '("disableindex" "Tag[,tag...]")
41 '("printindex" [ "Indextag" ] [ "Prologue" ])
45 '("index" [ TeX-arg-index-tag ] TeX-arg-index)
46 '("index*" [ TeX-arg-index-tag ] TeX-arg-index)
49 "proofmodetrue" "proofmodefalse" '("indexproofstyle" "Style")
51 ;; Shortcuts (THESE ARE DEPRECATED AND SHOULD NOT BE USED
52 "shortindexingon" "shortindexinoff")
54 ;; Parsing index macros
55 (setq LaTeX-auto-regexp-list
58 ;; The first regexp is faster, but less accurate
59 ;;'(("\\\\index\\*?\\[[^{}]*\\]{\\([^}]*\\)"
60 ;; 1 LaTeX-auto-index-entry))
62 ;; The second regexp is very good, but slower.
63 '(("\\\\index\\*?\\[[^{}]*\\]{\\([^}{]*\\({[^}{]*\\({[^}{]*\\({[^}{]*}[^}{]*\\)*}[^}{]*\\)*}[^}{]*\\)*\\)}"
64 1 LaTeX-auto-index-entry))
66 LaTeX-auto-regexp-list))
68 ;; Completion for the index entries in \index and |see commands
69 (setq TeX-complete-list
71 '(("\\\\index\\*?\\(\\[[^][{}]*\\]\\)?{\\([^{}\n\r]*\\)"
72 2 LaTeX-index-entry-list)
73 ("|see{\\([^}]*\\)" 1 LaTeX-index-entry-list))
77 (and (fboundp 'reftex-add-index-macros)
78 (reftex-add-index-macros '(index)))))
80 (defvar LaTeX-index-package-options nil
81 "Package options for the index package.")
83 ;;; index.el ends here