It looks like you're using Internet Explorer 11 or older. This website works best with modern browsers such as the latest versions of Chrome, Firefox, Safari, and Edge. If you continue with this browser, you may see unexpected results.

# LaTeX: Installing Packages

## Possible Directories to Manually Install Packages

Unfortunately, I cannot list every possible directory, but here are a few that are common.

• For Windows,
• C:\Program Files\MiKTeX 2.9\tex\latex
• C:\texlive\2021\texmf-dist\tex\latex
• For Mac OS,
• ~/Library/texmf/tex/latex (directory might be hidden)
• For Linux,
• /usr/local/texlive/2021/texmf-dist/tex/latex
• /usr/share/texlive/texmf-dist/tex/latex
• /usr/share/texmf-texlive/tex/latex
• /usr/share/texmf/tex/latex

## Installing Packages with an ins file

The best place to find packages for LaTeX is the Comprehensive TeX Archive (CTAN). Sometimes, package files from CTAN consist of an .ins and .dtx file only.

When I first encountered these files, I said, "Huh"? Essentially, the ins file contains all the package files you need and the dtx file contains package documentation. To get the files that you need to put in the latex and bst directories, the pdflatex or latex command must be run. Be sure the .ins and .dtx files are in the same directory.

If you are using TeXstudio, you will need to change the configuration. First, go to Options, then Configure TeXstudio from the menu. Select Commands.

For pdflatex and latex, Change %.tex to ?me

Now you are ready to copy the package files. Be sure to know which files go in the latex directory, such as cls, clo, sty, etc. Don't copy bst, tex, pdf, dvi. The bst file will go in the /bibtex/bst directory.