Mercurial > emacs
annotate lisp/textmodes/reftex-vars.el @ 47765:1dc1153f070a
(vc-log-mode-map): Explicitly inherit from text-mode.
(vc-maybe-resolve-conflicts): Don't check smerge-mode and smerge-ediff.
(vc-print-log): Don't check log-view-mode.
(vc-default-show-log-entry): Don't check log-view-goto-rev.
(vc-log-mode): Remove.
(vc-log-edit): Don't check log-edit.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Sat, 05 Oct 2002 16:35:28 +0000 |
parents | 0964618b0e97 |
children | c33a2b08adc7 |
rev | line source |
---|---|
38422
7a94f1c588c4
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
37998
diff
changeset
|
1 ;;; reftex-vars.el --- configuration variables for RefTeX |
27192
f70a80cecdd3
New version number.
Carsten Dominik <dominik@science.uva.nl>
parents:
27035
diff
changeset
|
2 ;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. |
27035 | 3 |
46612
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
4 ;; Author: Carsten Dominik <dominik@science.uva.nl> |
46683
060f433ebf11
Updated to RefTeX 4.18
Carsten Dominik <dominik@science.uva.nl>
parents:
46612
diff
changeset
|
5 ;; Version: 4.18 |
27035 | 6 |
7 ;; This file is part of GNU Emacs. | |
8 | |
9 ;; GNU Emacs is free software; you can redistribute it and/or modify | |
10 ;; it under the terms of the GNU General Public License as published by | |
11 ;; the Free Software Foundation; either version 2, or (at your option) | |
12 ;; any later version. | |
13 | |
14 ;; GNU Emacs is distributed in the hope that it will be useful, | |
15 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 ;; GNU General Public License for more details. | |
18 | |
19 ;; You should have received a copy of the GNU General Public License | |
20 ;; along with GNU Emacs; see the file COPYING. If not, write to the | |
21 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
22 ;; Boston, MA 02111-1307, USA. | |
25280 | 23 |
38422
7a94f1c588c4
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
37998
diff
changeset
|
24 ;;; Commentary: |
7a94f1c588c4
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
37998
diff
changeset
|
25 |
7a94f1c588c4
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
37998
diff
changeset
|
26 ;;; Code: |
7a94f1c588c4
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
37998
diff
changeset
|
27 |
26910
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
28 (eval-when-compile (require 'cl)) |
25280 | 29 (provide 'reftex-vars) |
30 | |
31 ;; Define the two constants which are needed during compilation | |
32 | |
33 (eval-and-compile | |
34 (defconst reftex-label-alist-builtin | |
35 '( | |
36 ;; Some aliases, mostly for backward compatibility | |
37 (Sideways "Alias for -->rotating" (rotating)) | |
38 (AMSTeX "amsmath with eqref macro" | |
39 ((nil ?e nil "~\\eqref{%s}") | |
40 amsmath)) | |
41 | |
42 ;; Individual package defaults | |
43 (amsmath "AMS-LaTeX math environments" | |
44 (("align" ?e nil nil eqnarray-like) | |
45 ("gather" ?e nil nil eqnarray-like) | |
46 ("multline" ?e nil nil t) | |
47 ("flalign" ?e nil nil eqnarray-like) | |
48 ("alignat" ?e nil nil alignat-like) | |
49 ("xalignat" ?e nil nil alignat-like) | |
50 ("xxalignat" ?e nil nil alignat-like) | |
51 ("subequations" ?e nil nil t))) | |
52 | |
53 (endnotes "The \\endnote macro" | |
54 (("\\endnote[]{}" ?N "en:" "~\\ref{%s}" 2 | |
55 (regexp "endnotes?" "notes?" "Anmerkung\\(en\\)?" "Anm\\.")))) | |
56 | |
57 (fancybox "The Beqnarray environment" | |
58 (("Beqnarray" ?e nil nil eqnarray-like))) | |
59 | |
60 (floatfig "The floatingfigure environment" | |
61 (("floatingfigure" ?f nil nil caption))) | |
62 | |
63 (longtable "The longtable environment" | |
64 (("longtable" ?t nil nil caption))) | |
65 | |
66 (picinpar "The figwindow and tabwindow environments" | |
67 (("figwindow" ?f nil nil 1) | |
68 ("tabwindow" ?f nil nil 1))) | |
69 | |
70 (rotating "Sidewaysfigure and table" | |
71 (("sidewaysfigure" ?f nil nil caption) | |
72 ("sidewaystable" ?t nil nil caption))) | |
73 | |
74 (sidecap "CSfigure and SCtable" | |
75 (("SCfigure" ?f nil nil caption) | |
76 ("SCtable" ?t nil nil caption))) | |
77 | |
78 (subfigure "Subfigure environments/macro" | |
79 (("subfigure" ?f nil nil caption) | |
80 ("subfigure*" ?f nil nil caption) | |
81 ("\\subfigure[]{}" ?f nil nil 1))) | |
82 | |
83 (supertab "Supertabular environment" | |
84 (("supertabular" ?t nil nil "\\tablecaption{"))) | |
85 | |
86 (wrapfig "The wrapfigure environment" | |
87 (("wrapfigure" ?f nil nil caption))) | |
88 | |
89 ;; The LaTeX core stuff | |
90 (LaTeX "LaTeX default environments" | |
91 (("section" ?s "%S" "~\\ref{%s}" (nil . t) | |
92 (regexp "parts?" "chapters?" "chap\\." "sections?" "sect?\\." | |
93 "paragraphs?" "par\\." | |
94 "\\\\S" "\247" "Teile?" "Kapitel" "Kap\\." "Abschnitte?" | |
95 "appendi\\(x\\|ces\\)" "App\\." "Anh\"?ange?" "Anh\\.")) | |
96 | |
97 ("enumerate" ?i "item:" "~\\ref{%s}" item | |
98 (regexp "items?" "Punkte?")) | |
99 | |
100 ("equation" ?e "eq:" "~(\\ref{%s})" t | |
101 (regexp "equations?" "eqs?\\." "eqn\\." "Gleichung\\(en\\)?" "Gl\\.")) | |
102 ("eqnarray" ?e "eq:" nil eqnarray-like) | |
103 | |
104 ("figure" ?f "fig:" "~\\ref{%s}" caption | |
105 (regexp "figure?[sn]?" "figs?\\." "Abbildung\\(en\\)?" "Abb\\.")) | |
106 ("figure*" ?f nil nil caption) | |
107 | |
108 ("table" ?t "tab:" "~\\ref{%s}" caption | |
109 (regexp "tables?" "tab\\." "Tabellen?")) | |
110 ("table*" ?t nil nil caption) | |
111 | |
112 ("\\footnote[]{}" ?n "fn:" "~\\ref{%s}" 2 | |
113 (regexp "footnotes?" "Fussnoten?")) | |
114 | |
115 ("any" ?\ " " "~\\ref{%s}" nil) | |
116 | |
117 ;; The label macro is hard coded, but it *could* be defined like this: | |
118 ;;("\\label{*}" nil nil nil nil) | |
119 )) | |
120 | |
121 ) | |
122 "The default label environment descriptions. | |
123 Lower-case symbols correspond to a style file of the same name in the LaTeX | |
124 distribution. Mixed-case symbols are convenience aliases.") | |
125 | |
126 (defconst reftex-cite-format-builtin | |
127 '((default "Default macro \\cite{%l}" | |
128 "\\cite{%l}") | |
129 (natbib "The Natbib package" | |
130 ((?\C-m . "\\cite{%l}") | |
131 (?t . "\\citet{%l}") | |
132 (?T . "\\citet*{%l}") | |
133 (?p . "\\citep{%l}") | |
134 (?P . "\\citep*{%l}") | |
135 (?e . "\\citep[e.g.][]{%l}") | |
136 (?s . "\\citep[see][]{%l}") | |
137 (?a . "\\citeauthor{%l}") | |
138 (?A . "\\citeauthor*{%l}") | |
46612
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
139 (?y . "\\citeyear{%l}") |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
140 (?n . "\\nocite{%l}"))) |
29775
31536c6cf2e3
* textmodes/reftex.el (reftex-find-citation-regexp-format):
Carsten Dominik <dominik@science.uva.nl>
parents:
27604
diff
changeset
|
141 (bibentry "The Bibentry package" |
31536c6cf2e3
* textmodes/reftex.el (reftex-find-citation-regexp-format):
Carsten Dominik <dominik@science.uva.nl>
parents:
27604
diff
changeset
|
142 "\\bibentry{%l}") |
25280 | 143 (harvard "The Harvard package" |
144 ((?\C-m . "\\cite{%l}") | |
145 (?p . "\\cite{%l}") | |
146 (?t . "\\citeasnoun{%l}") | |
147 (?n . "\\citeasnoun{%l}") | |
148 (?s . "\\possessivecite{%l}") | |
149 (?e . "\\citeaffixed{%l}{?}") | |
150 (?y . "\\citeyear{%l}") | |
151 (?a . "\\citename{%l}"))) | |
152 (chicago "The Chicago package" | |
153 ((?\C-m . "\\cite{%l}") | |
154 (?t . "\\citeN{%l}") | |
155 (?T . "\\shortciteN{%l}") | |
156 (?p . "\\cite{%l}") | |
157 (?P . "\\shortcite{%l}") | |
158 (?a . "\\citeA{%l}") | |
159 (?A . "\\shortciteA{%l}") | |
160 (?y . "\\citeyear{%l}"))) | |
161 (astron "The Astron package" | |
162 ((?\C-m . "\\cite{%l}") | |
163 (?p . "\\cite{%l}" ) | |
164 (?t . "%2a (\\cite{%l})"))) | |
165 (author-year "Do-it-yourself Author-year" | |
166 ((?\C-m . "\\cite{%l}") | |
167 (?t . "%2a (%y)\\nocite{%l}") | |
168 (?p . "(%2a %y\\nocite{%l})"))) | |
169 (locally "Full info in parenthesis" | |
170 "(%2a %y, %j %v, %P, %e: %b, %u, %s %<)") | |
171 ) | |
172 "Builtin versions of the citation format. | |
173 The following conventions are valid for all alist entries: | |
174 `?\C-m' should always point to a straight \\cite{%l} macro. | |
175 `?t' should point to a textual citation (citation as a noun). | |
176 `?p' should point to a parenthetical citation.") | |
177 | |
178 (defconst reftex-index-macros-builtin | |
179 '((default "Default \\index and \\glossary macros" | |
26910
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
180 (("\\index{*}" "idx" ?i "" nil t) |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
181 ("\\glossary{*}" "glo" ?g "" nil t))) |
25280 | 182 (multind "The multind.sty package" |
26910
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
183 (("\\index{}{*}" 1 ?i "" nil t))) |
25280 | 184 (index "The index.sty package" |
26910
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
185 (("\\index[]{*}" 1 ?i "" nil t) |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
186 ("\\index*[]{*}" 1 ?I "" nil nil))) |
25280 | 187 (Index-Shortcut "index.sty with \\shortindexingon" |
26910
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
188 (("\\index[]{*}" 1 ?i "" nil t) |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
189 ("\\index*[]{*}" 1 ?I "" nil nil) |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
190 ("^[]{*}" 1 ?^ "" texmathp t) |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
191 ("_[]{*}" 1 ?_ "" texmathp nil)))) |
25280 | 192 "Builtin stuff for reftex-index-macros. |
193 Lower-case symbols correspond to a style file of the same name in the LaTeX | |
194 distribution. Mixed-case symbols are convenience aliases.") | |
195 ) | |
196 | |
197 ;; Configuration Variables and User Options for RefTeX ------------------ | |
198 | |
199 (defgroup reftex nil | |
200 "LaTeX label and citation support." | |
201 :tag "RefTeX" | |
202 :link '(url-link :tag "Home Page" | |
203 "http://strw.leidenuniv.nl/~dominik/Tools/") | |
204 :link '(emacs-commentary-link :tag "Commentary in reftex.el" "reftex.el") | |
205 :link '(custom-manual "(reftex)Top") | |
206 :prefix "reftex-" | |
207 :group 'tex) | |
208 | |
46612
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
209 |
25280 | 210 ;; Table of contents configuration -------------------------------------- |
211 | |
212 (defgroup reftex-table-of-contents-browser nil | |
213 "A multifile table of contents browser." | |
214 :group 'reftex) | |
215 | |
46612
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
216 (defcustom reftex-include-file-commands '("include" "input") |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
217 "LaTeX commands which input another file. |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
218 The file name is expected after the command, either in braces or separated |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
219 by whitespace." |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
220 :group 'reftex-table-of-contents-browser |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
221 :type '(repeat string)) |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
222 |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
223 (defcustom reftex-max-section-depth 12 |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
224 "Maximum depth of section levels in document structure. |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
225 Standard LaTeX needs default is 7, but there are packages for which this |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
226 needs to be larger." |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
227 :group 'reftex-table-of-contents-browser |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
228 :type 'integer) |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
229 |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
230 ;; LaTeX section commands and level numbers |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
231 (defcustom reftex-section-levels |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
232 '( |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
233 ("part" . 0) |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
234 ("chapter" . 1) |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
235 ("section" . 2) |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
236 ("subsection" . 3) |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
237 ("subsubsection" . 4) |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
238 ("paragraph" . 5) |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
239 ("subparagraph" . 6) |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
240 ("subsubparagraph" . 7) |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
241 ("addchap" . -1) ; KOMA-Script |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
242 ("addsec" . -2) ; KOMA-Script |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
243 ;;; ("minisec" . -7) ; KOMA-Script |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
244 ) |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
245 "Commands and levels used for defining sections in the document. |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
246 This is an alist with each element like (COMMAND-NAME . LEVEL). |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
247 The car of each cons cell is the name of the section macro (without |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
248 the backslash). The cdr is a number indicating its level. A negative |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
249 level means the same level as the positive value, but the section will |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
250 never get a number. The cdr may also be a function which will be called |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
251 to after the section-re matched to determine the level." |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
252 :group 'reftex-table-of-contents-browser |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
253 :set 'reftex-set-dirty |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
254 :type '(repeat |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
255 (cons (string :tag "sectioning macro" "") |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
256 (choice |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
257 (number :tag "level " 0) |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
258 (symbol :tag "function " my-level-func))))) |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
259 |
26910
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
260 (defcustom reftex-toc-max-level 100 |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
261 "*The maximum level of toc entries which will be included in the TOC. |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
262 Section headings with a bigger level will be ignored. In RefTeX, chapters |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
263 are level 1, sections are level 2 etc. |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
264 This variable can be changed from within the *toc* buffer with the `t' key." |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
265 :group 'reftex-table-of-contents-browser |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
266 :type 'integer) |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
267 |
47050
904fd28be439
Update to RefTeX 4.19
Carsten Dominik <dominik@science.uva.nl>
parents:
46683
diff
changeset
|
268 (defcustom reftex-part-resets-chapter nil |
904fd28be439
Update to RefTeX 4.19
Carsten Dominik <dominik@science.uva.nl>
parents:
46683
diff
changeset
|
269 "*Non-nil means, \\part is like any other sectioning command. |
904fd28be439
Update to RefTeX 4.19
Carsten Dominik <dominik@science.uva.nl>
parents:
46683
diff
changeset
|
270 This means, part numbers will be included in the numbering of chapters, and |
904fd28be439
Update to RefTeX 4.19
Carsten Dominik <dominik@science.uva.nl>
parents:
46683
diff
changeset
|
271 chapter counters will be reset for each part. |
904fd28be439
Update to RefTeX 4.19
Carsten Dominik <dominik@science.uva.nl>
parents:
46683
diff
changeset
|
272 When nil (the default), parts are special, do not reset the chapter counter |
904fd28be439
Update to RefTeX 4.19
Carsten Dominik <dominik@science.uva.nl>
parents:
46683
diff
changeset
|
273 and also do not show up in chapter numbers." |
904fd28be439
Update to RefTeX 4.19
Carsten Dominik <dominik@science.uva.nl>
parents:
46683
diff
changeset
|
274 :group 'reftex-table-of-contents-browser |
904fd28be439
Update to RefTeX 4.19
Carsten Dominik <dominik@science.uva.nl>
parents:
46683
diff
changeset
|
275 :type 'boolean) |
904fd28be439
Update to RefTeX 4.19
Carsten Dominik <dominik@science.uva.nl>
parents:
46683
diff
changeset
|
276 |
904fd28be439
Update to RefTeX 4.19
Carsten Dominik <dominik@science.uva.nl>
parents:
46683
diff
changeset
|
277 |
904fd28be439
Update to RefTeX 4.19
Carsten Dominik <dominik@science.uva.nl>
parents:
46683
diff
changeset
|
278 (defcustom reftex-auto-recenter-toc nil |
904fd28be439
Update to RefTeX 4.19
Carsten Dominik <dominik@science.uva.nl>
parents:
46683
diff
changeset
|
279 "*Non-nil means, initially turn automatic recentering of toc on. |
904fd28be439
Update to RefTeX 4.19
Carsten Dominik <dominik@science.uva.nl>
parents:
46683
diff
changeset
|
280 When active, the *TOC* buffer will always show the section you |
904fd28be439
Update to RefTeX 4.19
Carsten Dominik <dominik@science.uva.nl>
parents:
46683
diff
changeset
|
281 are currently working in. Recentering happens whenever Emacs is idle for |
904fd28be439
Update to RefTeX 4.19
Carsten Dominik <dominik@science.uva.nl>
parents:
46683
diff
changeset
|
282 more than `reftex-idle-time' seconds. |
904fd28be439
Update to RefTeX 4.19
Carsten Dominik <dominik@science.uva.nl>
parents:
46683
diff
changeset
|
283 This feature can be turned on and off from the menu |
904fd28be439
Update to RefTeX 4.19
Carsten Dominik <dominik@science.uva.nl>
parents:
46683
diff
changeset
|
284 (Ref->Options)." |
904fd28be439
Update to RefTeX 4.19
Carsten Dominik <dominik@science.uva.nl>
parents:
46683
diff
changeset
|
285 :group 'reftex-table-of-contents-browser |
904fd28be439
Update to RefTeX 4.19
Carsten Dominik <dominik@science.uva.nl>
parents:
46683
diff
changeset
|
286 :type 'boolean) |
904fd28be439
Update to RefTeX 4.19
Carsten Dominik <dominik@science.uva.nl>
parents:
46683
diff
changeset
|
287 |
46612
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
288 (defcustom reftex-toc-split-windows-horizontally nil |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
289 "*Non-nil means, create TOC window by splitting window horizontally." |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
290 :group 'reftex-table-of-contents-browser |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
291 :type 'boolean) |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
292 |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
293 (defcustom reftex-toc-split-windows-horizontally-fraction .5 |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
294 "*Fraction of the horizontal width of the frame to be used for TOC window. |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
295 Only relevant when `reftex-toc-split-windows-horizontally' is non-nil." |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
296 :group 'reftex-table-of-contents-browser |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
297 :type 'number) |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
298 |
25280 | 299 (defcustom reftex-toc-keep-other-windows t |
300 "*Non-nil means, split the selected window to display the *toc* buffer. | |
301 This helps to keep the window configuration, but makes the *toc* small. | |
302 When nil, all other windows except the selected one will be deleted, so | |
303 that the *toc* window fills half the frame." | |
304 :group 'reftex-table-of-contents-browser | |
305 :type 'boolean) | |
306 | |
307 (defcustom reftex-toc-include-file-boundaries nil | |
308 "*Non-nil means, include file boundaries in *toc* buffer. | |
309 This flag can be toggled from within the *toc* buffer with the `F' key." | |
310 :group 'reftex-table-of-contents-browser | |
311 :type 'boolean) | |
312 | |
313 (defcustom reftex-toc-include-labels nil | |
314 "*Non-nil means, include labels in *toc* buffer. | |
315 This flag can be toggled from within the *toc* buffer with the `l' key." | |
316 :group 'reftex-table-of-contents-browser | |
317 :type 'boolean) | |
318 | |
319 (defcustom reftex-toc-include-index-entries nil | |
320 "*Non-nil means, include index entries in *toc* buffer. | |
321 This flag can be toggled from within the *toc* buffer with the `i' key." | |
322 :group 'reftex-table-of-contents-browser | |
323 :type 'boolean) | |
324 | |
325 (defcustom reftex-toc-include-context nil | |
326 "*Non-nil means, include context with labels in the *toc* buffer. | |
327 Context will only be shown when labels are visible as well. | |
328 This flag can be toggled from within the *toc* buffer with the `c' key." | |
329 :group 'reftex-table-of-contents-browser | |
330 :type 'boolean) | |
331 | |
332 (defcustom reftex-toc-follow-mode nil | |
333 "*Non-nil means, point in *toc* buffer will cause other window to follow. | |
334 The other window will show the corresponding part of the document. | |
335 This flag can be toggled from within the *toc* buffer with the `f' key." | |
336 :group 'reftex-table-of-contents-browser | |
337 :type 'boolean) | |
338 | |
339 (defcustom reftex-revisit-to-follow nil | |
340 "*Non-nil means, follow-mode will revisit files if necessary. | |
341 When nil, follow-mode will be suspended for stuff in unvisited files." | |
342 :group 'reftex-table-of-contents-browser | |
343 :group 'reftex-referencing-labels | |
344 :type 'boolean) | |
345 | |
346 (defcustom reftex-toc-mode-hook nil | |
347 "Mode hook for reftex-toc-mode." | |
348 :group 'reftex-table-of-contents-browser | |
349 :type 'hook) | |
350 | |
351 ;; Label Support Configuration | |
352 | |
353 (defgroup reftex-label-support nil | |
354 "Support for creation, insertion and referencing of labels in LaTeX." | |
355 :group 'reftex) | |
356 | |
357 (defgroup reftex-defining-label-environments nil | |
358 "Definition of environments and macros to do with label." | |
359 :group 'reftex-label-support) | |
360 | |
361 (defcustom reftex-default-label-alist-entries | |
362 '(amsmath endnotes fancybox floatfig longtable picinpar | |
363 rotating sidecap subfigure supertab wrapfig LaTeX) | |
364 "Default label alist specifications. LaTeX should always be the last entry. | |
365 The value of this variable is a list of symbols with associations in the | |
366 constant `reftex-label-alist-builtin'. Check that constant for a full list | |
367 of options." | |
368 :group 'reftex-defining-label-environments | |
369 :set 'reftex-set-dirty | |
370 :type `(set | |
371 :indent 4 | |
372 :inline t | |
373 :greedy t | |
374 ,@(mapcar | |
375 (lambda (x) | |
376 (list 'const :tag (concat (symbol-name (nth 0 x)) | |
377 ": " (nth 1 x)) | |
378 (nth 0 x))) | |
379 reftex-label-alist-builtin))) | |
380 | |
381 (defcustom reftex-label-alist nil | |
382 "Alist with information on environments for \\label-\\ref use. | |
383 | |
384 This docstring is easier to understand after reading the configuration | |
385 examples in `reftex.el'. Looking at the builtin defaults in the constant | |
386 `reftex-label-alist-builtin' may also be instructive. | |
387 | |
388 Set this variable to define additions and changes to the default. The only | |
389 things you MUST NOT change is that `?s' is the type indicator for section | |
390 labels, and SPC for the `any' label type. These are hard-coded at other | |
391 places in the code. | |
392 | |
393 The value of the variable must be a list of items. Each item is a list | |
394 itself and has the following structure: | |
395 | |
396 (ENV-OR-MACRO TYPE-KEY LABEL-PREFIX REFERENCE-FORMAT CONTEXT-METHOD | |
26910
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
397 (MAGIC-WORD ... ) TOC-LEVEL) |
25280 | 398 |
399 Each list entry describes either an environment carrying a counter for use | |
400 with \\label and \\ref, or a LaTeX macro defining a label as (or inside) | |
401 one of its arguments. The elements of each list entry are: | |
402 | |
403 ENV-OR-MACRO | |
404 Name of the environment (like \"table\") or macro (like \"\\\\myfig\"). | |
405 For macros, indicate the macro arguments for best results, as in | |
406 \"\\\\myfig[]{}{}{*}{}\". Use square brackets for optional arguments, | |
407 a star to mark the label argument, if any. The macro does not have to | |
408 have a label argument - you could also use \\label{..} inside one of | |
409 its arguments. | |
410 Special names: `section' for section labels, `any' to define a group | |
411 which contains all labels. | |
412 | |
413 This may also be a function to do local parsing and identify point | |
46155
67fceef3c084
(reftex-label-alist): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
38422
diff
changeset
|
414 to be in a non-standard label environment. The function must take |
25280 | 415 an argument BOUND and limit backward searches to this value. It |
416 should return either nil or a cons cell (FUNCTION . POSITION) with | |
417 the function symbol and the position where the special environment | |
418 starts. See the Info documentation for an example. | |
419 | |
420 Finally this may also be nil if the entry is only meant to change | |
421 some settings associated with the type indicator character (see below). | |
422 | |
423 TYPE-KEY | |
424 Type indicator character, like `?t', must be a printable ASCII character. | |
425 The type indicator is a single character which defines a label type. | |
426 Any label inside the environment or macro is assumed to belong to this | |
427 type. The same character may occur several times in this list, to cover | |
428 cases in which different environments carry the same label type (like | |
429 `equation' and `eqnarray'). | |
430 If the type indicator is nil and the macro has a label argument {*}, | |
37998
706af946b1e7
* reftex-ref.el (reftex-select-label-help): Added "z" key
Carsten Dominik <dominik@science.uva.nl>
parents:
34402
diff
changeset
|
431 the macro defines neutral labels just like \\label. In this case |
25280 | 432 the reminder of this entry is ignored. |
433 | |
434 LABEL-PREFIX | |
435 Label prefix string, like \"tab:\". | |
436 The prefix is a short string used as the start of a label. It may be the | |
437 empty string. The prefix may contain the following `%' escapes: | |
438 %f Current file name with directory and extension stripped. | |
439 %F Current file name relative to directory of master file. | |
440 %u User login name, on systems which support this. | |
441 %S A section prefix derived with variable `reftex-section-prefixes'. | |
442 | |
443 Example: In a file `intro.tex', \"eq:%f:\" will become \"eq:intro:\"). | |
444 | |
445 REFERENCE-FORMAT | |
446 Format string for reference insert in buffer. `%s' will be replaced by | |
447 the label. | |
448 When the format starts with `~', the `~' will only be inserted if | |
449 there is not already a whitespace before point. | |
450 | |
451 CONTEXT-METHOD | |
452 Indication on how to find the short context. | |
453 - If nil, use the text following the \\label{...} macro. | |
454 - If t, use | |
455 - the section heading for section labels. | |
456 - text following the \\begin{...} statement of environments. | |
457 (not a good choice for environments like eqnarray or enumerate, | |
458 where one has several labels in a single environment). | |
459 - text after the macro name (starting with the first arg) for macros. | |
460 - If an integer, use the nth argument of the macro. As a special case, | |
461 1000 means to get text after the last macro argument. | |
462 - If a string, use as regexp to search *backward* from the label. Context | |
463 is then the text following the end of the match. E.g. putting this to | |
464 \"\\\\\\\\caption[[{]\" will use the caption in a figure or table | |
465 environment. | |
466 \"\\\\\\\\begin{eqnarray}\\\\|\\\\\\\\\\\\\\\\\" works for eqnarrays. | |
467 - If any of `caption', `item', `eqnarray-like', `alignat-like', this | |
468 symbol will internally be translated into an appropriate regexp | |
469 (see also the variable `reftex-default-context-regexps'). | |
470 - If a function, call this function with the name of the environment/macro | |
471 as argument. On call, point will be just after the \\label macro. The | |
472 function is expected to return a suitable context string. It should | |
473 throw an exception (error) when failing to find context. | |
474 As an example, here is a function returning the 10 chars following | |
475 the label macro as context: | |
476 | |
477 (defun my-context-function (env-or-mac) | |
478 (if (> (point-max) (+ 10 (point))) | |
479 (buffer-substring (point) (+ 10 (point))) | |
480 (error \"Buffer too small\"))) | |
481 | |
482 Label context is used in two ways by RefTeX: For display in the label | |
483 menu, and to derive a label string. If you want to use a different | |
484 method for each of these, specify them as a dotted pair. | |
485 E.g. `(nil . t)' uses the text after the label (nil) for display, and | |
486 text from the default position (t) to derive a label string. This is | |
487 actually used for section labels. | |
488 | |
489 MAGIC-WORDS | |
490 List of magic words which identify a reference to be of this type. | |
491 If the word before point is equal to one of these words when calling | |
492 `reftex-reference', the label list offered will be automatically | |
493 restricted to labels of the correct type. | |
494 If the first element of this wordlist is the symbol `regexp', the | |
495 strings are interpreted as regular expressions. RefTeX will add | |
496 a \"\\\\W\" to the beginning and other stuff to the end of the regexp. | |
497 | |
26910
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
498 TOC-LEVEL |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
499 The integer level at which this environment should be added to the |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
500 table of contents. See also `reftex-section-levels'. A positive |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
501 value will number the entries mixed with the sectioning commands of |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
502 the same level. A negative value will make unnumbered entries. |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
503 Useful only for theorem-like environments, will be ignored for macros. |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
504 When omitted or nil, no TOC entries will be made. |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
505 |
25280 | 506 If the type indicator characters of two or more entries are the same, RefTeX |
507 will use | |
508 - the first non-nil format and prefix | |
509 - the magic words of all involved entries. | |
510 | |
511 Any list entry may also be a symbol. If that has an association in | |
512 `reftex-label-alist-builtin', the cddr of that association is spliced into the | |
513 list. However, builtin defaults should normally be set with the variable | |
514 `reftex-default-label-alist-entries." | |
515 :group 'reftex-defining-label-environments | |
516 :set 'reftex-set-dirty | |
517 :type | |
518 `(repeat | |
519 (choice :tag "Package or Detailed " | |
520 :value ("" ?a nil nil nil nil) | |
521 (list :tag "Detailed Entry" | |
522 :value ("" ?a nil nil nil nil) | |
523 (choice :tag "Environment or \\macro " | |
524 (const :tag "Ignore, just use typekey" nil) | |
525 (string "") | |
526 (symbol :tag "Special parser" my-parser)) | |
527 (choice :tag "Type specification " | |
528 (const :tag "unspecified, like in \\label" nil) | |
529 (character :tag "Char " ?a)) | |
530 (choice :tag "Label prefix string " | |
531 (const :tag "Default" nil) | |
532 (string :tag "String" "lab:")) | |
533 (choice :tag "Label reference format" | |
534 (const :tag "Default" nil) | |
535 (string :tag "String" "~\\ref{%s}")) | |
536 (choice :tag "Context method " | |
537 (const :tag "Default position" t) | |
538 (const :tag "After label" nil) | |
539 (number :tag "Macro arg nr" 1) | |
540 (regexp :tag "Regexp" "") | |
541 (const :tag "Caption in float" caption) | |
542 (const :tag "Item in list" item) | |
543 (const :tag "Eqnarray-like" eqnarray-like) | |
544 (const :tag "Alignat-like" alignat-like) | |
545 (symbol :tag "Function" my-func)) | |
26910
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
546 (repeat :tag "Magic words" :extra-offset 2 (string)) |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
547 (option (choice :tag "Make TOC entry " |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
548 (const :tag "No entry" nil) |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
549 (integer :tag "Level" :value -3)))) |
25280 | 550 (choice |
551 :tag "Package" | |
552 :value AMSTeX | |
553 ,@(mapcar | |
554 (lambda (x) | |
555 (list 'const :tag (concat (symbol-name (nth 0 x))) | |
556 (nth 0 x))) | |
557 reftex-label-alist-builtin))))) | |
558 | |
559 (defcustom reftex-section-prefixes '((0 . "part:") (1 . "cha:") (t . "sec:")) | |
560 "Prefixes for section labels. | |
561 When the label prefix given in an entry in `reftex-label-alist' contains `%S', | |
562 this list is used to determine the correct prefix string depending on the | |
563 current section level. | |
564 The list is an alist, with each entry of the form (KEY . PREFIX) | |
565 Possible keys are sectioning macro names like `chapter', section levels | |
566 (as given in `reftex-section-levels'), and t for the default." | |
567 :group 'reftex-defining-label-environments | |
568 :type '(repeat | |
569 (cons :value (0 . "") | |
570 (choice | |
571 (string :tag "macro name") | |
572 (integer :tag "section level") | |
573 (const :tag "default" t)) | |
574 (string :tag "Prefix")))) | |
575 | |
576 (defcustom reftex-default-context-regexps | |
577 '((caption . "\\\\\\(rot\\)?caption\\*?[[{]") | |
578 (item . "\\\\item\\(\\[[^]]*\\]\\)?") | |
579 (eqnarray-like . "\\\\begin{%s}\\|\\\\\\\\") | |
580 (alignat-like . "\\\\begin{%s}{[0-9]*}\\|\\\\\\\\")) | |
581 "Alist with default regular expressions for finding context. | |
582 The form (format regexp (regexp-quote environment)) is used to calculate | |
583 the final regular expression - so %s will be replaced with the environment | |
584 or macro." | |
585 :group 'reftex-defining-label-environments | |
586 :type '(repeat (cons (symbol) (regexp)))) | |
587 | |
588 (defcustom reftex-special-environment-functions nil | |
589 "List of functions to be called when trying to figure out current environment. | |
590 These are special functions to detect \"environments\" which do not | |
591 start with \\begin and end with \\end. Some LaTeX packages seem to | |
592 use such non-standard ways to set up environment-like constructs. The | |
593 purpose of each function in this list is to detect if point is | |
594 currently inside such a special \"environment\". If the environment | |
595 carries a label, you must also set up an entry for it in | |
596 `reftex-label-alist'. | |
597 | |
598 The function should check if point is currently in the special | |
599 environment it was written to detect. If so, the function must return | |
600 a cons cell (NAME . POSITION). NAME is the name of the environment | |
601 detected and POSITION is the buffer position where the environment | |
602 starts. The function must return nil on failure to detect the | |
603 environment. | |
604 | |
605 The function must take an argument BOUND. If non-nil, BOUND is a | |
606 boundary for backwards searches which should be observed. | |
607 | |
608 Here is an example. The LaTeX package linguex.sty defines list macros | |
609 `\\ex.', `\\a.', etc for lists which are terminated by `\\z.' or an empty | |
610 line. | |
611 | |
612 \\ex. \\label{ex:12} Some text in an exotic language ... | |
613 \\a. \\label{ex:13} more stuff | |
614 \\b. \\label{ex:14} still more stuff | |
615 | |
616 ... more text after the empty line terminating all lists | |
617 | |
618 And here is the setup for RefTeX: | |
619 | |
620 1. Define a dummy environment for this in `reftex-label-alist'. Dummy means, | |
621 make up an environment name even though it is not used with \\begin and | |
622 \\end. Here we use \"linguex\" as this name. | |
623 | |
624 (setq reftex-label-alist | |
625 '((\"linguex\" ?x \"ex:\" \"~\\\\ref{%s}\" nil (\"Example\" \"Ex.\")))) | |
626 | |
627 2. Write a function to detect the list macros and the determinators as well. | |
628 | |
629 (defun my-detect-linguex-list (bound) | |
630 (let ((pos (point)) p1) | |
631 (save-excursion | |
632 ;; Search for any of the linguex item macros at the beginning of a line | |
633 (if (re-search-backward | |
634 \"^[ \\t]*\\\\(\\\\\\\\\\\\(ex\\\\|a\\\\|b\\\\|c\\\\|d\\\\|e\\\\|f\\\\)g?\\\\.\\\\)\" bound t) | |
635 (progn | |
636 (setq p1 (match-beginning 1)) | |
637 ;; Make sure no empty line or \\z. is between us and the item macro | |
638 (if (re-search-forward \"\\n[ \\t]*\\n\\\\|\\\\\\\\z\\\\.\" pos t) | |
639 ;; Return nil because list was already closed | |
640 nil | |
641 ;; OK, we got it | |
642 (cons \"linguex\" p1))) | |
643 ;; Return nil for not found | |
644 nil)))) | |
645 | |
646 3. Tell RefTeX to use this function | |
647 | |
648 (setq reftex-special-environment-functions '(my-detect-linguex-list)) | |
649 " | |
650 :group 'reftex-defining-label-environments | |
651 :type 'hook) | |
652 | |
653 ;; Label insertion | |
654 | |
655 (defgroup reftex-making-and-inserting-labels nil | |
656 "Options on how to create new labels." | |
657 :group 'reftex-label-support) | |
658 | |
659 (defcustom reftex-insert-label-flags '("s" "sft") | |
660 "Flags governing label insertion. First flag DERIVE, second flag PROMPT. | |
661 | |
662 If DERIVE is t, RefTeX will try to derive a sensible label from context. | |
663 A section label for example will be derived from the section heading. | |
664 The conversion of the context to a legal label is governed by the | |
665 specifications given in `reftex-derive-label-parameters'. | |
666 If RefTeX fails to derive a label, it will prompt the user. | |
667 If DERIVE is nil, the label generated will consist of the prefix and a | |
668 unique number, like `eq:23'. | |
669 | |
670 If PROMPT is t, the user will be prompted for a label string. The prompt will | |
671 already contain the prefix, and (if DERIVE is t) a default label derived from | |
672 context. When PROMPT is nil, the default label will be inserted without | |
673 query. | |
674 | |
675 So the combination of DERIVE and PROMPT controls label insertion. Here is a | |
676 table describing all four possibilities: | |
677 | |
678 DERIVE PROMPT ACTION | |
679 ------------------------------------------------------------------------- | |
680 nil nil Insert simple label, like eq:22 or sec:13. No query. | |
681 nil t Prompt for label. | |
682 t nil Derive a label from context and insert without query. | |
683 t t Derive a label from context and prompt for confirmation. | |
684 | |
685 Each flag may be set to t, nil, or a string of label type letters | |
686 indicating the label types for which it should be true. The strings work | |
687 like character classes. | |
688 Thus, the combination may be set differently for each label type. The | |
689 default settings \"s\" and \"sft\" mean: Derive section labels from headings | |
690 (with confirmation). Prompt for figure and table labels. Use simple labels | |
691 without confirmation for everything else. | |
692 The available label types are: s (section), f (figure), t (table), i (item), | |
693 e (equation), n (footnote), N (endnote), plus any definitions in | |
694 `reftex-label-alist'." | |
695 :group 'reftex-making-and-inserting-labels | |
696 :type '(list (choice :tag "Derive label from context" | |
697 (const :tag "always" t) | |
698 (const :tag "never" nil) | |
699 (string :tag "selected label types" "")) | |
700 (choice :tag "Prompt for label string " | |
701 :entry-format " %b %v" | |
702 (const :tag "always" t) | |
703 (const :tag "never" nil) | |
704 (string :tag "selected label types" "")))) | |
705 | |
706 (defcustom reftex-string-to-label-function 'reftex-string-to-label | |
707 "Function to turn an arbitrary string into a legal label. | |
708 RefTeX's default function uses the variable `reftex-derive-label-parameters'." | |
709 :group 'reftex-making-and-inserting-labels | |
710 :type 'symbol) | |
711 | |
712 (defcustom reftex-translate-to-ascii-function 'reftex-latin1-to-ascii | |
713 "Filter function which will process a context string before it is used | |
714 to derive a label from it. The intended application is to convert ISO or | |
715 Mule characters into something legal in labels. The default function | |
716 removes the accents from Latin-1 characters. X-Symbol (>=2.6) sets this | |
717 variable to the much more general `x-symbol-translate-to-ascii'." | |
718 :group 'reftex-making-and-inserting-labels | |
719 :type 'symbol) | |
720 | |
721 (defcustom reftex-derive-label-parameters '(3 20 t 1 "-" | |
722 ("the" "on" "in" "off" "a" "for" "by" "of" "and" "is" "to") t) | |
723 "Parameters for converting a string into a label. | |
724 This variable is a list of the following items. | |
725 | |
726 NWORDS Number of words to use. | |
727 MAXCHAR Maximum number of characters in a label string. | |
728 ILLEGAL nil: Throw away any words containing characters illegal in labels. | |
729 t: Throw away only the illegal characters, not the whole word. | |
730 ABBREV nil: Never abbreviate words. | |
731 t: Always abbreviate words (see `reftex-abbrev-parameters'). | |
732 not t and not nil: Abbreviate words if necessary to shorten | |
733 label string below MAXCHAR. | |
734 SEPARATOR String separating different words in the label. | |
735 IGNOREWORDS List of words which should not be part of labels. | |
736 DOWNCASE t: Downcase words before using them." | |
737 :group 'reftex-making-and-inserting-labels | |
738 :type '(list (integer :tag "Number of words " 3) | |
739 (integer :tag "Maximum label length " 20) | |
740 (choice :tag "Illegal characters in words" | |
741 (const :tag "throw away entire word" nil) | |
742 (const :tag "throw away single chars" t)) | |
743 (choice :tag "Abbreviate words " | |
744 (const :tag "never" nil) | |
745 (const :tag "always" t) | |
746 (const :tag "when label is too long" 1)) | |
747 (string :tag "Separator between words " "-") | |
748 (repeat :tag "Ignore words" | |
749 :entry-format " %i %d %v" | |
750 (string :tag "")) | |
751 (option (boolean :tag "Downcase words ")))) | |
752 | |
753 (defcustom reftex-label-illegal-re "[^-a-zA-Z0-9_+=:;,.]" | |
754 "Regexp matching characters not legal in labels." | |
755 :group 'reftex-making-and-inserting-labels | |
756 :type '(regexp :tag "Regular Expression")) | |
757 | |
758 (defcustom reftex-abbrev-parameters '(4 2 "^aeiou" "aeiou") | |
759 "Parameters for abbreviation of words. | |
760 This variable is a list of the following items. | |
761 | |
762 MIN-CHARS Minimum number of characters remaining after abbreviation. | |
763 MIN-KILL Minimum number of characters to remove when abbreviating words. | |
764 BEFORE Character class before abbrev point in word. | |
765 AFTER Character class after abbrev point in word." | |
766 :group 'reftex-making-and-inserting-labels | |
767 :type '(list | |
768 (integer :tag "Minimum chars per word" 4) | |
769 (integer :tag "Shorten by at least " 2) | |
770 (string :tag "cut before char class " "^saeiou") | |
771 (string :tag "cut after char class " "aeiou"))) | |
772 | |
773 (defcustom reftex-format-label-function nil | |
774 "Function which produces the string to insert as a label definition. | |
775 Normally should be nil, unless you want to do something fancy. | |
776 The function will be called with two arguments, the LABEL and the DEFAULT | |
37998
706af946b1e7
* reftex-ref.el (reftex-select-label-help): Added "z" key
Carsten Dominik <dominik@science.uva.nl>
parents:
34402
diff
changeset
|
777 FORMAT, which usually is `\\label{%s}'. The function should return the |
25280 | 778 string to insert into the buffer." |
779 :group 'reftex-making-and-inserting-labels | |
780 :type 'function) | |
781 | |
782 ;; Label referencing | |
783 | |
784 (defgroup reftex-referencing-labels nil | |
785 "Options on how to reference labels." | |
786 :group 'reftex-label-support) | |
787 | |
788 (eval-and-compile | |
789 (defconst reftex-tmp | |
790 '((const :tag "on" t) | |
791 (const :tag "off" nil) | |
792 (string :tag "Selected label types")))) | |
793 | |
794 (defcustom reftex-label-menu-flags '(t t nil nil nil nil t nil) | |
795 "List of flags governing the label menu makeup. | |
796 The flags are: | |
797 | |
798 TABLE-OF-CONTENTS Show the labels embedded in a table of context. | |
799 SECTION-NUMBERS Include section numbers (like 4.1.3) in table of contents. | |
800 COUNTERS Show counters. This just numbers the labels in the menu. | |
801 NO-CONTEXT Non-nil means do NOT show the short context. | |
802 FOLLOW Follow full context in other window. | |
803 SHOW-COMMENTED Show labels from regions which are commented out. | |
804 MATCH-IN-TOC Obsolete flag. | |
805 SHOW FILES Show begin and end of included files. | |
806 | |
807 Each of these flags can be set to t or nil, or to a string of type letters | |
808 indicating the label types for which it should be true. These strings work | |
809 like character classes in regular expressions. Thus, setting one of the | |
810 flags to \"sf\" makes the flag true for section and figure labels, nil | |
811 for everything else. Setting it to \"^sf\" makes it the other way round. | |
812 The available label types are: s (section), f (figure), t (table), i (item), | |
813 e (equation), n (footnote), plus any definitions in `reftex-label-alist'. | |
814 | |
815 Most options can also be switched from the label menu itself - so if you | |
816 decide here to not have a table of contents in the label menu, you can still | |
817 get one interactively during selection from the label menu." | |
818 :group 'reftex-referencing-labels | |
819 :type | |
820 `(list | |
821 (choice :tag "Embed in table of contents " ,@reftex-tmp) | |
822 (choice :tag "Show section numbers " ,@reftex-tmp) | |
823 (choice :tag "Show individual counters " ,@reftex-tmp) | |
824 (choice :tag "Hide short context " ,@reftex-tmp) | |
825 (choice :tag "Follow context in other window " ,@reftex-tmp) | |
826 (choice :tag "Show commented labels " ,@reftex-tmp) | |
47287
0964618b0e97
(reftex-label-menu-flags): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47050
diff
changeset
|
827 (choice :tag "Obsolete flag. Don't use. " ,@reftex-tmp) |
25280 | 828 (choice :tag "Show begin/end of included files" ,@reftex-tmp))) |
829 | |
830 (defcustom reftex-multiref-punctuation '((?, . ", ") (?- . "--") (?+ . " and ")) | |
831 "Punctuation strings for multiple references. | |
832 When marking is used in the selection buffer to select several references, | |
833 this variable associates the 3 marking characters `,-+' with prefix strings | |
37998
706af946b1e7
* reftex-ref.el (reftex-select-label-help): Added "z" key
Carsten Dominik <dominik@science.uva.nl>
parents:
34402
diff
changeset
|
834 to be inserted into the buffer before the corresponding \\ref macro. |
25280 | 835 This is used to string together whole reference sets, like |
836 `eqs. 1,2,3-5,6 and 7' in a single call to `reftex-reference'. See manual." | |
837 :group 'reftex-referencing-labels | |
838 :type '(repeat (cons (character) (string)))) | |
839 | |
840 (defcustom reftex-vref-is-default nil | |
841 "*Non-nil means, the varioref macro \\vref is used as default. | |
842 In the selection buffer, the `v' key toggles the reference macro between | |
843 `\\ref' and `\\vref'. The value of this variable determines the default | |
844 which is active when entering the selection process. | |
845 Instead of nil or t, this may also be a string of type letters indicating | |
846 the label types for which it should be true." | |
847 :group 'reftex-referencing-labels | |
848 :type `(choice :tag "\\vref is default macro" ,@reftex-tmp)) | |
849 | |
850 (defcustom reftex-fref-is-default nil | |
851 "*Non-nil means, the fancyref macro \\fref is used as default. | |
852 In the selection buffer, the `V' key toggles the reference macro between | |
853 `\\ref', `\\fref' and `\\Fref'. The value of this variable determines | |
854 the default which is active when entering the selection process. | |
855 Instead of nil or t, this may also be a string of type letters indicating | |
856 the label types for which it should be true." | |
857 :group 'reftex-referencing-labels | |
858 :type `(choice :tag "\\fref is default macro" ,@reftex-tmp)) | |
859 | |
860 (defcustom reftex-level-indent 2 | |
861 "*Number of spaces to be used for indentation per section level." | |
862 :group 'reftex-referencing-labels | |
863 :type 'integer) | |
864 | |
865 (defcustom reftex-guess-label-type t | |
866 "*Non-nil means, `reftex-reference' will try to guess the label type. | |
867 To do that, RefTeX will look at the word before the cursor and compare it with | |
868 the words given in `reftex-label-alist'. When it finds a match, RefTeX will | |
869 immediately offer the correct label menu - otherwise it will prompt you for | |
870 a label type. If you set this variable to nil, RefTeX will always prompt." | |
871 :group 'reftex-referencing-labels | |
872 :type 'boolean) | |
873 | |
874 (defcustom reftex-format-ref-function nil | |
875 "Function which produces the string to insert as a reference. | |
876 Normally should be nil, because the format to insert a reference can | |
877 already be specified in `reftex-label-alist'. | |
37998
706af946b1e7
* reftex-ref.el (reftex-select-label-help): Added "z" key
Carsten Dominik <dominik@science.uva.nl>
parents:
34402
diff
changeset
|
878 This hook also is used by the special commands to insert `\\vref' and `\\fref' |
25280 | 879 references, so even if you set this, your setting will be ignored by |
880 the special commands. | |
881 The function will be called with two arguments, the LABEL and the DEFAULT | |
37998
706af946b1e7
* reftex-ref.el (reftex-select-label-help): Added "z" key
Carsten Dominik <dominik@science.uva.nl>
parents:
34402
diff
changeset
|
882 FORMAT, which normally is `~\\ref{%s}'. The function should return the |
25280 | 883 string to insert into the buffer." |
884 :group 'reftex-referencing-labels | |
885 :type 'function) | |
886 | |
887 (defcustom reftex-select-label-mode-hook nil | |
888 "Mode hook for reftex-select-label-mode." | |
889 :group 'reftex-referencing-labels | |
890 :type 'hook) | |
891 | |
892 ;; BibteX citation configuration ---------------------------------------- | |
893 | |
894 (defgroup reftex-citation-support nil | |
895 "Support for referencing bibliographic data with BibTeX." | |
896 :group 'reftex) | |
897 | |
46612
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
898 (defcustom reftex-bibliography-commands '("bibliography" "nobibliography") |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
899 "LaTeX commands which specify the BibTeX databases to use with the document." |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
900 :group 'reftex-citation-support |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
901 :type '(repeat string)) |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
902 |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
903 |
25280 | 904 (defvar reftex-bibfile-ignore-list nil) ; compatibility |
905 (defcustom reftex-bibfile-ignore-regexps nil | |
906 "*List of regular expressions to exclude files in \\bibliography{..}. | |
907 File names matched by these regexps will not be parsed by RefTeX. | |
908 Intended for files which contain only `@string' macro definitions and the | |
909 like, which are ignored by RefTeX anyway." | |
910 :group 'reftex-citation-support | |
911 :set 'reftex-set-dirty | |
912 :type '(repeat (regexp))) | |
913 | |
914 (defcustom reftex-default-bibliography nil | |
915 "*List of BibTeX database files which should be used if none are specified. | |
916 When `reftex-citation' is called from a document which has neither a | |
37998
706af946b1e7
* reftex-ref.el (reftex-select-label-help): Added "z" key
Carsten Dominik <dominik@science.uva.nl>
parents:
34402
diff
changeset
|
917 `\\bibliography{..}' statement nor a `thebibliography' environment, |
25280 | 918 RefTeX will scan these files instead. Intended for using `reftex-citation' |
919 in non-LaTeX files. The files will be searched along the BIBINPUTS or TEXBIB | |
920 path." | |
921 :group 'reftex-citation-support | |
922 :type '(repeat (file))) | |
923 | |
924 (defcustom reftex-sort-bibtex-matches 'reverse-year | |
925 "*Sorting of the entries found in BibTeX databases by reftex-citation. | |
926 Possible values: | |
927 nil Do not sort entries. | |
928 'author Sort entries by author name. | |
929 'year Sort entries by increasing year. | |
930 'reverse-year Sort entries by decreasing year." | |
931 :group 'reftex-citation-support | |
932 :type '(choice (const :tag "not" nil) | |
933 (const :tag "by author" author) | |
934 (const :tag "by year" year) | |
935 (const :tag "by year, reversed" reverse-year))) | |
936 | |
937 (defcustom reftex-cite-format 'default | |
938 "*The format of citations to be inserted into the buffer. | |
939 It can be a string or an alist or a symbol. In the simplest case this | |
940 is just the string \"\\cite{%l}\", which is also the default. See the | |
941 definition of `reftex-cite-format-builtin' for more complex examples. | |
942 | |
943 If `reftex-cite-format' is a string, it will be used as the format. | |
944 In the format, the following percent escapes will be expanded. | |
945 | |
946 %l The BibTeX label of the citation. | |
46612
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
947 %a List of author names, see also `reftex-cite-punctuation'. |
25280 | 948 %2a Like %a, but abbreviate more than 2 authors like Jones et al. |
949 %A First author name only. | |
950 %e Works like %a, but on list of editor names. (%2e and %E work a well) | |
951 | |
952 It is also possible to access all other BibTeX database fields: | |
953 %b booktitle %c chapter %d edition %h howpublished | |
954 %i institution %j journal %k key %m month | |
955 %n number %o organization %p pages %P first page | |
956 %r address %s school %u publisher %t title | |
957 %v volume %y year | |
958 %B booktitle, abbreviated %T title, abbreviated | |
959 | |
960 Usually, only %l is needed. The other stuff is mainly for the echo area | |
961 display, and for (setq reftex-comment-citations t). | |
962 | |
963 %< as a special operator kills punctuation and space around it after the | |
964 string has been formatted. | |
965 | |
966 Beware that all this only works with BibTeX database files. When | |
967 citations are made from the \\bibitems in an explicit thebibliography | |
968 environment, only %l is available. | |
969 | |
970 If `reftex-cite-format' is an alist of characters and strings, the user | |
971 will be prompted for a character to select one of the possible format | |
972 strings. | |
973 In order to configure this variable, you can either set | |
974 `reftex-cite-format' directly yourself or set it to the SYMBOL of one of | |
975 the predefined styles. The predefined symbols are those which have an | |
976 association in the constant `reftex-cite-format-builtin'. | |
977 E.g.: (setq reftex-cite-format 'natbib)" | |
978 :group 'reftex-citation-support | |
979 :type | |
980 `(choice | |
981 :format "%{%t%}: \n%[Value Menu%] %v" | |
982 (radio :tag "Symbolic Builtins" | |
983 :indent 4 | |
984 :value default | |
985 ,@(mapcar | |
986 (lambda (x) | |
987 (list 'const :tag (concat (symbol-name (nth 0 x)) | |
988 ": " (nth 1 x)) | |
989 (nth 0 x))) | |
990 reftex-cite-format-builtin)) | |
991 (string :tag "format string" "\\cite{%l}") | |
992 (repeat :tag "key-ed format strings" | |
993 :value ((?\r . "\\cite{%l}") | |
994 (?t . "\\cite{%l}") (?p . "\\cite{%l}")) | |
995 (cons (character :tag "Key character" ?\r) | |
996 (string :tag "Format string" ""))))) | |
997 | |
998 (defcustom reftex-comment-citations nil | |
999 "*Non-nil means add a comment for each citation describing the full entry. | |
1000 The comment is formatted according to `reftex-cite-comment-format'." | |
1001 :group 'reftex-citation-support | |
1002 :type 'boolean) | |
1003 | |
1004 (defcustom reftex-cite-comment-format | |
1005 "%% %2a %y, %j %v, %P, %b, %e, %u, %s %<\n" | |
1006 "Citation format used for commented citations. Must NOT contain %l. | |
1007 See the variable `reftex-cite-format' for possible percent escapes." | |
1008 :group 'reftex-citation-support | |
1009 :type 'string) | |
1010 | |
1011 (defcustom reftex-cite-view-format "%2a %y, %T, %B, %j %v:%P, %s %<" | |
1012 "Citation format used to display citation info in the message area. | |
1013 Must NOT contain %l. See the variable `reftex-cite-format' for | |
1014 possible percent escapes." | |
1015 :group 'reftex-citation-support | |
1016 :group 'reftex-viewing-cross-references | |
1017 :type 'string) | |
1018 | |
1019 (defcustom reftex-cite-punctuation '(", " " \\& " " {\\it et al.}") | |
1020 "Punctuation for formatting of name lists in citations. | |
1021 This is a list of 3 strings. | |
1022 1. normal names separator, like \", \" in Jones, Brown and Miller | |
1023 2. final names separator, like \" and \" in Jones, Brown and Miller | |
1024 3. The \"et al\" string, like \" {\\it et al.}\" in Jones {\\it et al.}" | |
1025 :group 'reftex-citation-support | |
1026 :type '(list | |
1027 (string :tag "Separator for names ") | |
1028 (string :tag "Separator for last name in list") | |
1029 (string :tag "string used as et al. "))) | |
1030 | |
1031 (defcustom reftex-format-cite-function nil | |
1032 "Function which produces the string to insert as a citation. | |
1033 Normally should be nil, because the format to insert a reference can | |
1034 already be specified in `reftex-cite-format'. | |
1035 The function will be called with two arguments, the CITATION KEY and the | |
1036 DEFAULT FORMAT, which is taken from `reftex-cite-format'. The function | |
1037 should return the string to insert into the buffer." | |
1038 :group 'reftex-citation-support | |
1039 :type 'function) | |
1040 | |
1041 (defcustom reftex-select-bib-mode-hook nil | |
1042 "Mode hook for reftex-select-bib-mode." | |
1043 :group 'reftex-citation-support | |
1044 :type 'hook) | |
1045 | |
1046 ;; Index Support Configuration | |
1047 | |
1048 (defgroup reftex-index-support nil | |
1049 "Support for viewing and editing the index." | |
1050 :group 'reftex) | |
1051 | |
1052 (defcustom reftex-support-index t | |
1053 "*Non-nil means, index entries are parsed as well. | |
1054 Index support is resource intensive and the internal structure holding the | |
1055 parsed information can become quite big. Therefore it can be turned off. | |
1056 When this is nil and you execute a command which requires index support, | |
1057 you will be asked for confirmation to turn it on and rescan the document." | |
1058 :group 'reftex-index-support | |
1059 :type 'boolean) | |
1060 | |
1061 (defcustom reftex-index-special-chars '("!" "|" "@" "\"" "\\") | |
1062 "Special characters in index entries. The value is a list of five strings. | |
1063 These correspond to the makeindex keywords LEVEL ENCAP ACTUAL QUOTE ESCAPE." | |
1064 :group 'reftex-index-support | |
1065 :type '(list | |
1066 (string :tag "LEVEL separator") | |
1067 (string :tag "ENCAP char ") | |
1068 (string :tag "ACTUAL char ") | |
1069 (string :tag "QUOTE char ") | |
1070 (string :tag "ESCAPE char "))) | |
1071 | |
1072 (defcustom reftex-index-macros nil | |
1073 "Macros which define index entries. The structure is | |
1074 | |
26910
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1075 (MACRO INDEX-TAG KEY PREFIX EXCLUDE REPEAT) |
25280 | 1076 |
1077 MACRO is the macro. Arguments should be denoted by empty braces like | |
1078 \\index[]{*}. Use square brackets to denote optional arguments. The star | |
1079 marks where the index key is. | |
1080 | |
1081 INDEX-TAG is a short name of the index. \"idx\" and \"glo\" are | |
1082 reserved for the default index and the glossary. Other indices can be | |
1083 defined as well. If this is an integer, the Nth argument of the macro | |
1084 holds the index tag. | |
1085 | |
1086 KEY is a character which is used to identify the macro for input with | |
1087 \\[reftex-index]. ?i, ?I, and ?g are reserved for default index and glossary. | |
1088 | |
1089 PREFIX can be a prefix which is added to the KEY part of the index entry. | |
1090 If you have a macro \\newcommand{\\molec}[1]{#1\\index{Molecules!#1}}, this | |
1091 prefix should be \"Molecules!\". See the manual for details. | |
1092 | |
1093 EXCLUDE can be a function. If this function exists and returns a non-nil | |
1094 value, the index entry at point is ignored. This was implemented to support | |
1095 the (deprecated) `^' and `_' shortcuts in the LaTeX2e `index' package. | |
1096 | |
26910
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1097 REPEAT, if non-nil, means the index macro does not typeset the entry in |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1098 the text, so that the text has to be repeated outside the index macro. |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1099 Needed for `reftex-index-selection-or-word' and for indexing from the |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1100 phrase buffer. |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1101 |
25280 | 1102 The final entry may also be a symbol if this entry has a association |
1103 in the variable `reftex-index-macros-builtin' to specify the main | |
1104 indexing package you are using. Legal values are currently | |
1105 default The LaTeX default - unnecessary to specify this one | |
1106 multind The multind.sty package | |
1107 index The index.sty package | |
1108 index-shortcut The index.sty packages with the ^ and _ shortcuts. | |
1109 Should not be used - only for old documents. | |
1110 Note that AUCTeX sets these things internally for RefTeX as well, so | |
1111 with a sufficiently new version of AUCTeX, you should not set the | |
1112 package here." | |
1113 :group 'reftex-index-support | |
1114 :set 'reftex-set-dirty | |
1115 :type `(list | |
1116 (repeat | |
1117 :inline t | |
1118 (list :value ("" "idx" ?a "" nil) | |
26910
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1119 (string :tag "Macro with args") |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1120 (choice :tag "Index Tag " |
25280 | 1121 (string) |
1122 (integer :tag "Macro arg Nr" :value 1)) | |
1123 (character :tag "Access Key ") | |
26910
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1124 (string :tag "Key Prefix ") |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1125 (symbol :tag "Exclusion hook ") |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1126 (boolean :tag "Repeat Outside "))) |
25280 | 1127 (option |
1128 :tag "Package:" | |
1129 (choice :tag "Package" | |
1130 :value index | |
1131 ,@(mapcar | |
1132 (lambda (x) | |
1133 (list 'const :tag (concat (symbol-name (nth 0 x)) | |
1134 ": " (nth 1 x)) | |
1135 (nth 0 x))) | |
1136 reftex-index-macros-builtin))))) | |
1137 | |
26910
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1138 (defcustom reftex-index-default-macro '(?i "idx") |
25280 | 1139 "The default index macro for \\[reftex-index-selection-or-word]. |
26910
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1140 This is a list with (MACRO-KEY DEFAULT-TAG). |
25280 | 1141 |
1142 MACRO-KEY: Character identifying an index macro - see `reftex-index-macros'. | |
1143 DEFAULT-TAG: This is the tag to be used if the macro requires a TAG argument. | |
1144 When this is nil and a TAG is needed, RefTeX will ask for it. | |
1145 When this is the empty string and the TAG argument of the index | |
26910
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1146 macro is optional, the TAG argument will be omitted." |
25280 | 1147 :group 'reftex-index-support |
1148 :type '(list | |
1149 (character :tag "Character identifying default macro") | |
1150 (choice :tag "Default index tag " | |
1151 (const nil) | |
26910
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1152 (string)))) |
25280 | 1153 |
1154 (defcustom reftex-index-default-tag "idx" | |
1155 "Default index tag. | |
1156 When working with multiple indexes, RefTeX queries for an index tag when | |
1157 creating index entries or displaying a specific index. This variable controls | |
1158 the default offered for these queries. The default can be selected with RET | |
1159 during selection or completion. Legal values of this variable are: | |
1160 | |
1161 nil Do not provide a default index | |
1162 \"tag\" The default index tag given as a string, e.g. \"idx\". | |
1163 last The last used index tag will be offered as default." | |
1164 :group 'reftex-index-support | |
1165 :type '(choice | |
1166 (const :tag "no default" nil) | |
1167 (const :tag "last used " 'last) | |
1168 (string :tag "index tag " "idx"))) | |
1169 | |
1170 (defcustom reftex-index-math-format "$%s$" | |
1171 "Format of index entries when copied from inside math mode. | |
1172 When `reftex-index-selection-or-word' is executed inside TeX math mode, | |
1173 the index key copied from the buffer is processed with this format string | |
1174 through the `format' function. This can be used to add the math delimiters | |
1175 (e.g. `$') to the string. | |
1176 Requires the `texmathp.el' library which is part of AUCTeX." | |
1177 :group 'reftex-index-support | |
1178 :type 'string) | |
1179 | |
27192
f70a80cecdd3
New version number.
Carsten Dominik <dominik@science.uva.nl>
parents:
27035
diff
changeset
|
1180 (defcustom reftex-index-phrase-file-extension ".rip" |
f70a80cecdd3
New version number.
Carsten Dominik <dominik@science.uva.nl>
parents:
27035
diff
changeset
|
1181 "File extension for the index phrase file. |
f70a80cecdd3
New version number.
Carsten Dominik <dominik@science.uva.nl>
parents:
27035
diff
changeset
|
1182 This extension will be added to the base name of the master file." |
f70a80cecdd3
New version number.
Carsten Dominik <dominik@science.uva.nl>
parents:
27035
diff
changeset
|
1183 :group 'reftex-index-support |
f70a80cecdd3
New version number.
Carsten Dominik <dominik@science.uva.nl>
parents:
27035
diff
changeset
|
1184 :type 'string) |
f70a80cecdd3
New version number.
Carsten Dominik <dominik@science.uva.nl>
parents:
27035
diff
changeset
|
1185 |
26910
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1186 (defcustom reftex-index-phrases-logical-and-regexp " *&& *" |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1187 "Regexp matching the `and' operator for index arguments in phrases file. |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1188 When several index arguments in a phrase line are separated by this |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1189 operator, each part will generate an index macro. So each match of |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1190 the search phrase will produce *several* different index entries. |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1191 |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1192 Note: make sure this does no match things which are not separators. |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1193 This logical `and' has higher priority than the logical `or' specified in |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1194 `reftex-index-phrases-logical-or-regexp'." |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1195 :group 'reftex-index-support |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1196 :type 'regexp) |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1197 |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1198 (defcustom reftex-index-phrases-logical-or-regexp " *|| *" |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1199 "Regexp matching the `or' operator for index arguments in phrases file. |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1200 When several index arguments in a phrase line are separated by this |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1201 operator, the user will be asked to select one of them at each match |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1202 of the search phrase. The first index arg will be the default - a |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1203 number key 1-9 must be pressed to switch to another. |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1204 |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1205 Note: make sure this does no match things which are not separators. |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1206 The logical `and' specified in `reftex-index-phrases-logical-or-regexp' |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1207 has higher priority than this logical `or'." |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1208 :group 'reftex-index-support |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1209 :type 'regexp) |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1210 |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1211 (defcustom reftex-index-phrases-search-whole-words t |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1212 "*Non-nil means phrases search will look for whole words, not subwords. |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1213 This works by requiring word boundaries at the beginning and end of |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1214 the search string. When the search phrase already has a non-word-char |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1215 at one of these points, no word boundary is required there." |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1216 :group 'reftex-index-support |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1217 :type 'boolean) |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1218 |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1219 (defcustom reftex-index-phrases-case-fold-search t |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1220 "*Non-nil means, searching for index phrases will ignore case." |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1221 :group 'reftex-index-support |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1222 :type 'boolean) |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1223 |
46612
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
1224 (defcustom reftex-index-verify-function nil |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
1225 "A function which is called at each match during global indexing. |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
1226 If the function returns nil, the current match is skipped." |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
1227 :group 'reftex-index-support |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
1228 :type '(choice |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
1229 (const :tag "No verification" nil) |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
1230 (function))) |
7522419c4db0
Updated to reftex 4.17
Carsten Dominik <dominik@science.uva.nl>
parents:
46155
diff
changeset
|
1231 |
26910
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1232 (defcustom reftex-index-phrases-skip-indexed-matches nil |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1233 "*Non-nil means, skip matches which appear to be indexed already. |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1234 When doing global indexing from the phrases buffer, searches for some |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1235 phrases may match at places where that phrase was already indexed. In |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1236 particular when indexing an already processed document again, this |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1237 will even be the norm. When this variable is non-nil, RefTeX checks if |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1238 the match is an index macro argument, or if an index macro is directly |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1239 before or after the phrase. If that is the case, that match will |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1240 be ignored." |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1241 :group 'reftex-index-support |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1242 :type 'boolean) |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1243 |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1244 (defcustom reftex-index-phrases-wrap-long-lines nil |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1245 "*Non-nil means, when indexing from the phrases buffer, wrap lines. |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1246 Inserting indexing commands in a line makes the line longer - often |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1247 so long that it does not fit onto the screen. When this variable is |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1248 non-nil, newlines will be added as necessary before and/or after the |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1249 indexing command to keep lines short. However, the matched text |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1250 phrase and its index command will always end up on a single line.") |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1251 |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1252 (defcustom reftex-index-phrases-sort-prefers-entry nil |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1253 "*Non-nil means when sorting phrase lines, the explicit index entry is used. |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1254 Phrase lines in the phrases buffer contain a search phrase, and |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1255 sorting is normally based on these. Some phrase lines also have |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1256 an explicit index argument specified. When this variable is non-nil, |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1257 the index argument will be used for sorting." |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1258 :group 'reftex-index-support |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1259 :type 'boolean) |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1260 |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1261 (defcustom reftex-index-phrases-sort-in-blocks t |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1262 "*Non-nil means, empty and comment lines separate phrase buffer into blocks. |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1263 Sorting will then preserve blocks, so that lines are re-arranged only |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1264 within blocks." |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1265 :group 'reftex-index-support |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1266 :type 'boolean) |
489a5439b988
* reftex.el (reftex-compile-variables): respect new structure of
Carsten Dominik <dominik@science.uva.nl>
parents:
25804
diff
changeset
|
1267 |
25280 | 1268 (defcustom reftex-index-section-letters "ABCDEFGHIJKLMNOPQRSTUVWXYZ" |
1269 "The letters which denote sections in the index. | |
1270 Usually these are all capital letters. Don't use any downcase letters. | |
1271 Order is not significant, the index will be sorted by whatever the sort | |
1272 function thinks is correct. | |
1273 In addition to these letters, RefTeX will create a group `!' which | |
1274 contains all entries sorted below the lowest specified letter. | |
1275 In the index buffer, pressing any of these capital letters or `!' will jump | |
1276 to that section." | |
1277 :group 'reftex-index-support | |
1278 :type '(string :tag "Capital letters")) | |
1279 | |
1280 (defcustom reftex-index-include-context nil | |
1281 "*Non-nil means, display the index definition context in the index buffer. | |
1282 This flag may also be toggled from the index buffer with the `c' key." | |
1283 :group 'reftex-index-support | |
1284 :type 'boolean) | |
1285 | |
1286 (defcustom reftex-index-follow-mode nil | |
1287 "*Non-nil means, point in *Index* buffer will cause other window to follow. | |
1288 The other window will show the corresponding part of the document. | |
1289 This flag can be toggled from within the *Index* buffer with the `f' key." | |
1290 :group 'reftex-table-of-contents-browser | |
1291 :type 'boolean) | |
1292 | |
1293 ;; Viewing Cross References | |
1294 | |
1295 (defgroup reftex-viewing-cross-references nil | |
1296 "Displaying cross references and citations." | |
1297 :group 'reftex) | |
1298 | |
1299 (defcustom reftex-view-crossref-extra nil | |
1300 "Macros which can be used for the display of cross references. | |
1301 This is used when `reftex-view-crossref' is called with point in an | |
1302 argument of a macro. Note that crossref viewing for citations, | |
1303 references (both ways) and index entries is hard-coded. This variable | |
1304 is only to configure additional structures for which crossreference | |
1305 viewing can be useful. Each entry has the structure | |
1306 | |
1307 (MACRO-RE SEARCH-RE HIGHLIGHT). | |
1308 | |
1309 MACRO-RE is matched against the macro. SEARCH-RE is the regexp used | |
1310 to search for cross references. `%s' in this regexp is replaced with | |
1311 with the macro argument at point. HIGHLIGHT is an integer indicating | |
1312 which subgroup of the match should be highlighted." | |
1313 :group 'reftex-viewing-cross-references | |
1314 :type '(repeat (group (regexp :tag "Macro Regexp ") | |
1315 (string :tag "Search Regexp ") | |
1316 (integer :tag "Highlight Group")))) | |
1317 | |
1318 (defcustom reftex-auto-view-crossref t | |
1319 "*Non-nil means, initially turn automatic viewing of crossref info on. | |
1320 Automatic viewing of crossref info normally uses the echo area. | |
47050
904fd28be439
Update to RefTeX 4.19
Carsten Dominik <dominik@science.uva.nl>
parents:
46683
diff
changeset
|
1321 Whenever point is idle for more than `reftex-idle-time' seconds on the |
904fd28be439
Update to RefTeX 4.19
Carsten Dominik <dominik@science.uva.nl>
parents:
46683
diff
changeset
|
1322 argument of a \\ref or \\cite macro, and no other message is being |
904fd28be439
Update to RefTeX 4.19
Carsten Dominik <dominik@science.uva.nl>
parents:
46683
diff
changeset
|
1323 displayed, the echo area will display information about that cross |
904fd28be439
Update to RefTeX 4.19
Carsten Dominik <dominik@science.uva.nl>
parents:
46683
diff
changeset
|
1324 reference. You can also set the variable to the symbol `window'. In |
904fd28be439
Update to RefTeX 4.19
Carsten Dominik <dominik@science.uva.nl>
parents:
46683
diff
changeset
|
1325 this case a small temporary window is used for the display. |
904fd28be439
Update to RefTeX 4.19
Carsten Dominik <dominik@science.uva.nl>
parents:
46683
diff
changeset
|
1326 This feature can be turned on and off from the menu |
25280 | 1327 (Ref->Options)." |
1328 :group 'reftex-viewing-cross-references | |
1329 :type '(choice (const :tag "off" nil) | |
1330 (const :tag "in Echo Area" t) | |
1331 (const :tag "in Other Window" window))) | |
1332 | |
1333 (defcustom reftex-idle-time 1.2 | |
47050
904fd28be439
Update to RefTeX 4.19
Carsten Dominik <dominik@science.uva.nl>
parents:
46683
diff
changeset
|
1334 "*Time (secs) Emacs has to be idle before automatic crossref display is done. |
904fd28be439
Update to RefTeX 4.19
Carsten Dominik <dominik@science.uva.nl>
parents:
46683
diff
changeset
|
1335 Applies also to toc recentering." |
25280 | 1336 :group 'reftex-viewing-cross-references |
1337 :type 'number) | |
1338 | |
1339 (defcustom reftex-revisit-to-echo nil | |
1340 "*Non-nil means, automatic citation display will revisit files if necessary. | |
1341 When nil, citation display in echo area will only be active for cached | |
1342 entries and for BibTeX database files with live associated buffers." | |
1343 :group 'reftex-viewing-cross-references | |
1344 :type 'boolean) | |
1345 | |
1346 (defcustom reftex-cache-cite-echo t | |
1347 "*Non-nil means, the information displayed in the echo area for cite macros | |
1348 is cached and even saved along with the parsing information. The cache | |
1349 survives document scans. In order to clear it, use M-x reftex-reset-mode." | |
1350 :group 'reftex-viewing-cross-references | |
1351 :type 'boolean) | |
1352 | |
1353 (defcustom reftex-display-copied-context-hook nil | |
1354 "Normal Hook which is run before context is displayed anywhere. Designed | |
1355 for X-Symbol, but may have other uses as well." | |
1356 :group 'reftex-viewing-cross-references | |
1357 :group 'reftex-referencing-labels | |
1358 :type 'hook) | |
1359 | |
1360 ;; Finding Files -------------------------------------------------------- | |
1361 | |
1362 (defgroup reftex-finding-files nil | |
1363 "Finding files on search paths." | |
1364 :group 'reftex) | |
1365 | |
1366 (defcustom reftex-texpath-environment-variables '("TEXINPUTS") | |
1367 "*List of specifications how to retrieve the search path for TeX files. | |
1368 Several entries are possible. | |
1369 - If an element is the name of an environment variable, its content is used. | |
1370 - If an element starts with an exclamation mark, it is used as a command | |
1371 to retrieve the path. A typical command with the kpathsearch library would | |
1372 be `!kpsewhich -show-path=.tex'. | |
1373 - Otherwise the element itself is interpreted as a path. | |
1374 Multiple directories can be separated by the system dependent `path-separator'. | |
1375 Directories ending in `//' or `!!' will be expanded recursively. | |
1376 See also `reftex-use-external-file-finders'." | |
1377 :group 'reftex-finding-files | |
1378 :set 'reftex-set-dirty | |
1379 :type '(repeat (string :tag "Specification"))) | |
1380 | |
1381 (defcustom reftex-bibpath-environment-variables '("BIBINPUTS" "TEXBIB") | |
1382 "*List of specifications how to retrieve search path for .bib database files. | |
1383 Several entries are possible. | |
1384 - If an element is the name of an environment variable, its content is used. | |
1385 - If an element starts with an exclamation mark, it is used as a command | |
1386 to retrieve the path. A typical command with the kpathsearch library would | |
1387 be `!kpsewhich -show-path=.bib'. | |
1388 - Otherwise the element itself is interpreted as a path. | |
1389 Multiple directories can be separated by the system dependent `path-separator'. | |
1390 Directories ending in `//' or `!!' will be expanded recursively. | |
1391 See also `reftex-use-external-file-finders'." | |
1392 :group 'reftex-citation-support | |
1393 :group 'reftex-finding-files | |
1394 :set 'reftex-set-dirty | |
1395 :type '(repeat (string :tag "Specification"))) | |
1396 | |
1397 (defcustom reftex-file-extensions '(("tex" . (".tex" ".ltx")) | |
1398 ("bib" . (".bib"))) | |
1399 "*Association list with file extensions for different file types. | |
1400 This is a list of items, each item is like: (TYPE . (DEF-EXT OTHER-EXT ...)) | |
1401 | |
1402 TYPE: File type like \"bib\" or \"tex\". | |
1403 DEF-EXT: The default extension for that file type, like \".tex\" or \".bib\". | |
1404 OTHER-EXT: Any number of other legal extensions for this file type. | |
1405 | |
1406 When a files is searched and it does not have any of the legal extensions, | |
37998
706af946b1e7
* reftex-ref.el (reftex-select-label-help): Added "z" key
Carsten Dominik <dominik@science.uva.nl>
parents:
34402
diff
changeset
|
1407 we try the default extension first, and then the naked file name. |
706af946b1e7
* reftex-ref.el (reftex-select-label-help): Added "z" key
Carsten Dominik <dominik@science.uva.nl>
parents:
34402
diff
changeset
|
1408 |
706af946b1e7
* reftex-ref.el (reftex-select-label-help): Added "z" key
Carsten Dominik <dominik@science.uva.nl>
parents:
34402
diff
changeset
|
1409 If you are using AUCTeX, you also need to add new extensions to |
706af946b1e7
* reftex-ref.el (reftex-select-label-help): Added "z" key
Carsten Dominik <dominik@science.uva.nl>
parents:
34402
diff
changeset
|
1410 TeX-file-extensions." |
25280 | 1411 :group 'reftex-finding-files |
1412 :type '(repeat (cons (string :tag "File type") | |
1413 (repeat (string :tag "Extension"))))) | |
1414 | |
1415 (defcustom reftex-search-unrecursed-path-first t | |
1416 "*Non-nil means, search all specified directories before trying recursion. | |
1417 Thus, in a path \".//:/tex/\", search first \"./\", then \"/tex/\" and then | |
1418 all subdirectories of \"./\". If this option is nil, the subdirectories of | |
1419 \"./\" are searched before \"/tex/\". This is mainly for speed - most of the | |
1420 time the recursive path is for the system files and not for the user files. | |
1421 Set this to nil if the default makes RefTeX finding files with equal names | |
1422 in wrong sequence." | |
1423 :group 'reftex-finding-files | |
1424 :type 'boolean) | |
1425 | |
1426 (defcustom reftex-use-external-file-finders nil | |
1427 "*Non-nil means, use external programs to find files. | |
1428 Normally, RefTeX searches the paths given in the environment variables | |
1429 TEXINPUTS and BIBINPUTS to find TeX files and BibTeX database files. | |
1430 With this option turned on, it calls an external program specified in the | |
1431 option `reftex-external-file-finders' instead. As a side effect, | |
1432 the variables `reftex-texpath-environment-variables' and | |
1433 `reftex-bibpath-environment-variables' will be ignored." | |
1434 :group 'reftex-finding-files | |
1435 :type 'boolean) | |
1436 | |
1437 (defcustom reftex-external-file-finders '(("tex" . "kpsewhich -format=.tex %f") | |
1438 ("bib" . "kpsewhich -format=.bib %f")) | |
1439 "*Association list with external programs to call for finding files. | |
1440 Each entry is a cons cell (TYPE . PROGRAM). | |
1441 TYPE is either \"tex\" or \"bib\". PROGRAM is the external program to use with | |
1442 any arguments. %f will be replaced by the name of the file to be found. | |
1443 Note that these commands will be executed directly, not via a shell. | |
1444 Only relevant when `reftex-use-external-file-finders' is non-nil." | |
1445 :group 'reftex-finding-files | |
1446 :type '(repeat (cons (string :tag "File type") | |
1447 (string :tag "Program ")))) | |
1448 | |
1449 ;; Tuning the parser ---------------------------------------------------- | |
1450 | |
1451 (defgroup reftex-optimizations-for-large-documents nil | |
1452 "Configuration of parser speed and memory usage." | |
1453 :group 'reftex) | |
1454 | |
1455 (defcustom reftex-keep-temporary-buffers 1 | |
1456 "*Non-nil means, keep buffers created for parsing and lookup. | |
1457 RefTeX sometimes needs to visit files related to the current document. | |
1458 We distinguish files visited for | |
1459 PARSING: Parts of a multifile document loaded when (re)-parsing the document. | |
1460 LOOKUP: BibTeX database files and TeX files loaded to find a reference, | |
1461 to display label context, etc. | |
1462 The created buffers can be kept for later use, or be thrown away immediately | |
1463 after use, depending on the value of this variable: | |
1464 | |
1465 nil Throw away as much as possible. | |
1466 t Keep everything. | |
1467 1 Throw away buffers created for parsing, but keep the ones created | |
1468 for lookup. | |
1469 | |
1470 If a buffer is to be kept, the file is visited normally (which is potentially | |
1471 slow but will happen only once). | |
1472 If a buffer is to be thrown away, the initialization of the buffer depends | |
1473 upon the variable `reftex-initialize-temporary-buffers'." | |
1474 :group 'reftex-optimizations-for-large-documents | |
1475 :type '(choice | |
1476 (const :tag "Throw away everything" nil) | |
1477 (const :tag "Keep everything" t) | |
1478 (const :tag "Keep lookup buffers only" 1))) | |
1479 | |
1480 (defcustom reftex-initialize-temporary-buffers nil | |
1481 "*Non-nil means do initializations even when visiting file temporarily. | |
1482 When nil, RefTeX may turn off find-file hooks and other stuff to briefly | |
1483 visit a file. | |
1484 When t, the full default initializations are done (find-file-hook etc.). | |
1485 Instead of t or nil, this variable may also be a list of hook functions to | |
1486 do a minimal initialization." | |
1487 :group 'reftex-optimizations-for-large-documents | |
1488 :type '(choice | |
1489 (const :tag "Read files literally" nil) | |
1490 (const :tag "Fully initialize buffers" t) | |
1491 (repeat :tag "Hook functions" :value (nil) | |
1492 (function-item)))) | |
1493 | |
1494 (defcustom reftex-no-include-regexps '("\\.pstex_t\\'") | |
1495 "*List of regular expressions to exclude certain input files from parsing. | |
1496 If the name of a file included via \\include or \\input is matched by any | |
1497 of the regular expressions in this list, that file is not parsed by RefTeX." | |
1498 :group 'reftex-optimizations-for-large-documents | |
1499 :type '(repeat (regexp))) | |
1500 | |
1501 (defcustom reftex-enable-partial-scans nil | |
1502 "*Non-nil means, re-parse only 1 file when asked to re-parse. | |
1503 Re-parsing is normally requested with a `C-u' prefix to many RefTeX commands, | |
1504 or with the `r' key in menus. When this option is t in a multifile document, | |
1505 we will only parse the current buffer, or the file associated with the label | |
1506 or section heading near point in a menu. Requesting re-parsing of an entire | |
1507 multifile document then requires a `C-u C-u' prefix or the capital `R' key | |
1508 in menus." | |
1509 :group 'reftex-optimizations-for-large-documents | |
1510 :type 'boolean) | |
1511 | |
1512 (defcustom reftex-allow-automatic-rescan t | |
1513 "*Non-nil means, RefTeX may rescan the document when this seems necessary. | |
1514 Currently this applies only to rescanning after label insertion, when | |
1515 the new label cannot be inserted correctly into the internal label | |
1516 list." | |
1517 :group 'reftex-optimizations-for-large-documents | |
1518 :type 'boolean) | |
1519 | |
1520 (defcustom reftex-save-parse-info nil | |
1521 "*Non-nil means, save information gathered with parsing in a file. | |
1522 The file MASTER.rel in the same directory as MASTER.tex is used to save the | |
1523 information. When this variable is t, | |
1524 - accessing the parsing information for the first time in an editing session | |
1525 will read that file (if available) instead of parsing the document. | |
1526 - exiting Emacs or killing a buffer in reftex-mode will cause a new version | |
1527 of the file to be written." | |
1528 :group 'reftex-optimizations-for-large-documents | |
1529 :type 'boolean) | |
1530 | |
27192
f70a80cecdd3
New version number.
Carsten Dominik <dominik@science.uva.nl>
parents:
27035
diff
changeset
|
1531 (defcustom reftex-parse-file-extension ".rel" |
f70a80cecdd3
New version number.
Carsten Dominik <dominik@science.uva.nl>
parents:
27035
diff
changeset
|
1532 "*File extension for the file in which parser information is stored. |
f70a80cecdd3
New version number.
Carsten Dominik <dominik@science.uva.nl>
parents:
27035
diff
changeset
|
1533 This extension is added to the base name of the master file." |
f70a80cecdd3
New version number.
Carsten Dominik <dominik@science.uva.nl>
parents:
27035
diff
changeset
|
1534 :group 'reftex-optimizations-for-large-documents |
f70a80cecdd3
New version number.
Carsten Dominik <dominik@science.uva.nl>
parents:
27035
diff
changeset
|
1535 :type 'string) |
f70a80cecdd3
New version number.
Carsten Dominik <dominik@science.uva.nl>
parents:
27035
diff
changeset
|
1536 |
25280 | 1537 (defcustom reftex-use-multiple-selection-buffers nil |
1538 "*Non-nil means use a separate selection buffer for each label type. | |
1539 These buffers are kept from one selection to the next and need not to be | |
1540 created for each use - so the menu generally comes up faster. The | |
1541 selection buffers will be erased (and therefore updated) automatically | |
1542 when new labels in its category are added. See the variable | |
1543 `reftex-auto-update-selection-buffers'." | |
1544 :group 'reftex-optimizations-for-large-documents | |
1545 :group 'reftex-referencing-labels | |
1546 :type 'boolean) | |
1547 | |
1548 (defcustom reftex-auto-update-selection-buffers t | |
1549 "*Non-nil means, selection buffers will be updated automatically. | |
1550 When a new label is defined with `reftex-label', all selection buffers | |
1551 associated with that label category are emptied, in order to force an | |
1552 update upon next use. When nil, the buffers are left alone and have to be | |
1553 updated by hand, with the `g' key from the label selection process. | |
1554 The value of this variable will only have any effect when | |
1555 `reftex-use-multiple-selection-buffers' is non-nil." | |
1556 :group 'reftex-optimizations-for-large-documents | |
1557 :group 'reftex-referencing-labels | |
1558 :type 'boolean) | |
1559 | |
1560 ;; Fontification and Faces ---------------------------------------------- | |
1561 | |
1562 (defgroup reftex-fontification-configurations nil | |
1563 "Options concerning the faces used in RefTeX." | |
1564 :group 'reftex) | |
1565 | |
1566 (defcustom reftex-use-fonts t | |
1567 "*Non-nil means, use fonts in *toc* and selection buffers. | |
1568 Font-lock must be loaded as well to actually get fontified display. | |
1569 When changing this option, a rescan may be necessary to activate the change." | |
1570 :group 'reftex-fontification-configurations | |
1571 :type 'boolean) | |
1572 | |
1573 (defcustom reftex-refontify-context 1 | |
1574 "*Non-nil means, re-fontify the context in the label menu with font-lock. | |
1575 This slightly slows down the creation of the label menu. It is only necessary | |
1576 when you definitely want the context fontified. | |
1577 | |
1578 This option may have 3 different values: | |
1579 nil Never refontify. | |
1580 t Always refontify. | |
1581 1 Refontify when absolutely necessary, e.g. when old versions of X-Symbol. | |
1582 The option is ignored when `reftex-use-fonts' is nil." | |
1583 :group 'reftex-fontification-configurations | |
1584 :group 'reftex-referencing-labels | |
1585 :type '(choice | |
1586 (const :tag "Never" nil) | |
1587 (const :tag "Always" t) | |
1588 (const :tag "When necessary" 1))) | |
1589 | |
1590 (defcustom reftex-highlight-selection 'cursor | |
1591 "*Non-nil mean, highlight selected text in selection and *toc* buffers. | |
1592 Normally, the text near the cursor is the selected text, and it is | |
1593 highlighted. This is the entry most keys in the selction and *toc* | |
1594 buffers act on. However, if you mainly use the mouse to select an | |
1595 item, you may find it nice to have mouse-triggered highlighting | |
1596 instead or as well. The variable may have one of these values: | |
1597 | |
1598 nil No highlighting. | |
1599 cursor Highlighting is cursor driven. | |
1600 mouse Highlighting is mouse driven. | |
1601 both Both cursor and mouse trigger highlighting. | |
1602 | |
1603 Changing this variable requires to rebuild the selection and *toc* buffers | |
1604 to become effective (keys `g' or `r')." | |
1605 :group 'reftex-fontification-configurations | |
1606 :type '(choice | |
1607 (const :tag "Never" nil) | |
1608 (const :tag "Cursor driven" cursor) | |
1609 (const :tag "Mouse driven" mouse) | |
1610 (const :tag "Mouse and Cursor driven." both))) | |
1611 | |
1612 (defcustom reftex-cursor-selected-face 'highlight | |
1613 "Face name to highlight cursor selected item in toc and selection buffers. | |
1614 See also the variable `reftex-highlight-selection'." | |
1615 :group 'reftex-fontification-configurations | |
1616 :type 'symbol) | |
1617 (defcustom reftex-mouse-selected-face 'secondary-selection | |
1618 "Face name to highlight mouse selected item in toc and selection buffers. | |
1619 See also the variable `reftex-highlight-selection'." | |
1620 :group 'reftex-fontification-configurations | |
1621 :type 'symbol) | |
1622 (defcustom reftex-file-boundary-face 'font-lock-comment-face | |
1623 "Face name for file boundaries in selection buffer." | |
1624 :group 'reftex-fontification-configurations | |
1625 :type 'symbol) | |
1626 (defcustom reftex-label-face 'font-lock-constant-face | |
1627 "Face name for labels in selection buffer." | |
1628 :group 'reftex-fontification-configurations | |
1629 :type 'symbol) | |
1630 (defcustom reftex-section-heading-face 'font-lock-function-name-face | |
1631 "Face name for section headings in toc and selection buffers." | |
1632 :group 'reftex-fontification-configurations | |
1633 :type 'symbol) | |
1634 (defcustom reftex-toc-header-face 'font-lock-comment-face | |
1635 "Face name for the header of a toc buffer." | |
1636 :group 'reftex-fontification-configurations | |
1637 :type 'symbol) | |
1638 (defcustom reftex-bib-author-face 'font-lock-keyword-face | |
1639 "Face name for author names in bib selection buffer." | |
1640 :group 'reftex-fontification-configurations | |
1641 :type 'symbol) | |
1642 (defcustom reftex-bib-year-face 'font-lock-comment-face | |
1643 "Face name for year in bib selection buffer." | |
1644 :group 'reftex-fontification-configurations | |
1645 :type 'symbol) | |
1646 (defcustom reftex-bib-title-face 'font-lock-function-name-face | |
1647 "Face name for article title in bib selection buffer." | |
1648 :group 'reftex-fontification-configurations | |
1649 :type 'symbol) | |
1650 (defcustom reftex-bib-extra-face 'font-lock-comment-face | |
1651 "Face name for bibliographic information in bib selection buffer." | |
1652 :group 'reftex-fontification-configurations | |
1653 :type 'symbol) | |
1654 (defcustom reftex-select-mark-face 'bold | |
1655 "Face name for marked entries in the selection buffers." | |
1656 :group 'reftex-fontification-configurations | |
1657 :type 'symbol) | |
1658 (defcustom reftex-index-header-face 'font-lock-comment-face | |
1659 "Face name for the header of an index buffer." | |
1660 :group 'reftex-fontification-configurations | |
1661 :type 'symbol) | |
1662 (defcustom reftex-index-section-face 'font-lock-function-name-face | |
1663 "Face name for the start of a new letter section in the index." | |
1664 :group 'reftex-fontification-configurations | |
1665 :type 'symbol) | |
1666 (defcustom reftex-index-tag-face 'font-lock-keyword-face | |
1667 "Face name for index names (for multiple indices)." | |
1668 :group 'reftex-fontification-configurations | |
1669 :type 'symbol) | |
1670 (defcustom reftex-index-face 'font-lock-constant-face | |
1671 "Face name for index entries." | |
1672 :group 'reftex-fontification-configurations | |
1673 :type 'symbol) | |
1674 | |
1675 (defcustom reftex-pre-refontification-functions nil | |
1676 "X-Symbol specific hook. | |
1677 Functions get two arguments, the buffer from where the command started and a | |
1678 symbol indicating in what context the hook is called." | |
1679 :group 'reftex-fontification-configurations | |
1680 :type 'hook) | |
1681 | |
1682 ;; Miscellaneous configurations ----------------------------------------- | |
1683 | |
1684 (defgroup reftex-miscellaneous-configurations nil | |
1685 "Collection of further configurations." | |
1686 :group 'reftex) | |
1687 | |
1688 (defcustom reftex-extra-bindings nil | |
1689 "Non-nil means, make additional key bindings on startup. | |
1690 These extra bindings are located in the users `C-c letter' map." | |
1691 :group 'reftex-miscellaneous-configurations | |
1692 :type 'boolean) | |
1693 | |
1694 (defcustom reftex-plug-into-AUCTeX nil | |
1695 "*Plug-in flags for AUCTeX interface. | |
1696 This variable is a list of 4 boolean flags. When a flag is non-nil, | |
1697 RefTeX will | |
1698 | |
1699 - supply labels in new sections and environments (flag 1) | |
1700 - supply arguments for macros like `\\label'. (flag 2) | |
1701 - supply arguments for macros like `\\ref'. (flag 3) | |
1702 - supply arguments for macros like `\\cite'. (flag 4) | |
1703 - supply arguments for macros like `\\index'. (flag 5) | |
1704 | |
1705 You may also set the variable itself to t or nil in order to turn all | |
1706 plug-ins on or off, respectively. | |
1707 \\<LaTeX-mode-map>Supplying labels in new sections and environments applies when creating | |
1708 sections with \\[LaTeX-section] and environments with \\[LaTeX-environment]. | |
1709 Supplying macro arguments applies when you insert such a macro interactively | |
1710 with \\[TeX-insert-macro]. | |
1711 See the AUCTeX documentation for more information. | |
1712 RefTeX uses `fset' to take over the function calls. Changing the variable | |
1713 may require a restart of Emacs in order to become effective." | |
1714 :group 'reftex-miscellaneous-configurations | |
1715 :group 'LaTeX | |
1716 :type '(choice | |
1717 (const :tag "No plug-ins" nil) | |
1718 (const :tag "All possible plug-ins" t) | |
1719 (list | |
1720 :tag "Individual choice" | |
1721 :value (t t t t t) | |
1722 (boolean :tag "supply label in new sections and environments") | |
1723 (boolean :tag "supply argument for macros like `\\label' ") | |
1724 (boolean :tag "supply argument for macros like `\\ref' ") | |
1725 (boolean :tag "supply argument for macros like `\\cite' ") | |
1726 (boolean :tag "supply argument for macros like `\\index' ") | |
1727 ))) | |
1728 | |
1729 (defcustom reftex-allow-detached-macro-args nil | |
1730 "*Non-nil means, allow arguments of macros to be detached by whitespace. | |
1731 When this is t, `aaa' will be considered as argument of \\bb in the following | |
1732 construct: \\bbb [xxx] {aaa}." | |
1733 :group 'reftex-miscellaneous-configurations | |
1734 :type 'boolean) | |
1735 | |
1736 | |
1737 (defcustom reftex-load-hook nil | |
1738 "Hook which is being run when loading reftex.el." | |
1739 :group 'reftex-miscellaneous-configurations | |
1740 :type 'hook) | |
1741 | |
1742 (defcustom reftex-mode-hook nil | |
1743 "Hook which is being run when turning on RefTeX mode." | |
1744 :group 'reftex-miscellaneous-configurations | |
1745 :type 'hook) | |
1746 | |
1747 ;;; reftex-vars.el ends here |