[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Here is a complete list of RefTeX's configuration variables. All
variables have customize support - so if you are not familiar with Emacs
Lisp (and even if you are) you might find it more comfortable to use
customize
to look at and change these variables. M-x
reftex-customize will get you there.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
car
of each cons cell is the name of the section macro. The
cdr
is a number indicating its level. A negative level means the
same as the positive value, but the section will never get a number.
The cdr
may also be a function which then has to return the
level. This list is also used for promotion and demption of sectioning
commands. If you are using a document class which has several sets of
sectioning commands, promotion only works correctly if this list is
sorted first by set, then within each set by level. The promotion
commands always select the nearest entry with the correct new level.
nil
means, \part
is like any other sectioning command.
This means, part numbers will be included in the numbering of chapters, and
chapter counters will be reset for each part.
When nil
(the default), parts are special, do not reset the
chapter counter and also do not show up in chapter numbers.
nil
means, turn automatic recentering of `*TOC*' window on.
When active, the `*TOC*' window will always show the section you
are currently working in. Recentering happens whenever Emacs is idle for
more than reftex-idle-time
seconds.
Value t
means, turn on immediately when RefTeX gets started. Then,
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 automatic recentering is turned on. When the
frame gets destroyed, automatic recentering is turned off again.
This feature can be turned on and off from the menu (Ref->Options).
nil
means, create TOC window by splitting window
horizontally. The default is to split vertically.
nil
means, split the selected window to display the
`*toc*' buffer. This helps to keep the window configuration, but
makes the `*toc*' small. When nil
, all other windows except
the selected one will be deleted, so that the `*toc*' window fills
half the frame.
nil
means, include file boundaries in `*toc*' buffer.
This flag can be toggled from within the `*toc*' buffer with the
i key.
nil
means, include labels in `*toc*' buffer. This flag
can be toggled from within the `*toc*' buffer with the l
key.
nil
means, include index entries in `*toc*' buffer.
This flag can be toggled from within the `*toc*' buffer with the
i key.
nil
means, include context with labels in the `*toc*'
buffer. Context will only be shown if the labels are visible as well.
This flag can be toggled from within the `*toc*' buffer with the
c key.
nil
means, point in `*toc*' buffer (the
table-of-contents buffer) will cause other window to follow. The other
window will show the corresponding part of the document. This flag can
be toggled from within the `*toc*' buffer with the f
key.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
reftex-label-alist-builtin
.
LaTeX
should always be the last entry.
reftex-default-label-alist-entries
. The only things you
must not change is that ?s
is the type indicator for
section labels, and SPC for the any
label type. These are
hard-coded at other places in the code.
The value of the variable must be a list of items. Each item is a list itself and has the following structure:
(env-or-macro type-key label-prefix reference-format context-method (magic-word ... ) toc-level) |
Each list entry describes either an environment carrying a counter for
use with \label
and \ref
, or a LaTeX macro defining a
label as (or inside) one of its arguments. The elements of each list
entry are:
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.
Finally this may also be nil
if the entry is only meant to change
some settings associated with the type indicator character (see
below).
?t
, must be a printable ASCII
character. The type indicator is a single character which defines a
label type. Any label inside the environment or macro is assumed to
belong to this type. The same character may occur several times in this
list, to cover cases in which different environments carry the same
label type (like 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.
%f Current file name, directory and extension stripped.
%F Current file name relative to master file directory.
%u User login name, on systems which support this.
%S A section prefix derived with variable |
Example: In a file `intro.tex', `eq:%f:' will become `eq:intro:'.
nil
, use the text following the `\label{...}' macro.
t
, use
caption
, item
, eqnarray-like
,
alignat-like
, this symbol will internally be translated into an
appropriate regexp (see also the variable
reftex-default-context-regexps
).
\label
macro.
The function is expected to return a suitable context string. It should
throw an exception (error) when failing to find context. As an example,
here is a function returning the 10 chars following the label macro as
context:
(defun my-context-function (env-or-mac) (if (> (point-max) (+ 10 (point))) (buffer-substring (point) (+ 10 (point))) (error "Buffer too small"))) |
Label context is used in two ways by RefTeX: For display in the label
menu, and to derive a label string. If you want to use a different
method for each of these, specify them as a dotted pair.
E.g. (nil . t)
uses the text after the label (nil
) for
display, and text from the default position (t
) to derive a label
string. This is actually used for section labels.
reftex-reference
, the label list offered will be automatically
restricted to labels of the correct type. If the first element of this
word--list is the symbol `regexp', the strings are interpreted as regular
expressions.
reftex-section-levels
. A positive value
will number the entries mixed with the sectioning commands of the same
level. A negative value will make unnumbered entries. Useful only for
theorem-like environments which structure the document. Will be ignored
for macros. When omitted or nil
, no TOC entries will be
made.
If the type indicator characters of two or more entries are the same, RefTeX will use
nil
format and prefix
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-label-alist
contains `%S', this list is used to
determine the correct prefix string depending on the current section
level. The list is an alist, with each entry of the form
(key . prefix)
. Possible keys are sectioning macro
names like `chapter', integer section levels (as given in
reftex-section-levels
), and t
for the default.
(format regexp (regexp-quote environment))
is used
to calculate the final regular expression - so `%s' will be
replaced with the environment or macro.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
(derive prompt) |
If deriveis t
, RefTeX will try to derive a sensible
label from context. A section label for example will be derived from
the section heading. The conversion of the context to a legal label is
governed by the specifications given in
reftex-derive-label-parameters
. If derive is nil
,
the default label will consist of the prefix and a unique number, like
`eq:23'.
If prompt is t
, the user will be prompted for a label
string. When prompt is nil
, the default label will be
inserted without query.
So the combination of derive and prompt controls label insertion. Here is a table describing all four possibilities:
derive prompt action ----------------------------------------------------------- nil nil Insert simple label, like `eq:22' or `sec:13'. No query. nil t Prompt for label. t nil Derive a label from context and insert. No query. t t Derive a label from context, prompt for confirmation. |
Each flag may be set to t
, nil
, or a string of label type
letters indicating the label types for which it should be true. Thus,
the combination may be set differently for each label type. The default
settings `"s"' and `"sft"' mean: Derive section labels from
headings (with confirmation). Prompt for figure and table labels. Use
simple labels without confirmation for everything else.
The available label types are: s
(section), f
(figure),
t
(table), i
(item), e
(equation), n
(footnote), N
(endnote) plus any definitions in
reftex-label-alist
.
nil
, should be a function which produces the string to
insert as a label definition. The function will be called with two
arguments, the label and the default-format (usually
`\label{%s}'). It should return the string to insert into the
buffer.
reftex-derive-label-parameters
.
reftex-latin1-to-ascii
removes the accents from Latin-1
characters. X-Symbol (>=2.6) sets this variable to the much more
general x-symbol-translate-to-ascii
.
nil
: Throw away any words containing characters illegal in labels.t
: Throw away only the illegal characters, not the whole word.
nil
: Never abbreviate words.t
: Always abbreviate words (see reftex-abbrev-parameters
).1
: Abbreviate words if necessary to shorten label string.
t
: Downcase words before putting them into the label.[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
nil
means do not show the short context.
Each of these flags can be set to t
or nil
, or to a string
of type letters indicating the label types for which it should be true.
These strings work like character classes in regular expressions. Thus,
setting one of the flags to `"sf"' makes the flag true for section
and figure labels, nil
for everything else. Setting it to
`"^sf"' makes it the other way round.
The available label types are: s
(section), f
(figure),
t
(table), i
(item), e
(equation), n
(footnote), plus any definitions in reftex-label-alist
.
Most options can also be switched from the label menu itself - so if you decide here to not have a table of contents in the label menu, you can still get one interactively during selection from the label menu.
\ref
macro.
This is used to string together whole reference sets, like
`eqs. 1,2,3-5,6 and 7' in a single call to
reftex-reference
.
nil
means, the varioref macro \vref
is used as
default. In the selection buffer, the v key toggles the reference
macro between \ref
and \vref
. The value of this variable
determines the default which is active when entering the selection
process. Instead of nil
or t
, this may also be a string
of type letters indicating the label types for which it should be
true.
nil
means, the fancyref macro \fref
is used as
default. In the selection buffer, the V key toggles the reference
macro between \ref
, \fref
and \Fref
. The value of
this variable determines the default which is active when entering the
selection process. Instead of nil
or t
, this may also be
a string of type letters indicating the label types for which it should
be true.
nil
, should be a function which produces the string to
insert as a reference. Note that the insertion format can also be
changed with reftex-label-alist
. This hook also is used by the
special commands to insert \vref
and \fref
references, so
even if you set this, your setting will be ignored by the special
commands. The function will be called with two arguments, the
label and the default-format (usually `~\ref{%s}').
It should return the string to insert into the buffer.
nil
means, reftex-reference
will try to guess the
label type. To do that, RefTeX will look at the word before the
cursor and compare it with the magic words given in
reftex-label-alist
. When it finds a match, RefTeX will
immediately offer the correct label menu - otherwise it will prompt you
for a label type. If you set this variable to nil
, RefTeX
will always prompt for a label type.
X-Symbol
, but may have other uses as well.
X-Symbol
specific hook. Probably not useful for other purposes.
The functions get two arguments, the buffer from where the command
started and a symbol indicating in what context the hook is
called.
reftex-select-label-mode
.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
\\bibliography{..}
. File names matched by any of these regexps
will not be parsed. Intended for files which contain only
@string
macro definitions and the like, which are ignored by
RefTeX anyway.
reftex-citation
is called from a document with neither
a `\bibliography{...}' statement nor a thebibliography
environment, RefTeX will scan these files instead. Intended for
using reftex-citation
in non-LaTeX files. The files will be
searched along the BIBINPUTS or TEXBIB path.
nil Do not sort entries. author Sort entries by author name. year Sort entries by increasing year. reverse-year Sort entries by decreasing year. |
reftex-cite-format-builtin
for more complex examples.
If reftex-cite-format
is a string, it will be used as the format.
In the format, the following percent escapes will be expanded.
%l
%a
reftex-cite-punctuation
.
%2a
%A
%e
It is also possible to access all other BibTeX database fields:
%b booktitle %c chapter %d edition %h howpublished %i institution %j journal %k key %m month %n number %o organization %p pages %P first page %r address %s school %u publisher %t title %v volume %y year %B booktitle, abbreviated %T title, abbreviated |
Usually, only `%l' is needed. The other stuff is mainly for the
echo area display, and for (setq reftex-comment-citations t)
.
`%<' as a special operator kills punctuation and space around it after the string has been formatted.
Beware that all this only works with BibTeX database files. When
citations are made from the \bibitems
in an explicit
thebibliography
environment, only `%l' is available.
If reftex-cite-format
is an alist of characters and strings, the
user will be prompted for a character to select one of the possible
format strings.
In order to configure this variable, you can either set
reftex-cite-format
directly yourself or set it to the
symbol of one of the predefined styles. The predefined symbols
are those which have an association in the constant
reftex-cite-format-builtin
) E.g.: (setq reftex-cite-format
'natbib)
.
If non-nil
, should be a function which produces the string to
insert as a citation. Note that the citation format can also be changed
with the variable reftex-cite-format
. The function will be
called with two arguments, the citation-key and the
default-format (taken from reftex-cite-format
). It should
return the string to insert into the buffer.
nil
means add a comment for each citation describing the full
entry. The comment is formatted according to
reftex-cite-comment-format
.
reftex-cite-format
for possible
percent escapes.
reftex-select-bib-mode
.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
nil
means, index entries are parsed as well. Index support
is resource intensive and the internal structure holding the parsed
information can become quite big. Therefore it can be turned off. When
this is nil
and you execute a command which requires index
support, you will be asked for confirmation to turn it on and rescan the
document.
MakeIndex
keywords
(level encap actual quote escape)
.
(macro index-tag key prefix exclude repeat) |
macro is the macro. Arguments should be denoted by empty braces, as for example in `\index[]{*}'. Use square brackets to denote optional arguments. The star marks where the index key is.
index-tag is a short name of the index. `idx' and `glo' are reserved for the default index and the glossary. Other indices can be defined as well. If this is an integer, the Nth argument of the macro holds the index tag.
key is a character which is used to identify the macro for input
with reftex-index
. `?i', `?I', and `?g' are
reserved for default index and glossary.
prefix can be a prefix which is added to the key part of the
index entry. If you have a macro
\newcommand{\molec}[1]{#1\index{Molecules!#1}
, this prefix
should be `Molecules!'.
exclude can be a function. If this function exists and returns a
non-nil value, the index entry at point is ignored. This was
implemented to support the (deprecated) `^' and `_' shortcuts
in the LaTeX2e index
package.
repeat, if non-nil
, means the index macro does not typeset
the entry in the text, so that the text has to be repeated outside the
index macro. Needed for reftex-index-selection-or-word
and for
indexing from the phrase buffer.
The final entry may also be a symbol. It must have an association in
the variable reftex-index-macros-builtin
to specify the main
indexing package you are using. Legal values are currently
default The LaTeX default - unnecessary to specify this one multind The multind.sty package index The index.sty package index-shortcut The index.sty packages with the ^ and _ shortcuts. Should not be used - only for old documents |
reftex-index-selection-or-word
.
This is a list with (macro-key default-tag)
.
macro-key is a character identifying an index macro - see
reftex-index-macros
.
default-tag is the tag to be used if the macro requires a
tag argument. When this is nil
and a tag is needed,
RefTeX will ask for it. When this is the empty string and the
TAG argument of the index macro is optional, the TAG argument will be
omitted.
nil Do not provide a default index "tag" The default index tag given as a string, e.g. "idx" last The last used index tag will be offered as default |
reftex-index-selection-or-word
is executed inside TeX math mode,
the index key copied from the buffer is processed with this format
string through the format
function. This can be used to add the
math delimiters (e.g. `$') to the string. Requires the
`texmathp.el' library which is part of AUCTeX.
reftex-index-phrases-logical-or-regexp
.
reftex-index-phrases-logical-or-regexp
has higher priority than this logical `or'.
nil
means phrases search will look for whole words, not subwords.
This works by requiring word boundaries at the beginning and end of
the search string. When the search phrase already has a non-word-char
at one of these points, no word boundary is required there.
nil
means, searching for index phrases will ignore
case.
nil
means, skip matches which appear to be indexed already.
When doing global indexing from the phrases buffer, searches for some
phrases may match at places where that phrase was already indexed. In
particular when indexing an already processed document again, this
will even be the norm. When this variable is non-nil
,
RefTeX checks if the match is an index macro argument, or if an
index macro is directly before or after the phrase. If that is the
case, that match will be ignored.
nil
means, when indexing from the phrases buffer, wrap lines.
Inserting indexing commands in a line makes the line longer - often
so long that it does not fit onto the screen. When this variable is
non-nil
, newlines will be added as necessary before and/or after the
indexing command to keep lines short. However, the matched text
phrase and its index command will always end up on a single line.
nil
means when sorting phrase lines, the explicit index entry
is used. Phrase lines in the phrases buffer contain a search phrase, and
sorting is normally based on these. Some phrase lines also have
an explicit index argument specified. When this variable is
non-nil
, the index argument will be used for sorting.
nil
means, empty and comment lines separate phrase buffer
into blocks. Sorting will then preserve blocks, so that lines are
re-arranged only within blocks.
reftex-index-phrases-mode
.
nil
means, display the index definition context in the
`*Index*' buffer. This flag may also be toggled from the
`*Index*' buffer with the c key.
nil
means, point in `*Index*' buffer will cause other
window to follow. The other window will show the corresponding part of
the document. This flag can be toggled from within the `*Index*'
buffer with the f key.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
(macro-re search-re highlight). |
nil
means, initially turn automatic viewing of crossref info
on. Automatic viewing of crossref info normally uses the echo area.
Whenever point is idle for more than reftex-idle-time
seconds on
the argument of a \ref
or \cite
macro, and no other
message is being displayed, the echo area will display information about
that cross reference. You can also set the variable to the symbol
window
. In this case a small temporary window is used for the
display. This feature can be turned on and off from the menu
(Ref->Options).
reftex-cite-format
for possible percent
escapes.
nil
means, automatic citation display will revisit files if
necessary. When nil, citation display in echo area will only be active
for cached echo strings (see reftex-cache-cite-echo
), or for
BibTeX database files which are already visited by a live associated
buffers.
nil
means, the information displayed in the echo area for
cite macros (see variable reftex-auto-view-crossref
) is cached and
saved along with the parsing information. The cache survives document
scans. In order to clear it, use M-x reftex-reset-mode.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
"!kpsewhich -show-path=.tex"
.
path-separator
. Directories ending in `//' or `!!' will
be expanded recursively. See also reftex-use-external-file-finders
.
"!kpsewhich -show-path=.bib"
.
path-separator
. Directories ending in `//' or `!!' will
be expanded recursively. See also reftex-use-external-file-finders
.
(type . (def-ext other-ext ...))
type: File type like |
nil
means, search all specified directories before trying
recursion. Thus, in a path `.//:/tex/', search first `./',
then `/tex/', and then all subdirectories of `./'. If this
option is nil
, the subdirectories of `./' are searched
before `/tex/'. This is mainly for speed - most of the time the
recursive path is for the system files and not for the user files. Set
this to nil
if the default makes RefTeX finding files with
equal names in wrong sequence.
nil
means, use external programs to find files. Normally,
RefTeX searches the paths given in the environment variables
TEXINPUTS
and BIBINPUTS
to find TeX files and BibTeX
database files. With this option turned on, it calls an external
program specified in the option reftex-external-file-finders
instead. As a side effect, the variables
reftex-texpath-environment-variables
and
reftex-bibpath-environment-variables
will be ignored.
(type . program)
.
type is either "tex"
or "bib"
. program is a
string containing the external program to use with any arguments.
%f
will be replaced by the name of the file to be found. Note
that these commands will be executed directly, not via a shell. Only
relevant when reftex-use-external-file-finders
is
non-nil
.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
nil
means, keep buffers created for parsing and lookup.
RefTeX sometimes needs to visit files related to the current
document. We distinguish files visited for
nil
t
1
If a buffer is to be kept, the file is visited normally (which is
potentially slow but will happen only once). If a buffer is to be thrown
away, the initialization of the buffer depends upon the variable
reftex-initialize-temporary-buffers
.
nil
means do initializations even when visiting file
temporarily. When nil
, RefTeX may turn off find-file hooks and
other stuff to briefly visit a file. When t
, the full default
initializations are done (find-file-hook
etc.). Instead of
t
or nil
, this variable may also be a list of hook
functions to do a minimal initialization.
\include
or \input
is
matched by any of the regular expressions in this list, that file is not
parsed by RefTeX.
nil
means, re-parse only 1 file when asked to re-parse.
Re-parsing is normally requested with a C-u prefix to many RefTeX
commands, or with the r key in menus. When this option is
t
in a multifile document, we will only parse the current buffer,
or the file associated with the label or section heading near point in a
menu. Requesting re-parsing of an entire multifile document then
requires a C-u C-u prefix or the capital R key in
menus.
nil
means, save information gathered with parsing in files.
The file `MASTER.rel' in the same directory as `MASTER.tex' is
used to save the information. When this variable is t
,
nil
means, RefTeX may rescan the document when this seems
necessary. Applies (currently) only in rare cases, when a new label
cannot be placed with certainty into the internal label list.
nil
means use a separate selection buffer for each label
type. These buffers are kept from one selection to the next and need
not to be created for each use - so the menu generally comes up faster.
The selection buffers will be erased (and therefore updated)
automatically when new labels in its category are added. See the
variable reftex-auto-update-selection-buffers
.
nil
means, selection buffers will be updated automatically.
When a new label is defined with reftex-label
, all selection
buffers associated with that label category are emptied, in order to
force an update upon next use. When nil
, the buffers are left
alone and have to be updated by hand, with the g key from the
label selection process. The value of this variable will only have any
effect when reftex-use-multiple-selection-buffers
is
non-nil
.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
nil
means, use fonts in label menu and on-the-fly help.
Font-lock must be loaded as well to actually get fontified
display. After changing this option, a rescan may be necessary to
activate it.
nil
means, re-fontify the context in the label menu with
font-lock. This slightly slows down the creation of the label menu. It
is only necessary when you definitely want the context fontified.
This option may have 3 different values:
nil
t
1
reftex-use-fonts
is nil
.
nil
means, highlight selected text in selection and
`*toc*' buffers. Normally, the text near the cursor is the
selected text, and it is highlighted. This is the entry most
keys in the selection and `*toc*' buffers act on. However, if you
mainly use the mouse to select an item, you may find it nice to have
mouse-triggered highlighting instead or as well. The
variable may have one of these values:
nil No highlighting. cursor Highlighting is cursor driven. mouse Highlighting is mouse driven. both Both cursor and mouse trigger highlighting. |
Changing this variable requires to rebuild the selection and *toc* buffers to become effective (keys g or r).
reftex-highlight-selection
.
reftex-highlight-selection
.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
nil
means, make additional key bindings on startup. These
extra bindings are located in the users `C-c letter'
map. See section 6.2 Default Key Bindings.
nil
, RefTeX
will
- supply labels in new sections and environments (flag 1) - supply arguments for macros like |
You may also set the variable itself to t or nil in order to turn all
options on or off, respectively.
Supplying labels in new sections and environments applies when creating
sections with C-c C-s and environments with C-c C-e.
Supplying macro arguments applies when you insert such a macro
interactively with C-c RET.
See the AUCTeX documentation for more information.
nil
means, follow-mode will revisit files if necessary.
When nil, follow-mode will be suspended for stuff in unvisited files.
nil
means, allow arguments of macros to be detached by
whitespace. When this is t
, the `aaa' in `\bbb
[xxx] {aaa}' will be considered an argument of \bb
. Note that
this will be the case even if \bb
is defined with zero or one
argument.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
RefTeX has the usual general keymap and load-- and mode-hook.
Furthermore, the 4 modes used for referencing labels, creating citations, the table of contents buffer and the phrases buffer have their own keymaps and mode hooks. See the respective sections. There are many more hooks which are described in the relevant sections about options for a specific part of RefTeX.
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated by XEmacs shared group account on December, 19 2009
using texi2html 1.65.