]> code.delx.au - gnu-emacs-elpa/blob - packages/auctex-11.86/style/hyperref.el
(debbugs-emacs): New function and modes for listing the Emacs bugs, reading them...
[gnu-emacs-elpa] / packages / auctex-11.86 / style / hyperref.el
1 ;;; hyperref.el --- AUCTeX style for the hyperref class.
2
3 ;; Copyright (C) 2008 Free Software Foundation, Inc.
4
5 ;; Author: Ralf Angeli <angeli@caeruleus.net>
6 ;; Maintainer: auctex-devel@gnu.org
7 ;; Created: 2008-06-21
8 ;; Keywords: tex
9
10 ;; This file is part of AUCTeX.
11
12 ;; AUCTeX is free software; you can redistribute it and/or modify it
13 ;; under the terms of the GNU General Public License as published by
14 ;; the Free Software Foundation; either version 3, or (at your option)
15 ;; any later version.
16
17 ;; AUCTeX is distributed in the hope that it will be useful, but
18 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 ;; General Public License for more details.
21
22 ;; You should have received a copy of the GNU General Public License
23 ;; along with AUCTeX; see the file COPYING. If not, write to the Free
24 ;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
25 ;; 02110-1301, USA.
26
27 ;;; Commentary:
28
29 ;; This file adds support for the hyperref package.
30
31 ;;; Code:
32
33 (defvar LaTeX-hyperref-package-options
34 '("a4paper" "a5paper" "anchorcolor" "b5paper" "backref" "baseurl"
35 "bookmarks" "bookmarksnumbered" "bookmarksopen"
36 "bookmarksopenlevel \maxdimen" "bookmarkstype" "breaklinks"
37 "CJKbookmarks" "citebordercolor" "citecolor" "colorlinks" "debug"
38 "draft" "dvipdf" "dvipdfm" "dvipdfmx" "dvips" "dvipsone"
39 "dviwindo" "encap" "executivepaper" "extension" "filebordercolor"
40 "filecolor" "final" "frenchlinks" "hyperfigures" "hyperfootnotes"
41 "hyperindex" "hypertex" "hypertexnames" "implicit" "latex2html"
42 "legalpaper" "letterpaper" "linkbordercolor" "linkcolor"
43 "linktocpage" "menubordercolor" "menucolor" "nativepdf"
44 "naturalnames" "nesting" "pageanchor" "pagebackref"
45 "pagebordercolor" "pagecolor" "pdfauthor" "pdfborder"
46 "pdfcenterwindow" "pdfcreator" "pdfdirection" "pdfdisplaydoctitle"
47 "pdfduplex" "pdffitwindow" "pdfhighlight" "pdfkeywords" "pdflang"
48 "pdfmark" "pdfmenubar" "pdfnewwindow" "pdfnonfullscreenpagemode"
49 "pdfnumcopies" "pdfpagelayout" "pdfpagemode" "pdfpagelabels"
50 "pdfpagescrop" "pdfpagetransition" "pdfpicktrackbypdfsize"
51 "pdfprintarea" "pdfprintclip" "pdfprintpagerange"
52 "pdfprintscaling" "pdfproducer" "pdfstartpage" "pdfstartview"
53 "pdfsubject" "pdftex" "pdftitle" "pdftoolbar" "pdfview"
54 "pdfviewarea" "pdfviewclip" "pdfwindowui" "plainpages" "ps2pdf"
55 "raiselinks" "runbordercolor" "setpagesize" "tex4ht" "textures"
56 "unicode" "urlbordercolor" "urlcolor" "verbose" "vtex" "xetex")
57 "Package options for the hyperref package.")
58
59 (TeX-add-style-hook
60 "hyperref"
61 (lambda ()
62 ;; hyperref.sty loads url.sty
63 (TeX-run-style-hooks "url")
64 (TeX-add-symbols
65 '("href" "URL" "Text")
66 '("nolinkurl" t)
67 '("hyperbaseurl" t)
68 '("hyperimage" "Image URL" "Text")
69 '("hyperdef" "Category" "Name" "Text")
70 '("hyperref" "URL" "Category" "Name" "Text")
71 '("hyperlink" "Name" "Text")
72 '("hypertarget" "Name" "Text")
73 '("phantomsection" 0)
74 '("autoref" TeX-arg-ref)
75 '("ref*" TeX-arg-ref)
76 '("pageref*" TeX-arg-ref)
77 '("pdfstringdef" "Macro name" "TeX string")
78 '("texorpdfstring" "TeX string" "PDF string")
79 '("hypercalcbp" t)
80 '("Acrobatmenu" "Menu option" "Text")
81 '("TextField" ["Parameters"] "Label")
82 '("CheckBox" ["Parameters"] "Label")
83 '("ChoiceMenu" ["Parameters"] "Label" "Choices")
84 '("PushButton" ["Parameters"] "Label")
85 '("Submit" ["Parameters"] "Label")
86 '("Reset" ["Parameters"] "Label")
87 '("LayoutTextField" "Label" "Field")
88 '("LayoutChoiceField" "Label" "Field")
89 '("LayoutCheckField" "Label" "Field")
90 '("MakeRadioField" "Width" "Height")
91 '("MakeCheckField" "Width" "Height")
92 '("MakeTextField" "Width" "Height")
93 '("MakeChoiceField" "Width" "Height")
94 '("MakeButtonField" "Text"))
95
96 (add-to-list 'LaTeX-verbatim-macros-with-braces-local "nolinkurl")
97 (add-to-list 'LaTeX-verbatim-macros-with-braces-local "hyperbaseurl")
98 (add-to-list 'LaTeX-verbatim-macros-with-braces-local "hyperimage")
99 (add-to-list 'LaTeX-verbatim-macros-with-braces-local "hyperref")
100
101 ;; Fontification
102 (when (and (fboundp 'font-latex-add-keywords)
103 (fboundp 'font-latex-set-syntactic-keywords)
104 (eq TeX-install-font-lock 'font-latex-setup))
105 (font-latex-add-keywords '(("href" "{{")
106 ("nolinkurl" "{")
107 ("hyperbaseurl" "{")
108 ("hyperimage" "{{")
109 ("hyperdef" "{{{")
110 ("hyperref" "{{{{")
111 ("hyperlink" "{{")
112 ("hypertarget" "{{")
113 ("autoref" "{")
114 ("ref" "*{")
115 ("pageref" "*{"))
116 'reference)
117 ;; For syntactic fontification, e.g. verbatim constructs.
118 (font-latex-set-syntactic-keywords))
119
120 ;; RefTeX
121 (when (fboundp 'reftex-ref-style-activate)
122 (reftex-ref-style-activate "Hyperref"))))
123
124 ;;; hyperref.el ends here