reftex-vars.el 88 KB

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