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
After some searching that I found those packages installed inside the directory
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,
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?