1

I'm trying to align an image beside a table. The image is floated below the table.

'See Graphic Version' Icon dragged below

This is my code:

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

This is how I want it to be:

enter image description here

What am I doing wrong? How do I correct?

Here is the sharelatex file: https://www.sharelatex.com/project/57e542d03afea89017192474

0

As @Ignasi said you can use another multirow which provides a construction for table cells that span more than one row.

Here we merge four cells in the first column to insert first image and do the same with the fourth column to insert second image

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

\geometry{left=0.75in,top=0.75in,right=0.7in,bottom=0.75in}
\begin{document}
\begin{table}[h]
\centering
\label{my-label1}
\bfseries

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

enter image description here

  • This is great! But I dont understand how the icon is floated to the left. Can you please explain how this works? – user3426358 Sep 29 '16 at 14:27
0

You can use a table with nested tables, exploiting the fact that the default vertical alignment for tabular is centered.

\documentclass{article}
\usepackage{graphicx}

\begin{document}

\noindent\makebox[\textwidth]{% stick in the margins
  \begin{tabular}{@{}ccc@{}}
  \begin{tabular}{@{}c@{}}% left image
  \includegraphics[width=1.5in,height=0.8in]{example-image-a}
  \end{tabular}
  &
  \begin{tabular}{@{}ll@{}}% data in the center
  Shubham Rathi      &  Male                                    \\
  Computer Science   &  B. Tech + MS (Computational Humanities) \\
  IIIT Hyderabad     &  \\
  \end{tabular}
  \begin{tabular}{@{}c@{}}% left image
  \includegraphics[width=0.8in,height=0.8in]{example-image-b}
  \end{tabular}
  \end{tabular}%
}% end of \makebox

\end{document}

enter image description here

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.