Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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!

share|improve this question

migrated from stackoverflow.com Oct 4 '11 at 21:39

This question came from our site for professional and enthusiast programmers.

    
Do you need multirow? Can't you just have parboxes with line breaks? –  Kerrek SB Oct 3 '11 at 22:17
    
there is no NEED to use multirow - how would one do this with parboxes? –  JMH Oct 3 '11 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 Oct 3 '11 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.ep‌​s} \end{tabular} –  JMH Oct 3 '11 at 23:37
    
What if you do it without the \makebox? You're already in a paragraph context there. –  Kerrek SB Oct 3 '11 at 23:52

2 Answers 2

up vote 3 down vote accepted

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

share|improve this answer

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.