[Tex/LaTex] How to install CTAN packages on Mac OS with TexShop

installingpackagestexshop

I run TexShop on my Mac OS 10.6.

I'd like to install new packages like this: http://www.ctan.org/tex-archive/macros/latex/contrib/listings/

How do I install it? I've downloaded the zip file.

Best Answer

I will assume you are using MacTeX (The Mac specific distribution of TeXLive)

Before answering your question, the listings package you mention is part of the TeXLive distribution. You don't actually have to install it, it is already there. Just include the line

\usepackage{listings}

in your preamble.

If you have to install a package, there are several quick ways to install a package.

  1. For packages found on CTAN: use the TeX Live Utility found in your /Applications/TeX folder. This application can keep all of your TeX packages up to date.
  2. Place the relevant files in ~/Library/texmf/tex/latex. TeX will find them.
  3. Enter tlmgr install *packagename* in the Terminal.pp window

I hope this helps.