6

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

  • Welcome to TeX.sx! You can add images with the normal interface (click on the button); just remove the ! that appears automatically. A user with enough reputation will reinstate it. – egreg Apr 1 '13 at 9:44
  • Thanks, I have added the images. Now I will wait for someone to make them displayable. – Mikaël Mayer Apr 1 '13 at 9:54
4

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

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.