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'm getting this error when compiling:

! LaTeX Error: File `subfigure.sty' not found.

Here is part of the relevant code:

\documentclass[11pt]{article}

\usepackage{graphicx}
\usepackage{subfigure}

\setlength{\parindent}{1.4em}

\begin{document}    

\begin{figure}
    \subfigure[Scatter Plot]{
        \includegraphics[height=5cm]{graphs/scatter.pdf}
        \label{sub1}
    }
\end{figure}

\end{document}

Does the error message mean I don't have the subfigure package? Isn't that standard?

I've installed texlive and have run mktexlsr as suggested here but I'm still getting the error. How can I fix this?

share|improve this question
    
Yep, that seems to be a missing pacakge error. However, instead of code snippets, it is always best to compose a compilable MWE that illustrates the problem including the \documentclass so that those trying to help don't have to recreate it. –  Peter Grill Oct 28 '11 at 1:33
    
@PeterGrill Thanks for the tip. –  user8888 Oct 28 '11 at 1:37
    
Thanks that will help. However, the subfigure needs to be within \begin{figure}..\end{figure}, and you need \end{document}. You can also remove the listings and geometry packages as they have no effect on the error here. With those changes this compiles fine for me with TeXLive2011. –  Peter Grill Oct 28 '11 at 1:39
1  
Also note that the subfigure page states that the subfigure package is obsolete and that you should use subfloat. –  Peter Grill Oct 28 '11 at 1:43
    
tlmgr update --self --all –  cmhughes Oct 28 '11 at 1:55

1 Answer 1

up vote 8 down vote accepted

In case you installed TeX Live from the packages of a Linux distro: Most distros split less-used LaTeX-packages into separate (Linux-distro)-packages. From the link in your question I assume that you are running Arch Linux. In this case you need to install the texlive-latexextra package which contains subfigure.sty. If you are using a different distro, the necessary package might be named differently (e.g. texlive-latex-extra in Debian/Ubuntu).

Also, as Peter notes, the subfigure package is depreciated.

share|improve this answer
    
For reference, could you mention the subcaption package as an alternative for the OP. –  cmhughes Oct 28 '11 at 2:02
    
Thanks for adding the package for Ubuntu. That happens to be what I'm using. –  user8888 Oct 28 '11 at 2:08
    
The package repositories in Ubuntu use TeXlive 2009, which is not the most recent version. –  cmhughes Oct 28 '11 at 2:39
2  
To find out which package a file belongs to on a Debian-derived system, use apt-file search $FILENAME. For example you could use apt-file search /subfigure.sty in this case. –  kahen Oct 28 '11 at 2:53
    
In the end, it is much more convenient to use the net install and not to use your distro's packages bbs.archlinux.org/viewtopic.php?id=109427 –  pmav99 Oct 28 '11 at 7:04

Your Answer

 
discard

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