I am new to LaTeX. I am writing a CV using the moderncv
package with style banking
. I want to add a photo. After I run the compile command it exits normally but the photo doesn't appear on the page.
My code is following:
\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{banking}
\moderncvcolor{blue}
\usepackage[utf8]{inputenc}
\usepackage[scale=0.8]{geometry}
\usepackage{import}
\usepackage{booktabs}
\usepackage{xcolor}
\usepackage{tabularx}
\name{Name}{Last Name} % My name is quite long, can it be the problem?
\title{Resume}
\address{Address}
\phone[mobile]{my_number}
\email{my_e-mail}
\photo[64pt][0pt]{name_of_the_phot}
\setlength\tabcolsep{10pt}
\begin{document}
\makecvtitle
\end{document}
Any help how to add photo and change its position afterwards? I want it to appear on the right or left side.
Thanks in advance.
Best Answer
To get the image on the right you can patch the existing method of creating the head for the cv.
To get the image on the left you need to completly rewrite the method of creating the head by using a tabular (for example).
Because I think it looks not very nice having the image on the left I show you a possibility to get the image on the right side.
With the following patch
you add the image on the right side. The position of the image is corrected with
\raisebox{-1.9cm}[0pt][0pt]{
. Change1.9cm
for your needs.The width of the image is given by
width=.18\textwidth
. That comes because the layout of the header has a limited length of the head of\setlength{\makeheaddetailswidth}{0.8\textwidth}
, that means0.8\textwidth
If you want or need to change this use the following patch first:
Change the used
width
to your need.The following MWE
gives you the resulting page:
BTW: The given code compiles if you are using
moderncv
, version 2.