[Tex/LaTex] Adding a picture to the right of a table

graphicspositioning

Hello I am currently writing a CV and trying to include a picture of myself to the right of a table that shows personal information. However no matter what commands I try I cannot add to the right of the table. Here is the code:

\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}

Whenever I try to include \includegraphics[scale=0.10]{picture.jpg} it simply brakes the table in the middle. I also tried \hbox{\hspace{2.5cm}\includegraphics[scale=0.10]{picture.jpg}} This will add the picture at approx. the right position to the right but the table is still broken in the middle. My question is then what code should i write to add a picture perfectly to the right of a table and should I include it in the table environment or outside the environment?

Thanks for all answers!

Best Answer

You can include it inside or outside of the table as long as there's room for it on the sale line. Note the bottom of the picture will aligned with the first line of the table, so we have to use \raisebox command in order to align tops.

Here is a simple code:

\documentclass{article}
\usepackage{geometry}
\usepackage[osfI]{garamondx}
\usepackage{graphicx}

\usepackage{hyperref}

\begin{document}

\section{Personal Data}

\begin{tabular}[t]{rl}
  \textsc{Place and Date of Birth:} & Milano, Italy | dd Month 1473                                              \\
  \textsc{Address:}                 & Palazzo Carmagnola, Milano, Italy                                          \\
  \textsc{Phone:}                   & +39 123 456789                                                             \\
  \textsc{email:}                   & \href{mailto:alessandro.plasmati@gmail.com}{alessandro.plasmati@gmail.com}
\end{tabular}
\quad
\raisebox{\dimexpr0.7\baselineskip-\height}{\includegraphics[scale=0.35]{hermine}}

\end{document} 

enter image description here

Related Question