18.8 Finding Files

User Option: reftex-texpath-environment-variables

List of specifications how to retrieve the search path for TeX files. Several entries are possible.

  • If an element is the name of an environment variable, its content is used.
  • If an element starts with an exclamation mark, it is used as a command to retrieve the path. A typical command with the kpathsearch library would be "!kpsewhich -show-path=.tex".
  • Otherwise the element itself is interpreted as a path.

Multiple directories can be separated by the system dependent path-separator. Directories ending in ‘//’ or ‘!!’ will be expanded recursively. See also reftex-use-external-file-finders.

User Option: reftex-bibpath-environment-variables

List of specifications how to retrieve the search path for BibTeX files. Several entries are possible.

  • If an element is the name of an environment variable, its content is used.
  • If an element starts with an exclamation mark, it is used as a command to retrieve the path. A typical command with the kpathsearch library would be "!kpsewhich -show-path=.bib".
  • Otherwise the element itself is interpreted as a path.

Multiple directories can be separated by the system dependent path-separator. Directories ending in ‘//’ or ‘!!’ will be expanded recursively. See also reftex-use-external-file-finders.

User Option: reftex-file-extensions

Association list with file extensions for different file types. This is a list of items, each item is like: (type . (def-ext other-ext ...))

type:       File type like "bib" or "tex".
def-ext:    The default extension for that file type, like ".tex" or ".bib".
other-ext:  Any number of other valid extensions for this file type.

When a files is searched and it does not have any of the valid extensions, we try the default extension first, and then the naked file name.

User Option: reftex-search-unrecursed-path-first

Non-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.

User Option: reftex-use-external-file-finders

Non-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.

User Option: reftex-external-file-finders

Association list with external programs to call for finding files. Each entry is a cons cell (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.