[Tex/LaTex] I keep getting ”missing number treated as zero” and ”illegal unit of measure (pt. inserted)” error :(

errorswrapfigure

\begin{wrapfigure}{r}
\centering  
\includegraphics{DoorNumbers.png}
\caption{Door assignment}
\end{wrapfigure}

Can anyone tell me what im doing wrong? i get it at the \centering line. thanks in advance.

Best Answer

The wrapfigure environment has two mandatory arguments; you are missing the one used for the width:

\begin{wrapfigure}{r}{\linewidth}
\centering
\includegraphics{DoorNumbers.png} 
\caption{Door assignment}
\end{wrapfigure}

Instead of \linewidth, use the length that better suits your needs.

Related Question