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

2
  • 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, 2013 at 9:44
  • Thanks, I have added the images. Now I will wait for someone to make them displayable. Apr 1, 2013 at 9:54

2 Answers 2

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

0

An alternative solution is described here https://newbedev.com/placing-a-figure-inside-a-multirow-table-cell

In essence, the author suggests using [<fixup>] parameter of multirow like in the following:

\multirow{2}{*}[0.5in]{\includegraphics[width=2in]{...}}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .