My question is related to Where do I place my own .sty or .cls files, to make them available to all my .tex files? but the solutions don't work and the comments are very cluttered with not all comment information added to the answers (I did read the comments).
I have Ubuntu 12.04 and the most recent TeX Live. My directory is located at /usr/share/texmf/tex/latex
. I added a folder called style
to place Jubob's Matlab style file he created. On the linked thread, they say only older versions need to run texhash
. I can tell you not running and running texhash doesn't work. When I didn't run texhash, TeX Live couldn't find the style file. When I run texhash
, it says
directory not writeable skipping... done.
I ran sudo texhash
as well but the output is the same.
How can we add a style file and make it available on the whole system in LaTeX with the current version of TeX Live.
From @DavidCarisle's comment, I have
dustin@dustin:~$ kpsexpand '$TEXINPUTS'.:{/home/dustin/.texlive2013/texmf-config,
/home/dustin/.texlive2013/texmf-var,
/home/dustin/texmf,
!!/usr/local/texlive/2013/texmf-config,
!!/usr/local/texlive/2013/texmf-var,
!!/usr/local/texlive/2013/../texmf-local,
!!/usr/local/texlive/2013/texmf-dist}/tex/{kpsewhich,generic,}//
Best Answer
The best place for adding personal style files is in
TEXMFHOME
that, on GNU/Linux systems, should be found inThe directory is not automatically created upon installation, because the installer never acts on users' space. So
will suffice in order that the TeX system will be able to find the file. Change
jubobsmatlab
into the real name.