1

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}
    \headerfirstnamestyle{
      \@firstname
    } \headerlastnamestyle{
      \@lastname
    }
    \\
    \vspace{0.4mm}
    \ifthenelse{\isundefined{\@position}}{}{\headerpositionstyle{\@position\\}}
    \vspace{0.4mm}
    \ifthenelse{\isundefined{\@address}}{}{\headeraddressstyle{\@address\\}}
    \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).

I tried adding

\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!

1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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