-
Notifications
You must be signed in to change notification settings - Fork 74
Installing custom packages
You might have developed your own package and want it available from anywhere in your system or you might want to try the packages available on this repository or you could want to test the custom package from a friend. For all those reasons, you will want to be able to install custom packages!
To install custom packages, first download or write them. Then, you will have to run this command kpsewhich -var-value TEXMFHOME
in the command-line (on Windows, open the command-line using Windows + r
, then type "cmd" and hit enter; on Mac OS, just open the application named Terminal; under Linux open the shell as usual). This program is normally installed automatically along your LaTeX distribution. The command above should give you the so-called TEXMFHOME variable value. It is the default directory in which LaTeX will look for your custom packages. Normally, the value is something like "someDirectory/texmf" (Linux: ~/texmf; Windows: C:/texmf or C:/Users/yourUsername/texmf).
In that directory, let's create the following folders: someDirectory/texmf/tex/latex/yourPackageName/. You can now paste in yourPackageName/ your custom package files.
Please, do me a big favor and always create a new folder when you add a new package. Keep this directory as clean as possible!
Finally, if you want LaTeX to find your package, you will probably need to run the following command (once again in the command-line): texhash
. It will update the package index and add yours to it.
You should now have your package recognized when you add it to your LaTeX file using \usepackage!
Note: the texmf directory is special directory for TeX. Therefore, you need to respect the Tex Directory Structure (TDS). For example, if you want to add your custom Biber style package, put it in /texmf/bibtex/bst/.