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?

• 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. Oct 28, 2011 at 1:33
• 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. Oct 28, 2011 at 1:39
• Also note that the subfigure page states that the subfigure package is obsolete and that you should use subfloat. Oct 28, 2011 at 1:43
• tlmgr update --self --all Oct 28, 2011 at 1:55

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.
• For reference, could you mention the subcaption package as an alternative for the OP. Oct 28, 2011 at 2:02
• 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. Oct 28, 2011 at 2:53