# How can I insert the symbols into the caption of a figure?

I am having plots in my text. In the plots, the data sets are represented by different symbols. I'd like to explain data sets by using the symbols in the caption of the figure too. How can I insert that symbols into te caption ?

for example:

-
what have you tried so far? you might need to \protect them... –  cmhughes Mar 17 '13 at 18:21
unfortunately, I don't have any idea how to solve this problem and I don't even know what the \protect is for –  Yirmidokuz Mar 17 '13 at 18:27
I'd recommend (a) keeping the caption short and (b) putting the This work: ... [blue open pentagon]. material into a legend. –  Mico Mar 17 '13 at 18:53
I think the Mico's recomendation is the best idea. –  jpayansomet Mar 17 '13 at 19:26

You can find the symbols you need in symbols-a4.pdf. You can change their colour using the color package or the xcolor package.

\documentclass[12pt]{article}
\usepackage{color}
\usepackage{MnSymbol}
\definecolor{orange}{rgb}{1.0,0.4,0.0}
\begin{document}
\begin{figure}
\centering\rule{4cm}{4cm} %Replace with image.
\caption{\textcolor{blue}{$\medsquare$}
\textcolor{orange}{$\medtriangleup$}}
\end{figure}
\end{document}


It might take some effort to get all the colours and sizes exactly right, though.

-
wow thanks, I didn't expect the solution will be that difficult. –  Yirmidokuz Mar 17 '13 at 20:32