TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 23 down vote accepted

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


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.

share|improve this answer
Thanks for your answer! My Tex Live Utility crashed on launch no matter how many times I tried. I went with your second option and it worked really well! Thanks very much! – Enrico Susatyo Feb 26 '11 at 3:51
@Frédéric: Maybe you could reorder your question so that the “you already have this package installed” information is at the top. Past experience has shown that unnecessary manual installation of packages leads to all kind of trouble. People coming here from google searches might only read the first part of your post and run into trouble. (As a side remark, greetings generally not used on this site, as we want to keep the focus on the actual content.) – Caramdir Feb 26 '11 at 4:21
@the_great_monkey: As Frédéric said, listings should be part of your default TeX Live installation, so there should be no need to install it manually. – Caramdir Feb 26 '11 at 4:22
@Carambir: Thanks for the suggestions. I edited my answer accordingly. – Frédéric Feb 26 '11 at 4:48
@Caramdir Ah... that's right. I tried using lstlistings before and I got the message "can not find lstlistings.sty" and then I just realised that I should have used listings! Thanks – Enrico Susatyo Feb 26 '11 at 4:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.