1

I'm trying to insert a picture in the caption to illustrate something. How can I do that?

Currently, I use the following code, the tex engine prompts uncontrolled sequence error.

\caption{Some caption words. \raisebox{-0.4\height}{\includegraphics[width=1em]{fig}} some other caption words.}
  • 1
    Welcome to TeX.SE! Please extend your code fragment to complete small document which reproduce your problem. Try the following `\documentclass{article} \usepackage[demo]{graphicx}

    \begin{document} \begin{figure} \caption{Some caption words. \protect\includegraphics[width=1em, height=2ex]{fig} some other caption words.} \end{figure} \end{document}(observe commandprotect`!)

    – Zarko Aug 16 '19 at 19:35

1 Answers1

1

You probably don't want the image in the list of tables so use

\caption[short form]{long form with \includegraphics{...}}

The the fragile commands will not be in the "moving argument" used for the table of contents, and the errors will go.

David Carlisle
  • 757,742