I am using TeX Live 2012/Debian on Linux Mint 14.
I am wondering what the right definition of the
TEXINPUTS variable is.
You can always put your personal files in a proper subdirectory of
~/texmf; for instance, your personal
.sty files could go in
This "personal tree" is always consulted for input files before the other trees and doesn't need hashing (with
mktexlsr). This is by far the preferred method for personal input files.
If instead you have a folder somewhere, you can set the variable TEXINPUTS in the environment by saying something like
// means that TeX programs will search recursively in that folder; the trailing colon means "append the standard value of
TEXINPUTS" (which you don't need to provide).
TEXINPUTS is usually not set; it takes a value as soon as a TeX program is started (by reading a set of
texmf.cnf files). However, if the program finds it in the environment, it follows the rule sketched above.
If you need the current directory to be searched for inputs before the local one, then
should be the best choice.
The question asks for a definition of the environmental variable TEXINPUTS: it controls where LaTeX searches for input files, the default is:
TEXINPUTS can contain a list of paths. I am using "xelatex" on windows, and in that environment you must separate the separate path entries by semicolon. Colon will not work. If you want LaTeX to find files in the current folder be sure to include a "." in as one of the entries. Some sources sensibly recommend adding your personal path into the existing setting without looking the rest of the path by using a construct like this:
The other answer seems to be on the subject of how to use it (and there are plenty of comments saying simply don't use it.) However, in my case, I have a collection of content stored in a source management system organized according to the team that maintains the content, but we need to compose a book out of various selections of the content pieces. Putting that content into a particular folder on the current machine is out of the question. We have to have a way for each book specify where to find all the content. We have not found any other way to specify in the build script where LaTeX is supposed to find all the pieces of the book.