I'm using TeXShop on my Macbook. After I upgraded my system to El Captain, my TeXshop stopped typesetting. I reinstalled the complete version of MacTex 2015 again. It turned out that a package I used for many of my papers is missing.

It is a .sty file written by a friend so it is not on TeX Live. I tried some methods I found online, e.g. How do I add a .sty file to my MacTeX/TeXShop installation?. But it does not work. I created ~/library/texmf but TeXshop still cannot find the package. I remember that last time I installed that package, this method did not work for me, and I copied that .sty file into some other folder somewhere under usr/...

I also tried to use commands directly in terminal. But the new system on Mac totally forbids any change to usr/... and I just have no way to either use terminal or copy the file into a folder under usr/...

So, I would appreciate it if someone can help me out.

  • Welcome! mkdir -p $(kpsewhich -var-value TEXMFHOME)/tex/latex/<special-package>; mv <filename>.sty $(kpsewhich -var-value TEXMFHOME)/tex/latex/<special-package>/. Where <filename>.sty is the .sty file and <special-package> is the name of the package (without special characters, spaces etc. i.e. just letters and hyphens, if needed). – cfr Oct 8 '15 at 23:26
  • Even Apple have not gone quite so far as to banish the command line altogether. They have just decided to prevent you making changes to your own system which you own and they do not. Be that as it may, you do not need to make changes to /usr. You do need to use Terminal to run the above commands. But that should work fine. – cfr Oct 8 '15 at 23:28
  • Incidentally, you probably copied it to somewhere under /usr/local. If you wish, you can do that by using sudo and replacing TEXMFHOME with TEXMFLOCAL. This will also work fine. (/usr/local can be modified - only /usr and things other than local under /usr cannot.) If you do that, you also then need to run sudo mktexlsr $(kpsewhich TEXMFLOCAL). This is not necessary for TEXMFHOME. [I assume that your distribution is installed, contrary to upstream's advice, with root privileges. Hence sudo is required.] – cfr Oct 8 '15 at 23:32
  • Exactly where inside ~/Libarary/texmf did you put the package? For LaTeX code, it needs to be inside ~/Library/texmf/tex/latex, for example. – Joseph Wright Oct 9 '15 at 6:17
  • Thanks very much guys. I used the "make-local-texmf" app and successfully installed my package. – H.Hong Oct 9 '15 at 21:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.