# Wrap centered text around wrapfigure

I am making a cv and I am using the Awesome CV template from ShareLatex for this. The template has a command \makecvheader which puts the previously initialized data nicely on the page.

In the .cls the command is written as:

\newcommand*{\makecvheader}{
\begin{center}
\@firstname
\@lastname
}
\\
\vspace{0.4mm}
\vspace{0.4mm}
\vspace{-0.5mm}
*lots of ifthenelse*
\end{center}
}


Now I want my picture, let's call it picture.jpg on the top right of the page, with the header generated by \makecvheader wrapping around the picture. In fact it doesn't have to be wrapping around, I want the text like it should be and my picture on the top right of the page (nicely next to the page margins).

\begin{wrapfigure}[0]{r}{3 cm}
\centering
\includegraphics[width = 3 cm,right]{picture}
\end{wrapfigure}


to the command, but when I put it in front of the \begin{center}, I get an error Warning: Stationary wrapfigure forced to float no matter if I put r,R,l or L. I tried already many things, and logically putting the wrapfigure environment inside the center environment dus not work.

I don't put a clean minimal working example because it is the easiest to just open the template with the .sty, .cls and fonts included. Also, to protect my private data of course.

Hopefully you guys can help me, I am really stuck on this!

I suppose the picture in a header doesn't have to float, nor does it have a caption. You might give a try at the plain TeX macro package insbox, loaded with \input{insbox.tex}. The picture itself is inserted with
\InsertBoxR{0}{\includegraphics[width=3cm]{picture}}[n]

0 is the number of lines that should remain full length. n is an optional integer for a correction in case the number of necessary lines that should be indented is wrongly calculated.