TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've tried following the advise in other postings here, but nothing is working and I'm now afraid I'm going to break something.

I've tried setting:

export TEXINPUTS=.:~/projects/ini/latex/texmf:$TEXINPUTS

I've tried running

sudo texhash ~/projects/ini/latx/texmf

But neither work.

The files I'm expecting LaTeX to find are


What am I not doing or doing wrong?

share|improve this question
I don't have the variable $TEXINPUTS. What is it? – Sigur Jan 26 '13 at 22:58
@sigur, I'm not entirely sure. I was just trying to follow advice to similar questions posted here, but not succeeding. – A.Ellett Jan 26 '13 at 22:59
You should put your first code in the file .bashrc on your home folder. – Sigur Jan 26 '13 at 23:02
@sigur. Yes. That's were I put the export... – A.Ellett Jan 26 '13 at 23:04
You're missing the trailing double slash for recursive searches: .:~/projects/ini/latex/texmf//: Don't add $TEXINPUTS which is nil in the environment; just a trailing colon stands for "add the usual value of the variable". – egreg Jan 26 '13 at 23:09
up vote 8 down vote accepted

will just look in that directory you want a path component of


to search subdirectories.

These days it is probably more common to set things in texmf.cnf configuration rather than use environment variables, although the same path syntax applies either way.

So on my TeXLive 2012 system I have:

$ kpsewhich texmf.cnf

and that file looks like

$ more /usr/local/texlive/2012/texmf.cnf
% (Public domain.)
% This texmf.cnf file should contain only your personal changes from the
% original texmf.cnf (for example, as chosen in the installer).
% That is, if you need to make changes to texmf.cnf, put your custom
% settings in this file, which is .../texlive/YYYY/texmf.cnf, rather than
% the distributed file (which is .../texlive/YYYY/texmf/web2c/texmf.cnf).
% And include *only* your changed values, not a copy of the whole thing!

If you look at the file it references in the web2c directory it is mostly comments just detailing all the things you can set. Note texmf.cnf files look a bit like shell environment settings but they are not they are read directly by the kpathsea library of TeX and work cross platforms including systems without a usable shell.

share|improve this answer
Do I just make a texmf.cnf file and put it in my home directory? – A.Ellett Jan 26 '13 at 23:14
What other variables might be good to set and put in texmf.cnf – A.Ellett Jan 26 '13 at 23:15
updated with example – David Carlisle Jan 26 '13 at 23:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.