I couldn't find any satisfying solution to this problem I had for years so I finally decided to ask it myself.
I want to create a folder outside the usual latex directories (e.g. /Users/myname/Dropbox/tex-style) and put my own me.sty files in that folder. The goal is when I import these new .sty files, I can directly write
\usepackage{me}
instead of writing
\usepackage{/Users/myname/Dropbox/tex-style/me}
I have tried many things, including adding a new path /Users/myname/Dropbox/tex-style to TEXMFHOME in texmf.cnf. Then I tried kpsewhich -var-value=TEXMFHOME and the new directory does show up. But when I compiled my latex file, it still couldn't find me.sty. How can I do such things for TexLive on MAC-OS?
I found the above proposal in this post. But it doesn't work for me as described above. Please help!
Thanks in advance!
I do not understand why my question is closed. The link does not answer my question as it is about Windows system. My question is about MacOS.
kpsewhich --var-value=TEXMFLOCALin my terminal and it DOES return the folder I wanted. However, latex still does not compile and outputs error "cannot find .sty file" – Riley Zhang Feb 11 '22 at 12:04