Could someone please tell me why this
\documentclass{article}
\usepackage{graphicx}
\usepackage{subfigure}
\begin{document}
\begin{figure}
\begin{subfigure}
\includegraphics{ngc3242fullslitmag.png}
\end{subfigure}
\end{figure}
\end{document}
gives this error message?
! Argument of \Gin@ii has an extra }.
<inserted text>
\par
l.7 \includegraphics
{ngc3242fullslitmag.png}
Thank you.
Best Answer
The
subfigure
environment is defined by thesubcaption
package. Importantly, it takes one mandatory argument -- the intended width. The following code works fine:Incidentally, the
subfigure
package is seriously deprecated. Don't use it. You should work with either thesubcaption
(as above) orsubfig
package instead.