Numbering a figure with a symbol in a way that is compatible with \label and \ref

In a long paper, full of figures labeled as usual, there are two figures which I would like to single out and label with symbols. For instance, I would like to have them labeled Figure $\dag$ and Figure $\ddag$. I would like to do this in a way that is compatible with \label and \ref, so that when I refer to Figure $\dag$ \label{dagfig} with \ref{dagfig}, I get $\dag$. I would also like the figures to appear with this labeling in the list of figures. Is there some way to do this?

-

You can redefine \thefigure locally and step down the figure counter:

\documentclass{article}

\begin{document}

\listoffigures

\begin{figure}
\renewcommand\thefigure{$\dag$}
\caption{Figure dag}
\label{fig:dag}
\end{figure}

\begin{figure}
\renewcommand\thefigure{$\ddag$}
\caption{Figure ddag}
\label{fig:ddag}
\end{figure}

Figures~\ref{fig:dag}, and~\ref{fig:ddag}...

\begin{figure}
\caption{Regular figure}
\label{fig:fig}
\end{figure}

\end{document}


egreg has suggested a refinement to the above solution using a new command:

\documentclass{article}

\makeatletter
\newcommand\specialcaption[1]{%
\@namedef{the\@captype}{#1}%
\makeatother

\begin{document}

\begin{figure}
\specialcaption{$\dag$}{Figure dag}
\label{fig:dag}
\end{figure}

\begin{figure}
\specialcaption{$\ddag$}{Figure ddag}
\label{fig:ddag}
\end{figure}

Figures~\ref{fig:dag}, and~\ref{fig:ddag}...

\begin{figure}
\caption{Regular figure}
\label{fig:fig}
\end{figure}

\end{document}


\specialcaption also admits the optional argument, as in

\specialcaption{$\dag$}[short]{long}


and, since it uses \@captype, this command can also be used in the table environment. Usual precautions about using fragile commands also apply to \specialcaption.

-
Thanks again for your help. –  Andrey Jun 11 '12 at 21:42
Gonzalo, look in the chat. –  egreg Jun 11 '12 at 21:46