# Setting up TEXINPUTS on MacOS Catalina

I use MacOS, LateXTools in Sublime Text as a TeX editor, and MacTeX as a TeX distribution. I store my macros in a folder named TEXINPUTS on Dropbox, and set up symlinks to the relevant location in my texmf tree.

`sudo ln -s /Users/nickriches/Dropbox/TEXINPUTS /usr/local/texlive/texmf-local/tex/latex`

This has worked fine under a variety of different MacOSes, but I am running into problems under MacOS Catalina. When I compile a document, it does not find the relevant .tex files stored in TEXINPUTS. This is very odd because when I do a system check with LaTeXTools, the location where the symlink has been created shows up as possible path for TEXINPUTS;

`:/usr/local/texlive/texmf-local/tex/latex`

So as far as I can see, TeX knows where to look. But it is still not finding the relevant .tex files. I've also tried setting the variable on the command line using EXPORT;

`export TEXINPUTS=.:/usr/local/texlive/texmf-local/tex/latex/\$TEXINPUTS`

which didn't work. Finally, I tried to enter the path in LaTeXTools builder settings;

`("env:" {"TEXINPUTS": ".:/usr/local/texlive/texmf-local/tex/latex/TEXINPUTS"}`

but for some reason, when I did this I lost the ability to compile any document.

Any pointers greatly welcomed!

• you want a trailing `:` in `("env:" {"TEXINPUTS": ".:/usr/local/texlive/texmf-local/tex/latex/TEXINPUTS"}` otherwise you not only add your directory, you remove all the standard places. similarly your export should have no`\$` and should have a `:` so `export TEXINPUTS=.:/usr/local/texlive/texmf-local/tex/latex/TEXINPUTS:` or if the issue is the symlink use `/Users/nickriches/Dropbox/TEXINPUTS` instead of `usr/local/texlive/texmf-local/tex/latex/TEXINPUTS` ? Jun 20, 2020 at 10:14
• I'm not sure what is happening that changed when you installed Catalina gut I know that Dropbox sometimes leads to problems.. Assuming you are using the TeX Live installed by the MacTeX installer why not put the link in your personal tree, `~/Library/texmf/tex/latex`? Jun 20, 2020 at 12:38
• Thanks for tip about colon at end of path, but adding it via "export" or in the LaTeXTools settings does not help. I didn't understand the issue about the symlink. I need to link from dropbox to relevant location in texmf. The path mentioned by Herb does not exist in MacOD Catalina Jun 20, 2020 at 16:30
• Okay, I have now done this. In the first place, the path I used to create the symlink was wrong! Secondly, I needed to place the path in the LaTeXTools settings file. Although the relevant path is appearing when LaTeXTools does a systems check for some reason it will not look in that location when compiling unless the path is added to the settings file. I was able to do this with help from David - I hadn't known it was necessary to add the colon at the end. I am not sure whether to put this as an answer myself, or maybe David can place his comment as an answer, and I can tick it. Jun 20, 2020 at 17:23

With MacTeX, TeX will look in `~/Library/texmf/tex` and its subdirectories for input files, so the simplest approach is to put the symlink under that directory.
Ahh... My path was wrong. It needed to end `TEXINPUTS/TEXINPUTS` as for some reason I had placed the genuine TEXINPUTS folder inside another one called `TEXINPUTS`.