X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/cfcc9cc88e564711f3d811b9aaa1d2c3edf476da..da95e2399e068eb87ea90a4617d80980d0601eb4:/lisp/textmodes/reftex-vars.el diff --git a/lisp/textmodes/reftex-vars.el b/lisp/textmodes/reftex-vars.el index fa316ea760..3b497f2fb1 100644 --- a/lisp/textmodes/reftex-vars.el +++ b/lisp/textmodes/reftex-vars.el @@ -1,11 +1,9 @@ ;;; reftex-vars.el --- configuration variables for RefTeX -;; Copyright (C) 1997-1999, 2001-2012 Free Software Foundation, Inc. +;; Copyright (C) 1997-1999, 2001-2014 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Maintainer: auctex-devel@gnu.org -;; Version: 4.31 -;; Package: reftex ;; This file is part of GNU Emacs. @@ -91,13 +89,13 @@ (("wrapfigure" ?f nil nil caption))) (ctable "The ctable package" - (("\\ctable[]{}{}{}" ?t "tab:" "\\ref{%s}" 1 ("table" "Tabelle")))) + (("\\ctable[]{}{}{}" ?t "tab:" "~\\ref{%s}" 1 ("table" "Tabelle")))) (listings "The listings package" - (("lstlisting" ?l "lst:" "~\\ref{%s}" nil (regexp "[Ll]isting")))) + (("lstlisting" ?l "lst:" "~\\ref{%s}" nil (regexp "[Ll]isting")))) (minted "The minted package" - (("minted" ?l "lst:" "~\\ref{%s}" nil (regexp "[Ll]isting")))) + (("minted" ?l "lst:" "~\\ref{%s}" nil (regexp "[Ll]isting")))) ;; The LaTeX core stuff (LaTeX "LaTeX default environments" @@ -129,7 +127,10 @@ ;; The label macro is hard coded, but it *could* be defined like this: ;;("\\label{*}" nil nil nil nil) - ))) + )) + + ;; Texinfo + (Texinfo "Texinfo default environments" nil)) "The default label environment descriptions. Lower-case symbols correspond to a style file of the same name in the LaTeX distribution. Mixed-case symbols are convenience aliases.") @@ -207,6 +208,11 @@ distribution. Mixed-case symbols are convenience aliases.") (?p . "(%2a %y\\nocite{%l})"))) (locally "Full info in parenthesis" "(%2a %y, %j %v, %P, %e: %b, %u, %s %<)") + (context + "ConTeXt bib module" + ((?\C-m . "\\cite[%l]") + (?s . "\\cite[][%l]") + (?n . "\\nocite[%l]"))) ) "Builtin versions of the citation format. The following conventions are valid for all alist entries: @@ -239,7 +245,7 @@ distribution. Mixed-case symbols are convenience aliases.") "LaTeX label and citation support." :tag "RefTeX" :link '(url-link :tag "Home Page" - "http://staff.science.uva.nl/~dominik/Tools/reftex/") + "http://www.gnu.org/software/auctex/reftex.html") :link '(emacs-commentary-link :tag "Commentary in reftex.el" "reftex.el") :link '(custom-manual "(reftex)Top") :prefix "reftex-" @@ -261,8 +267,8 @@ by whitespace." (defcustom reftex-max-section-depth 12 "Maximum depth of section levels in document structure. -Standard LaTeX needs default is 7, but there are packages for which this -needs to be larger." +The default in standard LaTeX is 7, but there are packages for +which this needs to be larger." :group 'reftex-table-of-contents-browser :type 'integer) @@ -329,7 +335,7 @@ recentering will work for any TOC window created during the session. Value 'frame (the default) means, turn automatic recentering on only while the dedicated TOC frame does exist, and do the recentering only in that frame. So -when creating that frame (with \"d\" key in an ordinary TOC window), the +when creating that frame (with `d' key in an ordinary TOC window), the automatic recentering is turned on. When the frame gets destroyed, automatic recentering is turned off again. @@ -383,8 +389,8 @@ This flag can be toggled from within the *toc* buffer with the `i' key." (defcustom reftex-toc-confirm-promotion 2 "Non-nil means, promotion/demotion commands first prompt for confirmation. -When nil, the command is executed immediately. When this is an integer -N, ask for confirmation only if N or more section commands are going to be +If nil, the command is executed immediately. If this is an integer N, +ask for confirmation only if N or more section commands are going to be changed." :group 'reftex-table-of-contents-browser :type '(choice @@ -408,7 +414,7 @@ This flag can be toggled from within the *toc* buffer with the `f' key." (defcustom reftex-revisit-to-follow nil "Non-nil means, follow-mode will revisit files if necessary. -When nil, follow-mode will be suspended for stuff in unvisited files." +If nil, follow-mode will be suspended for stuff in unvisited files." :group 'reftex-table-of-contents-browser :group 'reftex-referencing-labels :type 'boolean) @@ -452,8 +458,8 @@ of options." (defcustom reftex-label-alist nil "Alist with information on environments for \\label-\\ref use. -This docstring is easier to understand after reading the configuration -examples in `reftex.el'. Looking at the builtin defaults in the constant +This doc string is easier to understand after reading the configuration +examples in the manual. Looking at the builtin defaults in the constant `reftex-label-alist-builtin' may also be instructive. Set this variable to define additions and changes to the default. The only @@ -481,12 +487,11 @@ ENV-OR-MACRO Special names: `section' for section labels, `any' to define a group which contains all labels. - This may also be a function to do local parsing and identify point - to be in a non-standard label environment. The function must take - an argument BOUND and limit backward searches to this value. It - should return either nil or a cons cell (FUNCTION . POSITION) with - the function symbol and the position where the special environment - starts. See the Info documentation for an example. + This may also be a function to do local parsing and identify point to + be in a non-standard label environment. The function must take an + argument BOUND and limit backward searches to this value. It should + return either nil or the position where the special environment starts. + See the Info documentation for an example. Finally this may also be nil if the entry is only meant to change some settings associated with the type indicator character (see below). @@ -500,7 +505,7 @@ TYPE-KEY `equation' and `eqnarray'). If the type indicator is nil and the macro has a label argument {*}, the macro defines neutral labels just like \\label. In this case - the reminder of this entry is ignored. + the remainder of this entry is ignored. LABEL-PREFIX Label prefix string, like \"tab:\". @@ -516,8 +521,8 @@ LABEL-PREFIX Example: In a file `intro.tex', \"eq:%f:\" will become \"eq:intro:\"). REFERENCE-FORMAT - Format string for reference insert in buffer. `%s' will be replaced by - the label. + Format string for reference insertion in buffer. `%s' will be replaced + by the label. When the format starts with `~', the `~' will only be inserted if there is not already a whitespace before point. @@ -533,7 +538,7 @@ CONTEXT-METHOD - If an integer, use the nth argument of the macro. As a special case, 1000 means to get text after the last macro argument. - If a string, use as regexp to search *backward* from the label. Context - is then the text following the end of the match. E.g. putting this to + is then the text following the end of the match. E.g. setting this to \"\\\\\\\\caption[[{]\" will use the caption in a figure or table environment. \"\\\\\\\\begin{eqnarray}\\\\|\\\\\\\\\\\\\\\\\" works for eqnarrays. @@ -584,7 +589,7 @@ will use Any list entry may also be a symbol. If that has an association in `reftex-label-alist-builtin', the cddr of that association is spliced into the list. However, builtin defaults should normally be set with the variable -`reftex-default-label-alist-entries." +`reftex-default-label-alist-entries'." :group 'reftex-defining-label-environments :set 'reftex-set-dirty :type @@ -755,8 +760,7 @@ And here is the setup for RefTeX: 3. Tell RefTeX to use this function - (setq reftex-special-environment-functions '(my-detect-linguex-list)) -" + (setq reftex-special-environment-functions '(my-detect-linguex-list))" :group 'reftex-defining-label-environments :type 'hook) @@ -820,11 +824,13 @@ RefTeX's default function uses the variable `reftex-derive-label-parameters'." :type 'symbol) (defcustom reftex-translate-to-ascii-function 'reftex-latin1-to-ascii - "Filter function which will process a context string before it is used -to derive a label from it. The intended application is to convert ISO or -Mule characters into something valid in labels. The default function -removes the accents from Latin-1 characters. X-Symbol (>=2.6) sets this -variable to the much more general `x-symbol-translate-to-ascii'." + "Filter function to convert a string to ASCII. +The function is used to process a context string before it is +used to derive a label from it. The intended application is to +convert ISO or Mule characters into something valid in labels. +The default function removes the accents from Latin-1 characters. +X-Symbol (>=2.6) sets this variable to the much more general +`x-symbol-translate-to-ascii'." :group 'reftex-making-and-inserting-labels :type 'symbol) @@ -860,6 +866,49 @@ DOWNCASE t: Downcase words before using them." (string :tag "")) (option (boolean :tag "Downcase words ")))) +(defcustom reftex-label-regexps + '(;; Normal \\label{foo} labels + "\\\\label{\\(?1:[^}]*\\)}" + ;; keyvals [..., label = {foo}, ...] forms used by ctable, + ;; listings, minted, ... + "\\[[^]]*\\." :group 'reftex-viewing-cross-references :type 'boolean) (defcustom reftex-display-copied-context-hook nil - "Normal Hook which is run before context is displayed anywhere. Designed -for X-Symbol, but may have other uses as well." + "Normal hook which is run before context is displayed anywhere. +Designed for X-Symbol, but may have other uses as well." :group 'reftex-viewing-cross-references :group 'reftex-referencing-labels :type 'hook) @@ -1690,7 +1821,7 @@ The file MASTER.rel in the same directory as MASTER.tex is used to save the information. When this variable is t, - accessing the parsing information for the first time in an editing session will read that file (if available) instead of parsing the document. -- exiting Emacs or killing a buffer in reftex-mode will cause a new version +- exiting Emacs or killing a buffer in `reftex-mode' will cause a new version of the file to be written." :group 'reftex-optimizations-for-large-documents :type 'boolean) @@ -1855,22 +1986,13 @@ symbol indicating in what context the hook is called." (defcustom reftex-extra-bindings nil "Non-nil means, make additional key bindings on startup. -These extra bindings are located in the -`reftex-extra-bindings-map' map, bound to -`reftex-extra-bindings-prefix'." - :group 'reftex-miscellaneous-configurations - :type 'boolean) - -;; below, default is C-c C-y because it is free in LaTeX mode. -(defcustom reftex-extra-bindings-prefix "\C-c\C-y" - "When `reftex-extra-bindings' is set to non-nil, use extra -bindings with this prefix bound to `reftex-extra-bindings-map'." +These extra bindings are located in the users `C-c letter' map." :group 'reftex-miscellaneous-configurations :type 'boolean) (defcustom reftex-plug-into-AUCTeX nil "Plug-in flags for AUCTeX interface. -This variable is a list of 4 boolean flags. When a flag is non-nil, +This variable is a list of 5 boolean flags. When a flag is non-nil, RefTeX will - supply labels in new sections and environments (flag 1) @@ -1900,8 +2022,7 @@ may require a restart of Emacs in order to become effective." (boolean :tag "supply argument for macros like `\\label' ") (boolean :tag "supply argument for macros like `\\ref' ") (boolean :tag "supply argument for macros like `\\cite' ") - (boolean :tag "supply argument for macros like `\\index' ") - ))) + (boolean :tag "supply argument for macros like `\\index' ")))) (defcustom reftex-allow-detached-macro-args nil "Non-nil means, allow arguments of macros to be detached by whitespace.