22

I use texlive 2012 on ubuntu 12.04. I wanted my ~/texmf folder invisible, so I edited my texmf.cnf file which is in /usr/local/texlive/2012 directory:

TEXMFHOME = ~/.texmf

I rebooted my computer and ran the command

kpsewhich -var-value TEXMFHOME

which gave me /home/myusrname/texmf. I checked texmf.cnf file again and it still had the line above. And my TEXMFHOME really is ~/texmf because I tested one of my .sty file under/.textmf and it did not work, while it still worked under ~/texmf.

Should I change something else to change my TEXMFHOME?

Byeongho Lee
  • 321
  • 1
  • 2
  • 5
  • There is no need to reboot ! Have you added a newline at the end of your texmf.cnf file? – Paul Gaborit Sep 14 '12 at 06:25
  • 1
    Doesn't solve the texmf.cnf issue itself, but couldn't you just set TEXMFHOME in your .profile? – Joseph Wright Sep 14 '12 at 06:29
  • I tried on Mac OS X and it works; as Paul Gaborit says, there is no need to reboot. What's the answer of env | grep TEXMF? – egreg Sep 14 '12 at 09:37
  • 2
    Are you using the correct kpsewhich? Maybe the one from Ubuntu is interfering. What does "which kpsewhich" say? – norbert Sep 14 '12 at 09:37

2 Answers2

24

In Ubuntu:

$ kpsewhich -var-value TEXMFHOME
/home/gpoo/texmf
$ export TEXMFHOME=$HOME/.texmf
$ kpsewhich -var-value TEXMFHOME
/home/gpoo/.texmf

You can export the variable in your .bashrc file as:

if [ -d ~/.texmf ] ; then
    export TEXMFHOME=~/.texmf
fi
lockstep
  • 250,273
gpoo
  • 342
10

The standard procedure you followed is correct. Edit

/usr/local/texlive/2012/texmf.cnf

to contain

TEXMFHOME = ~/.texmf

(better ensure a trailing return). There is no need to reboot.

However, if the output of kpsewhich --var-value TEXMFHOME is not ~/.texmf, then probably you have set TEXMFHOME in your environment (probably in the .bashrc file). Check the output of

env | grep TEXMF

to see if this is the case. If it is, then you have to find where the variable is being set and remove it.

egreg
  • 1,121,712