Every TeX distribution expects to find personal additions (such as private style files or packages not part of the main distribution) in a local folder or directory. The name of this folder is 'texmf' and it has a specific structure of sub-folders so that the TeX programs can find files correctly.

On a Mac, the local texmf folder is located in the Library folder of your Home directory. This is usually notated as "~/Library/texmf", where the "~" means "your home directory" (i.e. what you get when you click on the Home icon in a finder window.).

## When should I put things in the local texmf ?

Before putting anything into the local texmf folder, you should check that the relevant package isn't already part of TeXLive, and therefore included in the MacTeX distribution. The easiest way to do this is to use the TeXLive utility. This is especially true of packages on CTAN, most of which are included in TeXLive, and should already be available to you. If you know that a package is not available as part of TeXLive, then you should put it into your local texmf folder.

## What goes where?

The texmf folder contains a number of folders, and these folders themselves contain other folders. For most users, the three top-level folders that are most important are the following:

Folder | What goes in it
--- | ---
bibtex | This is where bib files and bst files go. It should contain at least the following folders:
bst | Put bst files here.
bib | Put bib files here.
tex | This is where new packages go. It should contain the following folders:
latex | Put latex packages here.
plain | Put plain tex files here.
xelatex | Put xelatex specific packages here.
xetex | Put plain xetex files here.
context | Put context files here.
generic | Put files that are usable with any TeX flavor here.
doc | Put documentation files from packages installed in the tex folder here. Putting the documentation files here allows them to be found by the texdoc system (or the "Show Help for Package" function in the Help menu of TeXShop).

Other top-level folders in include fonts, scripts, and source.

## Environment Variables

On other Unix machines, tex is sometimes notified of the location of personal input files by setting the environment variables TEXINPUTS, BSTINPUTS, and BIBINPUTS. This is almost never necessary with TeX Live; instead put personal input files in appropriate subdirectories of ~/Library/texmf. Under very special circumstances, these environment variables can be set. Mac OS X allows users to notify programs about environment variables by creating a file in their home directory named ~/.MacOSX/environment.plist. These environment variables get picked up by all user shells and all Carbon and Cocoa programs, so caution should be used when creating the file.

Below is a sample environment.plist file sent me by Nathan Potter; thanks! For further details, consult

http://developer.apple.com/qa/qa2001/qa1067.html.

Advanced Help
Adding Personal Sty and Macro Files to TeX Live