# \vspace with negative value not working as expected

I want to position the image exactly in the corner of the margins, regardless of the text. However, the "Foo" gets placed slightly lower when using the code between the %s. Comment it out and you'll see what I mean.

\documentclass{article}
\usepackage[showframe]{geometry}
\usepackage[]{currvita}
\usepackage{graphicx}
\begin{document}

%
\begin{raggedleft}
\includegraphics[height=0.2\textheight]{portrait} \\
\end{raggedleft}
\vspace{-0.2\textheight}
%

\begin{cv}{Foo}
\end{cv}
\end{document}


I tried this solution, since picins isn't shipped with TeX Live and thus

\parpic[r]{\includegraphics[width=0.2\textwidth]{portrait}}


doesn't work. Wrapfig didn't work either.

Is there an easy fix using vspace?

• The space is because F is not too high to fill the whole line height. Test with {Foo \rule{1pt}{\baselineskip}}. – Sigur Apr 16 '16 at 17:35

Here is a simple solution using the generic set of macros \insbox:

\documentclass{article}
\usepackage[showframe]{geometry}
\usepackage[]{currvita}
\usepackage{graphicx}
\usepackage{lipsum}

\input{insbox}
\makeatletter
\@InsertBoxMargin = 5mm
\makeatother

\begin{document}

\vspace*{-6ex}
\InsertBoxR{0}{\includegraphics[height=0.2\textheight]{loupnorstein1}} %
\vspace{0.65\baselineskip}
\begin{cv}{Foo}
\lipsum[1-3]
\end{cv}

\end{document}