0

I am using this template: https://de.overleaf.com/latex/templates/deedy-cv/bjryvfsjdyxz and I am trying to insert a picture on the top right. I modified the use of rule in the cls file and managed to stop the line left of the picture with this code

\noindent\hspace{-0.48\textwidth}\makebox[\linewidth]{\color{headings}
\rule{\paperwidth}{0.4pt}}
\begin{textblock}{25}(170,20) 
\centering
\fboxsep2.5pt\fcolorbox{headings}{white}%
{\includegraphics[width=3cm,keepaspectratio]{person-png-icon-29.png}}
\end{textblock}

I basically moved the rule to the left and now want to draw a second line to the right but cant get this to work. Is there a way that I can place the Image on top of the rule, so it doesnt move through the image? Or draw 2 seperate lines, like I am trying to do.

The result right now looks like this. I just want the line to continue on the right side.

enter image description here

1
  • 1
    Welcome. // Please provide complete code in future, i.e. code we can copy and run right away. See my answer for an example.
    – MS-SPO
    Commented Jul 10, 2022 at 11:37

1 Answer 1

2

Depending on what you want the end result to look like, here's a way to do it: drawing the rule after the drawing.

Before continuing with Overleaf I suggest to understand and practice some more basics on Latex. There are good books out there, or have a look here: https://en.wikibooks.org/wiki/LaTeX .

top of page

\documentclass[10pt]{article}
\usepackage{graphicx}% <<< missing
\usepackage{fancyhdr}% <<< from Overleaf
 
\pagestyle{fancy}% <<< this statement sets the upper rule
%\fancyhf{}% <<< from Overleaf


\begin{document}
    {\hfill% <<< trick to center the image
    \fbox{\includegraphics[width=3cm,keepaspectratio]{person-png-icon-29}}
    \hfill% <<< trick to center the image
    }
    \hrule% <<< the rule you want?
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .