I am trying to define captions in longtable enviroment. According to Adding a caption to a graphic inside a longtable I should define:
\makeatletter
\def\figcaption{%
\refstepcounter{figure}%
\@dblarg{\@caption{figure}}}
\makeatother
and then use
\figcaption{my caption}
However defining \figcaption produce the following error in texstudio: "Illegal parameter number in definition of \figcaption." I think there is a conflict with some package... maybe hyperref ? What can I do?
EDIT
Thanks to David Carlisle there was a missing '}' However, corrected the definition, and adding
\figcaption{lol}
after
\includegraphics[keepaspectratio,width=0.1\linewidth]{image}
gives a new errors: You can't use `\hrule' here except with leaders. \figcaption{lol} Missing number, treated as zero. \figcaption{lol} Illegal unit of measure (pt inserted). \figcaption{lol} Missing \endgroup inserted. \figcaption{lol} ....
What happened??
longtable
environment that contains a\figcaption
statement.}
it has four{
and only three}