I am using MacTex 2017 with OS X High Sierra. When I try to compile a .tex file using pdflatex it gets stuck at finding a package packagename.sty.
After some searching that I found those packages installed inside the directory
/usr/local/texlive/2017/texmf-dist/tex/latex/packagename/packagename.sty
When I run sudo texhash I get
texhash: Updating /opt/local/etc/texmf/ls-R...
texhash: Updating /opt/local/share/texmf/ls-R...
texhash: Updating /opt/local/share/texmf-local/ls-R...
texhash: Updating /opt/local/share/texmf-texlive/ls-R...
texhash: Updating /opt/local/var/db/texmf/ls-R...
texhash: Done.
I did not find packagename.sty inside any of the files above.
But if I set the variable TEXINPUTS as,
export TEXINPUTS=$TEXINPUTS:/usr/local/texlive/2017/texmf-dist/tex/latex/packagename/
Then pdflatex is able to find packagename.sty.
So my question is how do I tell texhash to update the config files to tell pdflatex to find the packages inside the directory /usr/local/texlive/2017/texmf-dist/tex/latex/<packages> automatically without having to set the variable TEXINPUTS myself ?
related question : How does LaTeX find package files?
rootdoesn't have your TL'17 system on the path, but rather MacPorts or similar – Joseph Wright Nov 27 '17 at 21:16echo $PATHreturn when run in Terminal? – Herb Schulz Nov 27 '17 at 21:43/opt/local/bin:/opt/local/sbin:/sw/bin:/sw/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/opt/X11/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/usr/local/heroku/bin
– UnadulteratedImagination Nov 27 '17 at 22:13export PATH=/Library/TeX/texbin:$PATHto the bottom of your.profileand/or.bash_profilefound in you HOME folder so that the TeX Live installed by MacTeX is found before the other distributions. MacPortsand Fink play with you PATH variable. – Herb Schulz Nov 27 '17 at 23:20