1

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.

redmouse
  • 653
  • 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 08 '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 08 '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 08 '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 09 '15 at 06:17
  • Thanks very much guys. I used the "make-local-texmf" app and successfully installed my package. – redmouse Oct 09 '15 at 21:41
  • And I also figured out my initial problem. Here it is, which may help someone else; or it simply shows that I'm silly... If I go to "Finder-->Go-->Home", there is a folder "Library" there. And it turned out that this is not the "Library" folder people refer as "~/Library/texmf/tex/latex". So, it did not work if I create texmf there. The right path, at least for me, is "Finder-->Go-->Home-->Users-->(Your account name)", and there is a hidden folder "Library" folder over there. And if you create texmf there and follow all instructions, it works. – redmouse Oct 09 '15 at 21:47
  • Which 'make-local-texmf' app? – cfr Aug 29 '16 at 02:41

0 Answers0