[Tex/LaTex] Problem while using multirow with graphics

arraysgraphicsmultirow

I have a problem with the multirow command.

\begin{array}{|c|c|}
\includegraphics[width=1.5in]{1}
&
\multirow{2}{*}{
\includegraphics[width=1.5in]{3}
}
\\
\hline
\includegraphics[width=1.5in]{2}
& \\
\end{array}

results in this

|1| |
---3-
|2|3|
   3
   3

problem 1

How to obtain the following :

|1|3|
---3-
|2|3|
| |3|

Wanted

Best Answer

You don't need \multirow, but rather the adjustbox package.

\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{adjustbox}
\begin{document}
\begin{tabular}{|c|c|}
\begin{adjustbox}{valign=t}
\begin{tabular}{@{}c@{}}
  \includegraphics[width=1.5in,height=1.3in]{a}\\[2ex]
  \includegraphics[width=1.5in,height=0.7in]{b}
\end{tabular}
\end{adjustbox}
&
\begin{adjustbox}{valign=t}
  \includegraphics[width=1.5in,height=1.7in]{c}
\end{adjustbox}
\end{tabular}
\end{document}

With valign=t we're shifting the reference point of the inner tabular and of the image to the right to their top.

Note. I've used height and the demo option just to produce mock figures; don't use them yourself.

enter image description here

Related Question