2

I have been trying for hours to customize a LaTeX code for a CV, by adding a picture on the top right corner of the page.

I have used wrapfigure, but it doesn't help. The text still overlaps the picture.

enter image description here

Here is the code:

\documentclass[a4paper,10pt]{article}

%A Few Useful Packages \usepackage{marvosym} \usepackage{fontspec} %for loading fonts \usepackage{xunicode,xltxtra,url,parskip} %other packages for formatting \RequirePackage{color,graphicx} \usepackage[usenames,dvipsnames]{xcolor} \usepackage[big]{layaureo} %better formatting of the A4 page \usepackage{supertabular} %for Grades \usepackage{titlesec} %custom \section

%Setup hyperref package, and colours for links \usepackage{hyperref} \definecolor{linkcolour}{rgb}{0,0.2,0.6} \hypersetup{colorlinks,breaklinks,urlcolor=linkcolour, linkcolor=linkcolour}

%FONTS \defaultfontfeatures{Mapping=tex-text} %\setmainfont[SmallCapsFont = Fontin SmallCaps]{Fontin} %%% modified for Karol Kozioł for ShareLaTeX use \setmainfont[ SmallCapsFont = Fontin-SmallCaps.otf, BoldFont = Fontin-Bold.otf, ItalicFont = Fontin-Italic.otf ] {Fontin.otf}
%%%

\titleformat{\section}{\Large\scshape\raggedright}{}{0em}{}[\titlerule] \titlespacing{\section}{0pt}{3pt}{3pt} %Tweak a bit the top margin %\addtolength{\voffset}{-1.3cm}

%Italian hyphenation for the word: ''corporations'' \hyphenation{im-pre-se}

\begin{document}

\pagestyle{empty} % non-numbered pages

\font\fb=''[cmr10]'' %for use with \LaTeX command

%--------------------TITLE------------- \par{\centering {\Huge Alessandro \textsc{Plasmati} }\bigskip\par}

%--------------------SECTIONS----------------------------------- %Section: Personal Data \section{Personal Data}

\begin{tabular}{rl} \textsc{Place and Date of Birth:} & Someplace, Italy | dd Month 1912 \ \textsc{Address:} & CV Inn 19, 20301, Milano, Italy \ \textsc{Phone:} & +39 123 456789\ \textsc{email:} & \href{mailto:alessandro.plasmati@gmail.com}
{alessandro.plasmati@gmail.com} \end{tabular}

\end{document}

CarLaTeX
  • 62,716

1 Answers1

1

This approach uses the fancyhdr package to place a figure in the top right corner by defining a new page style.

The new style is applied only to the first page.

a

\documentclass[a4paper,10pt]{article}
\usepackage{marvosym}
\usepackage{fontspec} 
\RequirePackage{xcolor, graphicx}
\usepackage{titlesec}                   %custom \section

%Setup hyperref package, and colours for links \usepackage{hyperref} \definecolor{linkcolour}{rgb}{0,0.2,0.6} \hypersetup{colorlinks,breaklinks,urlcolor=linkcolour, linkcolor=linkcolour}

\titleformat{\section}{\Large\scshape\raggedright}{}{0em}{}[\titlerule] \titlespacing{\section}{0pt}{3pt}{3pt}

%Italian hyphenation for the word: ''corporations'' \hyphenation{im-pre-se}

%******************************************** added ,,,,,,,,,,,, \usepackage{fancyhdr}
\fancypagestyle{FIG}{% Define FIG as a new style \fancyhf{} \fancyhead[R]{\includegraphics[width=0.2\linewidth]{example-image}} } \renewcommand{\headrulewidth}{0pt}% suppress the line \fancyheadoffset[R]{2.5cm} %move the header to the right %********************************************

\begin{document}

\thispagestyle{FIG} % apply FIG style only in this page <<<<<<<<<<<<<<<<<<<<<<<<<<      

%--------------------TITLE-------------
\par{\centering
    {\Huge Alessandro \textsc{Plasmati}
    }\bigskip\par}

%--------------------SECTIONS-----------------------------------
%Section: Personal Data
\section{Personal Data}

\begin{tabular}{rl}
    \textsc{Place and Date of Birth:} & Someplace, Italy  | dd Month 1912 \\
    \textsc{Address:}   & CV Inn 19, 20301, Milano, Italy \\
    \textsc{Phone:}     & +39 123 456789\\
    \textsc{email:}     & \href{mailto:alessandro.plasmati@gmail.com}            
    {alessandro.plasmati@gmail.com}
\end{tabular}

\end{document}

Simon Dispa
  • 39,141