# Adding a picture to CV

I have the following basic code for my CV

\documentclass[10pt, a4paper]{article}
\usepackage[
left = 1.5cm,
right = 1.5cm,
top = 3cm,
bottom = 3cm
]{geometry}
\thispagestyle{empty}
\usepackage{hyperref}
\usepackage{graphicx}
\usepackage{multicol}
\usepackage{framed}
\usepackage{enumitem}
\renewcommand{\labelitemi}{$-$}
\newcommand{\HRule}{\rule{\linewidth}{0.5mm}}
\usepackage{fancyhdr}
\pagestyle{fancy}
%Clear fields
\fancyhf{}
%Page numbering in footer
\fancyfoot[C]{\thepage}
\renewcommand{\footrulewidth}{0.4pt}

\usepackage{booktabs}% http://ctan.org/pkg/booktabs
\newcommand{\tabitem}{\llap{$-$}}
\usepackage{array,longtable}

\begin{document}
%Title
\begin{titlepage}
\thispagestyle{fancy}
\hrule width \hsize \kern 1mm \hrule width \hsize height 2pt
\begin{center}
\Huge \textsc{Curriculum Vitae}
\end{center}
\hrule width \hsize height 2pt \kern 1mm \hrule width \hsize
\let\endtitlepage\relax
\end{titlepage}

\vspace{1cm}

\begin{longtable}{ll}
\textbf{\textsc{Personal Information}}\\
\textsc{Name} & asdasdasd\\
\textsc{Date of birth} & asdasdas\\
\textsc{Place of birth} & asdasd\\
\textsc{Marital status} & asdasd\\
\textsc{Phone} & erwwedsf\\
\textsc{E-mail} & asdsgfghfghg\\
\textsc{Nationality} & Swiss\\
\textsc{GitHub} & \href{https://github.com/TheGeekGreek}{https://github.com/TheGeekGreek}\\
%\columnbreak
%\vspace*{4cm}
%\columnbreak
%\begin{Figure}
%   \includegraphics[scale = 0.2]{profile_picture.jpg}
%\end{Figure}
\vspace{2mm}\\
\textbf{Work Experience}\\
03.2015 - today & sdffgfgfg.\\
\end{longtable}
\end{document}


It is something to start with I think. But I have two questions:

• How do I achieve, that the table is on the left and not centered?
• How do I add a picture in the upper right corner as shown below?

• Well the first question is pretty easy, longtable has an optional argument which defines the horizontal position of the table. Try \begin{longtable}[l]{ll} ...  the optional argument can take l, c or r for alignment. – Dai Bowen Sep 11 '16 at 22:04

Your preamble is a little mess.

You can use picture mode for placing the photo where you like it best.

\documentclass[10pt, a4paper]{article}
\usepackage[
left = 1.5cm,
right = 1.5cm,
top = 3cm,
bottom = 3cm
]{geometry}
\usepackage{fancyhdr}
\usepackage{graphicx}
\usepackage{multicol}
\usepackage{framed}
\usepackage{enumitem}
\usepackage{booktabs}% http://ctan.org/pkg/booktabs
\usepackage{array,longtable,picture}
\usepackage{hyperref}

\renewcommand{\labelitemi}{--}
\newcommand{\tabitem}{\makebox[0pt][r]{--}}

\pagestyle{fancy}
%Clear fields
\fancyhf{}
%Page numbering in footer
\fancyfoot[C]{\thepage}
\renewcommand{\footrulewidth}{0.4pt}

\setlength{\LTleft}{2em}
\setlength{\LTright}{\fill}

\begin{document}
%Title
\thispagestyle{fancy}

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

\hrule width \hsize \kern 1mm \hrule width \hsize height 2pt

\begin{center}
\Huge \textsc{Curriculum Vitae}
\end{center}

\hrule width \hsize height 2pt \kern 1mm \hrule width \hsize

\vspace{1cm}

\begin{longtable}{ll}
\textit{Personal Information}\\
\textsc{Name} & asdasdasd\\
\textsc{Date of birth} & asdasdas\\
\textsc{Place of birth} & asdasd\\
\textsc{Marital status} & asdasd\\
\textsc{Phone} & erwwedsf\\
\textsc{E-mail} & asdsgfghfghg\\
\textsc{Nationality} & Swiss\\
\textsc{GitHub} & \href{https://github.com/TheGeekGreek}{https://github.com/TheGeekGreek}\\
\textit{Work Experience}\\
03.2015 - today & sdffgfgfg.\\
\end{longtable}

\end{document}


By setting suitably \LTleft and \LTright (default value \fill) you can move horizontally the longtable.

Don't use $-$ for a dash, the right way is --; also \llap is a risky command, better use \makebox[0pt][r]{...}.

There's no need for titlepage.

• I am sorry for the preamble, it was a late night's work. I will fix it as soon as possible. – TheGeekGreek Sep 11 '16 at 23:07

The longtable environment takes an optional argument which specifies the horizontal alignment. In your case us \begin{longtable}[l]{ll} ... for left alignment.

As for the picture, you could try adding a new column to the table but this is going to be seriously clunky and probably require multirow. Probably this should be avoided.

On the other hand a fairly non-invasive but overkill solution would be to load TikZ. Here I have used tikzpagenodes which defines nodes at the four corners of the text region, alongisde the TikZ library calc to place the picture at a variable distance between the top and bottom.

Produced with the following code

\documentclass[10pt, a4paper]{article}
\usepackage[
left = 1.5cm,
right = 1.5cm,
top = 3cm,
bottom = 3cm
]{geometry}
\thispagestyle{empty}
\usepackage{hyperref}
\usepackage{graphicx}
\usepackage{multicol}
\usepackage{framed}
\usepackage{enumitem}
\renewcommand{\labelitemi}{$-$}
\newcommand{\HRule}{\rule{\linewidth}{0.5mm}}
\usepackage{fancyhdr}
\pagestyle{fancy}
%Clear fields
\fancyhf{}
%Page numbering in footer
\fancyfoot[C]{\thepage}
\renewcommand{\footrulewidth}{0.4pt}

\usepackage{booktabs}% http://ctan.org/pkg/booktabs
\newcommand{\tabitem}{\llap{$-$}}
\usepackage{array,longtable}

\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{tikzpagenodes}

\begin{document}
%Title
\begin{titlepage}
\thispagestyle{fancy}
\hrule width \hsize \kern 1mm \hrule width \hsize height 2pt
\begin{center}
\Huge \textsc{Curriculum Vitae}
\end{center}
\hrule width \hsize height 2pt \kern 1mm \hrule width \hsize
\let\endtitlepage\relax
\end{titlepage}

\begin{tikzpicture}[remember picture,overlay]
\node [left] at ($(current page text area.north east)!0.2!(current page text area.south east)$) {\includegraphics[width=0.2\linewidth]{duck}};
\end{tikzpicture}

\vspace{1cm}

\begin{longtable}[l]{ll}
\textbf{\textsc{Personal Information}}\\
\textsc{Name} & asdasdasd\\
\textsc{Date of birth} & asdasdas\\
\textsc{Place of birth} & asdasd\\
\textsc{Marital status} & asdasd\\
\textsc{Phone} & erwwedsf\\
\textsc{E-mail} & asdsgfghfghg\\
\textsc{Nationality} & Swiss\\
\textsc{GitHub} & \href{https://github.com/TheGeekGreek}{https://github.com/TheGeekGreek}\\
\vspace{2mm}\\
\textbf{Work Experience}\\

Somebody else may well be able to demonstrate a simpler way to add the image without resorting to a large package like TikZ.