I am trying to define captions in longtable enviroment. According to Adding a caption to a graphic inside a longtable I should define:


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?


Thanks to David Carlisle there was a missing '}' However, corrected the definition, and adding




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??

  • 1
    Please provide a full MWE that generates the problem behavior you're looking to fix. Please be sure to state which TeX distribution you use, which packages you load, and a minimal longtable environment that contains a \figcaption statement. – Mico Apr 8 '15 at 2:35
  • Your sample definition is missing a closing } it has four { and only three } – David Carlisle Apr 8 '15 at 7:36
  • 1
    hmm Just saw where you copied that from:-) I fixed it there. – David Carlisle Apr 8 '15 at 7:38

I solved the problem: the trick is use \parbox{..} e.g.:

\node[anchor=south west,inner sep=0] (image) at (0,0) { \includegraphics[scale=0.8]{image} };
\figcaption{label: lol.}}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.