Is it possible to use \includegraphics within the caption of a figure? When I try, I get an error. Here is a complete (sans graphics) minimal example that also demonstrates why I want to do this:
\documentclass{article}
\usepackage{graphicx}
\newcommand{\Triangle}{\raisebox{-0.3em}{\includegraphics[height=1.25em]{triangle}}}
\begin{document}
% this use of \Triangle below works fine:
\Triangle
\begin{figure}[ht]
% \includegraphics{...}
\caption{example caption \Triangle . }
\end{figure}
\end{document}
I do this because I need to include small symbols into the text, which I have as PDF graphics (it's not just a basic triangle---I know I could get that as a character). If I remove the \newcommand part and just do a plain \includegraphics, I get the same error.
This is the error I get:
./Untitled.tex:12: Argument of \@caption has an extra }.
<inserted text>
\par
l.12 \caption{example caption \Triangle . }