# Figure in moderncv

Hi,

I would like to add a Figure in my moderncv document. It appears that it's not possible, probably due to the definition of the moderncv class. However, I noticed that there is some packages to add caption in non-floating environment, like "caption" or "capt-of". Unfortunately, these packages seems to not work in the moderncv class (error "Package caption Error: No float type 'figure' defined \captionof{figure}{". The same code work if the classical article class is loaded.

best,

## Question information

Language:
English Edit question
Status:
For:
moderncv Edit question
Assignee:
Xavier Danaux Edit question
Last query:
2012-03-05
2012-03-05
 Xavier Danaux (xdanaux) said on 2012-03-05: #1

Hi Flo,

The figure environment is simply not defined in moderncv. You can define it your self if you need it (\newenvironment).

FYI, the figure definition in the article class is roughly the following:
\makeatletter
\renewcommand \thefigure {\@arabic\c@figure}
\def\fps@figure{tbp}
\def\ftype@figure{1}
\def\ext@figure{lof}
\def\fnum@figure{Figure\nobreakspace\thefigure}
\newenvironment{figure}{\@float{figure}}{\end@float}
\makeatother

Kind regards,