6

I am trying to build a table of images in Latex. Two of my images are portrait, two are landscape. My end goal, is to have them look like this:

|   | B |   |
| A |---| D |
|   | C |   |

With my code being:

\begin{tabular}{|c|c|c|}

\multirow{2}{*}{\includegraphics[width=0.25\textwidth]{./2_ACES/images/widiStructures/h_back.eps}} & \includegraphics[width=0.25\textwidth]{./2_ACES/images/widiStructures/h_side.eps} & \multirow{2}{*}{\includegraphics[width=0.25\textwidth]{./2_ACES/images/widiStructures/h_front.eps}} \\
& \includegraphics[width=0.25\textwidth]{./2_ACES/images/widiStructures/h_side2.eps} & \\ \hline

\end{tabular}

However, the end result of my table is

|   | B |   |
|   |---|   |
| A | C | D |
  A       D

Where the A and D image drop below the bottom of the table!

7
  • Do you need multirow? Can't you just have parboxes with line breaks?
    – Kerrek SB
    Commented Oct 3, 2011 at 22:17
  • there is no NEED to use multirow - how would one do this with parboxes?
    – JMH
    Commented Oct 3, 2011 at 23:11
  • I'd make the paragraphs of type p{...} and then just use an ordinary line break (`\`) between the two landscape pictures.
    – Kerrek SB
    Commented Oct 3, 2011 at 23:28
  • I am trying, but can't seem to get the 2 images that should be on top of one another to stack: \begin{tabular}{|c|p{1in}|c|} \includegraphics[width=0.25\textwidth]{./2_ACES/images/widiStructures/h_back.eps} & \makebox[0.25\textwidth]{\includegraphics[width=0.25\textwidth]{./2_ACES/images/widiStructures/h_side.eps} \linebreak\includegraphics[width=0.25\textwidth]{./2_ACES/images/widiStructures/h_side2.eps}} & \includegraphics[width=0.25\textwidth]{./2_ACES/images/widiStructures/h_front.eps} \end{tabular}
    – JMH
    Commented Oct 3, 2011 at 23:37
  • What if you do it without the \makebox? You're already in a paragraph context there.
    – Kerrek SB
    Commented Oct 3, 2011 at 23:52

2 Answers 2

5

How about just using minipage:

\documentclass{article}

\newcommand*{\WideFig}{\fbox{\parbox{1.5in}{WIDE \\ FIGURE}}}%
\newcommand*{\TallFig}{\fbox{\parbox{1.0in}{.\\ VERY\\ VERY\\ VERY\\ VERY \\ TALL \\ FIGURE\\ }}}%

\begin{document}
\begin{figure}
  \begin{minipage}{0.30\textwidth}
    \centering
    \WideFig
  \end{minipage}\hfill
  \begin{minipage}{0.35\textwidth}
    \centering
    \TallFig

    \TallFig
  \end{minipage}\hfill
  \begin{minipage}{0.30\textwidth}
    \centering
    \WideFig
  \end{minipage}\hfill
\end{figure}
\end{document}

enter image description here

0
1

I find that the ConTeXt syntax is much nicer for even slightly complicated table layouts. This example is a case in point:

\useMPlibrary[dum] % For dummy figures

% Specify the dimensions of figures
\defineexternalfigure[potrait]  [height=6cm, width=3cm]
\defineexternalfigure[landscape][height=3cm, width=3cm]

\starttext

\bTABLE[offset=none]
  \bTR
     \bTD[nr=2] \externalfigure[dum][potrait]   \eTD
     \bTD       \externalfigure[dum][landscape] \eTD
     \bTD[nr=2] \externalfigure[dum][potrait]   \eTD
  \eTR
  \bTR
     \bTD       \externalfigure[dum][landscape] \eTD
  \eTR
\eTABLE
\stoptext

which gives:

enter image description here

You must log in to answer this question.

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