I need to put an image "tinyimage" inside the caption of a subfloat of the subfig package.
Minimal not working example:
\documentclass{scrbook}
\usepackage{graphicx}
\DeclareGraphicsExtensions{.pdf}
\usepackage{subfig}
\begin{document}
\begin{figure}
\subfloat[\includegraphics{tinyimage}]{\includegraphics{bigimage}}
\end{figure}
\end{document}
So far I tried the following:
- put a \protect{} around the \includegraphics{} in the caption.
- store the \includegraphics{} in a \savebox and put \usebox in the caption.
The error I get is:
Argument of \sf@@@subfloat has an extra }. ...phics{tinyimage}]{\includegraphics{big image}}