GNU Info

Info Node: (reftex)Finding Files

(reftex)Finding Files


Next: Optimizations Prev: Language Support Up: Top
Enter node , (file) or (file)node

Finding Files
=============

   In order to find files included in a document via `\input' or
`\include', RefTeX searches all directories specified in the
environment variable `TEXINPUTS'.  Similarly, it will search the path
specified in the variables `BIBINPUTS' and `TEXBIB' for BibTeX database
files.

   When searching, RefTeX will also expand recursive path definitions
(directories ending in `//' or `!!').  But it will only search and
expand directories _explicitly_ given in these variables. This may
cause problems under the following circumstances:

   * Most TeX system have a default search path for both TeX files and
     BibTeX files which is defined in some setup file.  Usually this
     default path is for system files which RefTeX does not need to
     see.  But if your document needs TeX files or BibTeX database
     files in a directory only given in the default search path, RefTeX
     will fail to find them.

   * Some TeX systems do not use environment variables at all in order
     to specify the search path.  Both default and user search path are
     then defined in setup files.

There are three ways to solve this problem:

   * Specify all relevant directories explicitly in the environment
     variables.  If for some reason you don't want to mess with the
     default variables `TEXINPUTS' and `BIBINPUTS', define your own
     variables and configure RefTeX to use them instead:

          (setq reftex-texpath-environment-variables '("MYTEXINPUTS"))
          (setq reftex-bibpath-environment-variables '("MYBIBINPUTS"))

   * Specify the full search path directly in RefTeX's variables.

          (setq reftex-texpath-environment-variables
                '("./inp:/home/cd/tex//:/usr/local/tex//"))
          (setq reftex-bibpath-environment-variables
                '("/home/cd/tex/lit/"))

   * Some TeX systems provide stand-alone programs to do the file
     search just like TeX and BibTeX.  E.g. Thomas Esser's `teTeX' uses
     the `kpathsearch' library which provides the command `kpsewhich'
     to search for files.  RefTeX can be configured to use this
     program.  Note that the exact syntax of the `kpsewhich' command
     depends upon the version of that program.

          (setq reftex-use-external-file-finders t)
          (setq reftex-external-file-finders
                '(("tex" . "kpsewhich -format=.tex %f")
                  ("bib" . "kpsewhich -format=.bib %f")))


automatically generated by info2www version 1.2.2.9