1

Consider this script:

\documentclass{report}
\usepackage{subfig}
\usepackage{graphicx}
\usepackage{lipsum}
\begin{document}
\begin{figure}[htp]
  \subfloat[\lipsum[1]]{
    \includegraphics{example-image-a}
  }
\end{figure}
\end{document}

I would like to use lipsum in the caption of the subfloat. I get the following error:

! Argument of \lipsum  has an extra }.
<inserted text> 
                \par 
l.8   \subfloat[\lipsum[1]]
                           {

What is wrong?