# How do I install psfig.sty in MacTeX?

I just installed MacTeX, and I'm trying to compile a document, but I get the following error:

! LaTeX Error: File psfig.sty' not found.


The preamble is as follows:

\documentclass[12pt]{article}
\usepackage{psfig}
\usepackage{subfigure}
\usepackage{rotating}
\usepackage{fullpage}
\usepackage{setspace}
%\singlespacing
%\onehalfspacing
\doublespacing
\usepackage{mathptm}
\usepackage{amsmath}
%\usepackage{cite}
\usepackage{bibentry}
\usepackage{fancyhdr}


I tried updating everything using TeX Live Utility, but that didn't fix it.

Where can I find psfig.sty and how do I install it?

• psfig is a very obsolete package. Use graphicx – egreg May 5 '12 at 17:21
• Further to @egreg's comment: Rather use \usepackage{graphicx} and then use \includegraphics{file}. graphicx searches for the appropriate file extension (.pdf, .eps, ...) and if you're using pdflatex, conversion from PS to EPS should be automated. – Werner May 5 '12 at 19:03
• Thank you both! How do I close out this question? – Mark Richman May 5 '12 at 20:51

## 2 Answers

To allow this question to be closed, I'll wrap up the above comments by egreg and Werner into a short answer.

psfig is an obsolete package that should not be used anymore. Instead, use graphicx. This allows you to insert an external file name.ext by using the command \includegraphics{name} where .ext is automatically appended from a list of appropriate file extensions, such as .pdf, .eps, .png, .jpg, … The exact list of extensions depends (a) on your driver (e.g., pdftex) and (b) on the manually selected list of extensions specified by \ DeclareGraphicsExtensions{…}. Read more about graphicx here: http://en.wikibooks.org/wiki/LaTeX/Importing_Graphics

• It may be obsolete, but the OP was asking how to deal with a document that uses this package. So saying "don't use it" is not a good answer. – Leopd Oct 11 '12 at 18:29

I solved a similar problem

! LaTeX Error: File psfig.tex' not found.


by downloading the file psfig.tex from here and putting it in the same directory as the file I was converting. Then the formatting worked fine.

Hope this helps.

• The default package repository is available from CTAN. – Werner Oct 11 '12 at 18:38
• @werner: yes, and the ctan catalogue says it's non-free (nosell, in this case). that's why it's not in tex live, and consequently not in mactex. – wasteofspace Oct 11 '12 at 18:49
• @lockstep, psfig.tex must be renamed to psfig.sty then it works fine. – Arash Toudeshki Apr 12 '13 at 15:25