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,}//
/usr/share/texmf; it should rather be the one rooted in/usr/local/share/texmf(creating the necessary directories, in not existent). – egreg May 04 '14 at 15:44kpsexpand '$TEXINPUTS'will show you the effective search path on your system. Directories prefixed with!!require texhash, directories followed by//subdirectories are searched recursively – David Carlisle May 04 '14 at 15:44/home/<username>/texmf. – egreg May 04 '14 at 15:47texmfdirectory in your home and in ittex/latex/matlab, where you'll put the.styfile. Notexhashwill be needed. – egreg May 04 '14 at 15:51/home/dustin/texmf/tex/latex/mypackage/mypackage.styshould work and not need texhash – David Carlisle May 04 '14 at 15:54