Monthly Archives: May 2016

Where to place you own .sty or .cls files, to make them available to all my .tex files?

Suppose you have defined a package or a class, but how do you make it available at all times? One way is to just place it in the same folder as the .tex file, but that’s not what I’m after here. This post will tell you a way to “install” the package centrally on your computer.

1. Find out the directory. First, use this command at the command prompt to find out where your TeX home directory is.

```kpsewhich -var-value=TEXMFHOME
```
OS Location
Windows C:/Users/stefan/texmf
Unix-type ~/texmf/
Mac ~/Library/texmf

2. Place files in the “right place”. Following the TeX directory structure, you should place your file in the “right place” like `~/texmf/tex/latex/packagename/packagename.sty`. For a TDS-conformant system (TeX Directory Structure), the “right place” for a LaTeX .sty file is a suitably-named subdirectory of `texmf/tex/latex/`. For a full list of “right place”s, please see LaTeX/Installing Extra Packages. Moreover, for the `beamer` style, put the theme under `beamer/themes/` with “color”, “font”, “inner”, “outer”, and “theme” in seperated subdirectories.