5

I know that TeX Users Group recommends putting your local texmf tree at ~/Library/texmf (see link). However, I want MacTeX to see my local texmf tree in a folder in my Dropbox. This allows me to refer to the same local texmf tree on multiple computers, which makes updating my local texmf tree easier (just update the version in the Dropbox and all the computers see the update).

How do I do this?

Note: I found some similar tex.stackexchange questions, but they don't answer my question.

3
  • Could you elaborate a bit more on why tex.stackexchange.com/questions/30494/… doesn't cover this: you just need to add the appropriate location.
    – Joseph Wright
    Nov 15, 2013 at 18:22
  • @JosephWright The answers in tex.stackexchange.com/questions/30494/… use TeXLive commands, which don't exist in MacTeX. For example, when I try to run tlmgr or kpsewhich in the Terminal, bash tells me command not found Nov 15, 2013 at 20:36
  • 2
    MacTeX is TeX Live plus a few extras: if you don't get tlmgr at the Terminal then something is (badly) up with your MacTeX installation.
    – Joseph Wright
    Nov 15, 2013 at 20:39

1 Answer 1

0

Here is how I arrived at the solution.

First, I tried to run tlmgr but I got an error:

my-iMac:~ myname$ tlmgr
-bash: tlmgr: command not found

Based on Joseph Wright's comment, I realized that tlmgr must be installed. The question then was: where is it located in the file system?

Based on tlmgr is not accessible after installing TeX Live 2011 on a Ubuntu system, I found that on my system, tlmgr is located at

/usr/local/texlive/2013/bin/x86_64-darwin/tlmgr

Therefore, to add the folder ~/Dropbox/computer/localtexmf to the LaTeX search path, I ran the command:

sudo /usr/local/texlive/2013/bin/x86_64-darwin/tlmgr conf texmf TEXMFHOME "~/Library/texmf:~/Dropbox/computer/localtexmf"
8
  • Although this worked, it's not a long-term solution, since there is something wrong with how your path is set up in the command line. On a properly set up MacTeX system, which tlmgr should return /usr/texbin/tlmgr. Do you possibly have a MacPorts version of TeX installed as well? What does echo $PATH return?
    – Alan Munn
    Nov 16, 2013 at 3:10
  • @AlanMunn I installed MacTeX by downloading MacTeX.pkg from tug. Should I instead have used MacPorts or Homebrew? echo $PATH returns /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin. According to tug FAQ, the PATH should be set up manually by modifying the shell startup script. Nov 16, 2013 at 15:10
  • No, you shouldn't have installed via MacPorts or Homebrew. But it's very odd that your path isn't set correctly. See my answer to Where is PATH modified to include /usr/texbin? for the correct way to fix your path system-wide. You may need to logout and back in for it to take effect. (Or perhaps just close and reopen the Termina.)
    – Alan Munn
    Nov 16, 2013 at 20:13
  • 1
    Perhaps you are overwriting the path completely in a .bash_profile or .bashrc? If you make a brand new account, does the path show up correctly?
    – Alan Munn
    Nov 17, 2013 at 4:11
  • 1
    @AlanMunn Indeed, there is a .bash_profile file that has the contents export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin. When I delete the .bash_profile file, and restart Terminal, now /usr/texbin is on the path and the Terminal can find the tlmgr command. Thanks! Nov 17, 2013 at 17:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .