[Tex/LaTex] Create a local texmf tree in MacTeX

mactextexmf

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.

Best Answer

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"
Related Question