Adding Macro Packages to TeX
Installing additional (La)TeX input files (macro packages) for your own account can be done in either of two ways.
The easy way is to copy the files into the directory in which you run TeX.
A slightly more complicated way is to put the files into a subdirectory of a directory named texmf in your home directory. If the input files come from a package on CTAN, they may be packaged in such a way that you can unzip the package file within texmf and things will go into the correct places. In such cases, you should always list the contents of the zip or tar file before extracting, and also read the README file.
As a last step, you should run the program
texhash
in order to allow (La)TeX to find the files more readily. (This step is not necessary if you put the files in the directory in which you run (La)TeX.)
LaTeX Packages Provided as .ins and .dtx files
If the input files consist of a LaTeX package, and are provided as a pair of .ins and .dtx files, then you should run LaTeX on both files:
latex package.ins latex package.dtx
The first step extracts the package files, and the second step extracts the documentation files. After doing this the .ins and .dtx files are no longer needed.