Take the 2-minute tour ×
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.

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?

share|improve this question
4  
psfig is a very obsolete package. Use graphicx –  egreg May 5 '12 at 17:21
1  
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 2

up vote 1 down vote accepted

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

share|improve this answer
    
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.

share|improve this answer
    
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

Your Answer

 
discard

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.