TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using moderncv and I want to add a caption to an inserted graphic. I'm currently using this code

  \captionof{figure}{Some figure}           

and this is the result


For further notice, this line of code

\captionof{figure}{Some figure} 

results in an error: Package caption Error: No float type 'figure' defined.

I have added this in the main.tex preamble


What should I do to make the caption appear as: "Figur 1: Some figure"? ("Figur" is not a typo, it's Swedish.)

share|improve this question
up vote 3 down vote accepted

Your problem is that class moderncv has no floating environment figure implemented. So you have two possibilities:

  1. copy all the code needed for figure into an own local new class mymoderncv.cls or
  2. do not use figure and make it by your own. You can use minipage, and write the heading by your own, because in a cv you need no list of figures, I guess?

A solution for point 2 could be (I used the image from package mwe, that must be installed, but must not be loaded):




% Personal Data
\title{Resume title}
\address{street and number}{postcode city}{country}\mobile{+1~(234)~567~890}
\extrainfo{additional information}
\quote{Some quote from a well known person}




\section{Master thesis}
\cvitem{description}{Short thesis abstract}

  \includegraphics[width=0.5\textwidth]{example-image-a} \\
  Figure 1: heading of figure.


with the result:

enter image description here

share|improve this answer
I used your minipage example and went for manual captioning. Thanks a lot! – emmgust91 Oct 6 '13 at 11:13

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.