# How to bring \includegraphics in front of \rule

I am writing a CV with currvita.

I use the following code to make lines beneath each item header:

\usepackage{xpatch}
{\makebox[0pt][l]{\rule[-0.5\baselineskip]{\textwidth}
{}{}


and this one to add a picture

\noindent % 4cm is the picture's width, -6cm by trial and error
\begin{picture}(0,0)
\put(\dimexpr\textwidth-5.5cm,-8.2cm){\includegraphics[width=5.5cm]
{Foto}}
\end{picture}


I would like the picture to be in front of the line. Can anybody help me with that?

Edit: David Carlisle says I should change the order of the code. I don't find where to but the code for the picture for it to work. So here is my entire document, cleaned up. Can someone tell me where to but the includegraphics?

\documentclass[12pt,a4paper]{article}
\usepackage[german]{babel}
\usepackage{currvita}
\usepackage{graphicx}
\usepackage{setspace}
\usepackage[utf8]{inputenc}
\usepackage{array,longtable,picture}
\usepackage{blindtext}

\usepackage{sansmathfonts}
\usepackage[T1]{fontenc}
\renewcommand*\familydefault{\sfdefault} %% Only if the base font of the
document is to be sans serif\usepackage{sansmathfonts}
\usepackage[T1]{fontenc}
\renewcommand*\familydefault{\sfdefault} %% Only if the base font of the
document is to be sans serif

\usepackage{geometry}
\geometry{verbose,a4paper,tmargin=25mm,bmargin=25mm,lmargin=20mm,rmargin=20mm}

\usepackage{xpatch}
{\makebox[0pt][l]{\rule[-0.5\baselineskip]{\textwidth}
{}{}

\newcommand*{\ac}[1]{\mbox{#1}}
\tolerance=600

\begin{document}
\begin{cv}{\Huge CV\\}

\noindent % 4cm is the picture's width, -6cm by trial and error
\begin{picture}(0,0)
\put(\dimexpr\textwidth-5.5cm,-8.2cm){\includegraphics[width=5.5cm]
{Foto}}
\end{picture}

\begin{cvlist}{\textnormal{\scshape Allgemeine Angaben}}
\item [Vorname, Name]
\item [Telefonnummer]
\item [E"~Mail]
\item [Geburtsdatum]
\end{cvlist}

\begin{cvlist}{\textnormal{\textsc{}}}
\item
\end{cvlist}
\begin{cvlist}{\textnormal{\textsc{}}}
\item

\end{cvlist}
\begin{cvlist}{\textnormal{\textsc{}}}
\item
\end{cvlist}

\includegraphics[width=8cm]{Unterschrift}
\cvplace{}

\end{cv}
\end{document}
\endinput

• latex just lays out the items as they appear so add the rule before the image not after it. – David Carlisle Sep 12 at 8:15
• If anybody should have the exact same issue, I solved it by defining a shorter line and changing that below the code for the picture back to the full lines. – Armin Sep 13 at 9:54