Initial Commit
[packages] / xemacs-packages / auctex / style / varioref.el
1 ;;; varioref.el --- AUCTeX style file with support for varioref.sty
2
3 ;; Copyright (C) 1999, 2013 Free Software Foundation, Inc.
4
5 ;; Author: Carsten Dominik <dominik@strw.leidenuniv.nl>
6 ;;         Mads Jensen <mje@inducks.org>
7 ;; Maintainer: auctex-devel@gnu.org
8
9 ;; This file is part of AUCTeX.
10
11 ;; AUCTeX is free software; you can redistribute it and/or modify it
12 ;; under the terms of the GNU General Public License as published by
13 ;; the Free Software Foundation; either version 3, or (at your option)
14 ;; any later version.
15
16 ;; AUCTeX is distributed in the hope that it will be useful, but
17 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19 ;; General Public License for more details.
20
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with AUCTeX; see the file COPYING.  If not, write to the Free
23 ;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
24 ;; 02110-1301, USA.
25
26 ;;; Code:
27
28 (TeX-add-style-hook "varioref"
29    (lambda ()
30
31      (TeX-add-symbols
32
33       ;; The macros with label arguments
34       '("vref" TeX-arg-ref)
35       '("Vref" TeX-arg-ref)
36       '("vrefrange" [ "Same page text" ] TeX-arg-ref TeX-arg-ref)
37       '("vrefrange*" [ "Same page text" ] TeX-arg-ref TeX-arg-ref)
38       '("vref*" TeX-arg-ref)
39       '("Vref" TeX-arg-ref)
40       '("Ref" TeX-arg-ref)
41       '("vpageref" [ "Same page text" ] [ "Different page text" ] TeX-arg-ref)
42       '("vpageref*" [ "Same page text" ] [ "Different page text" ]
43         TeX-arg-ref)
44       '("fullref" TeX-arg-ref)
45       '("labelformat" TeX-arg-counter t)
46
47       '("vpagerefrange" [ "Same page text" ] TeX-arg-ref TeX-arg-ref)
48       '("vpagerefrange*" [ "Same page text" ] TeX-arg-ref TeX-arg-ref)
49
50       ;; And the other macros used for customization
51       "reftextbefore" "reftextfacebefore"
52       "reftextafter"  "reftextfaceafter" "reftexlabelrange"
53       "reftextfaraway" "vreftextvario" "vrefwarning"
54       "vpagerefnum" "vrefshowerrors")
55
56      ;; Install completion for labels.  Only offer completion for
57      ;; commands that take only one reference as an argument
58      (setq TeX-complete-list
59            (append
60             '(("\\\\[Vv]ref{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-label-list "}")
61               ("\\\\vref\\*?{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-label-list "}")
62               ("\\\\Ref{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-label-list "}")
63               ("\\\\vref\\*{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-label-list "}")
64               ("\\\\fullref{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-label-list "}")
65               ("\\\\vpageref\\*?\\(\\[[^]]*\\]\\)*{\\([^{}\n\r\\%,]*\\)"
66                2 LaTeX-label-list "}"))
67             TeX-complete-list)))
68    LaTeX-dialect)
69
70 (defvar LaTeX-varioref-package-options
71   '("draft" "final" "afrikaans" "american" "austrian" "naustrian" "basque"
72     "brazil" "breton" "bahasam" "catalan" "croatian" "czech" "danish"
73     "dutch" "english" "esperanto" "finnish" "french" "galician" "german"
74     "icelandic" "ngerman" "greek" "italian" "magyar" "norsk" "nynorsk"
75     "polish" "portuges" "romanian" "russian" "slovak" "slovene"
76     "spanish" "swedish" "turkish" "ukrainian" "francais" "germanb")
77   "Package options for the varioref package.")
78
79 ;;; varioref.el ends here