[Tex/LaTex] includegraphics – Problem with compiling

graphics

I am actually writing a latex file in which I would like to insert pictures. I have the following preambule:

\documentclass[a4paper, french]{book}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[french]{babel}
\usepackage{graphicx}
\usepackage{xspace}

In my text, I tried to insert a picture with the following code:

\begin{figure}
 \begin{picture}
  \includegraphics[scale=0.5]{Deltoidalicositetrahedron.jpg}
 \end{picture}
\end{figure}

I am using TexShop version 2.38 and I tried to compile with LaTeX. It worked on the computer of a friend using the same TexShop version. However on my computer it doesn't work. Here is what the console complains about:

./bio mol adn.tex:57: Use of \pictur@ doesn't match its definition.
<argument> \includegraphics 

l.57   \includegraphics
                       [scale=0.5]{Deltoidalicositetrahedron.jpg}

? 

Has anyone ever encounter the same problem?

As usual, thanks in advance.

Best Answer

You can use the picture environment but you need to proceed like that :

\documentclass{scrartcl}      
\usepackage{graphicx}

\begin{document} 

In my text, I tried to insert a picture with the preceding code:

\setlength{\unitlength}{1cm} % fix unit

\newsavebox{\mybox} 
\savebox{\mybox}{\includegraphics[scale=0.5]{Deltoidalicositetrahedron.jpg}} 
% we save the picture

 \begin{figure}
   \begin{picture}(6,4) % you need to add dimensions 
  \put(0,0){\usebox{\mybox}}
   \end{picture}   
 \end{figure}    
\end{document}  

Now you can use macros from picture to decorate or add what you want

With a picture

\documentclass{scrartcl}
\usepackage{graphicx}

\begin{document} 

In my text, I tried to insert a picture with the preceding code:
\setlength{\unitlength}{1cm}

\newsavebox{\mybox} 
\savebox{\mybox}{\includegraphics[scale=0.25]{ant.png}} 
 \begin{figure}
   \begin{picture}(8,6)
  \put(0,0){\usebox{\mybox}} 
  \put(2,2.5){\oval(6,5)}
   \end{picture}   
 \end{figure}    

\end{document}

enter image description here