0

I'm trying to place an image and a table side by side. Here is my code:

\begin{table}[h]
\centering
\label{my-label1}

\begin{tabular}{lll}
\multicolumn{1}{l}{} \includegraphics[width=1.5in]{IIIT} & {\bf Shubham Rathi}           & {\bf Male}          \\
                      & {\bf Computer Science}   & {\bf B. Tech + MS (Computational Humanities)}           \\
                      & {\bf IIIT Hyderabad} & {\bf}     
\end{tabular}
\end{table}

This is causing my image to be skewed upwards from the table:

enter image description here

I want it to look like this:

enter image description here

What should I be doing?

The Sharelatex file is here: www.sharelatex.com/project/57e542d03afea89017192474

0

What you need in your case is \multirow

\documentclass{article}
\usepackage{multirow}
\usepackage{graphicx}


\begin{document}
\begin{table}[h]
\centering
\label{my-label1}

\bfseries

\begin{tabular}{lll}
\multirow{3}{*}{\includegraphics[width=1.5in,height=0.8in]{IIIT}}
        &                     &       \\
        &  Shubham Rathi      &  Male                                    \\
        &  Computer Science   &  B. Tech + MS (Computational Humanities) \\
        &  IIIT Hyderabad     &      \\
        &                     &
\end{tabular}
\end{table}


\end{document}

enter image description here

  • The table and the image are still not aligned center wrt to each other and the columns are not having a margin. Please see here: sharelatex.com/project/57e542d03afea89017192474 – user3426358 Sep 25 '16 at 18:26
  • Answer updated. – Salim Bou Sep 25 '16 at 19:10
  • Thanks! Works perfect! So the solution was to add a padding of one row above to shift the table content below? – user3426358 Sep 25 '16 at 19:16
0

Using

\raisebox{-\height}[0pt][0pt]{\includegraphics[width=1.5in]{IIIT}}

should do the trick, if there is nothing else in the same column.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.