# 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\2018\texmf-dist\tex\latex
• For Mac OS,
• ~/Library/texmf/tex/latex (directory might be hidden)
• For Linux,
• /usr/local/texlive/2018/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.

## Installing Packages with MiKTeX and Windows

The video shows an example of manually installing a package for MikTeX. Need a Transcript? Go to the description on YouTube.

Note: Select 720p from settings button if possible.

Is the video not visible? Check your browser compatibility. If your browser is compatible, Try the video, Installing LaTeX Packages for MiKTeX 2.9 with Windows, on YouTube.

## Installing Packages with MacTeX

The video shows an example of manually installing a package for MacTeX. Need a Transcript? Go to the description on YouTube.

Note: Select 720p from settings button if possible.

Is the video not visible? Check your browser compatibility. If your browser is compatible, Try the video, Installing LaTeX Packages for MacTeX, on YouTube.

## Installing Packages when TeX Live is downloaded from TUG (Ubuntu used as an example)

The video shows an example of manually installing a package when TeX Live is downloaded from TUG. This procedure (except how you run commands as administrator) works for Fedora 25 and OpenSUSE Leap 42.2 as well. Need a Transcript? Go to the description on YouTube.

Note: Select 720p from settings button if possible.

Is the video not visible? Check your browser compatibility. If your browser is compatible, Try the video, Installing LaTeX Packages for TeX Live 2017 on Ubuntu 16.04, on YouTube.