2

How do you create a table where columns 1 and 3 are an image and column 2 is two lines of text?

The table looks like this:

   column 1   column 2   column 3

-------------          -------------
|           |          |           |  
|  image A  |  line 1  |  image B  |
|           |  line 2  |           |
-------------          -------------

All the examples discovered shows multiple lines of text to the right or to the left of a column, but not between columns.

My plan is to use raisebox to center the text vertically inside the figures. Please comment if there is a better way.

Addendum David has provided an elegant and concise solution of great utility to the community. My struggle is with application to my specific problem as it appears the context of my question was too general.

The following snippet further specifies the problem. The goal is to embed the two lines of formulation between the two figures and exploit the table features for clarifications.

    \usepackage{amsmath,amssymb}
                      %
    \begin{table}[htdp]  %  T A B L E
      \caption{My caption}
      \begin{center}
        \begin{tabular}{crclc}
          Title left &&&& Title right \\\hline
                      %
          Description left &&&& Description right \\
                      %
          \includegraphics[ width = 2.25in ]{"figure left"}
            & $\A{} \colon \cmplx{n}$ & $\mapsto$ & $\cmplx{m} $ &
            & $\cmplx{n}$ & $\mapsfrom$ & $\cmplx{m} \colon \A{*}$ \\
          \includegraphics[ width = 2.25in ]{"figure right"} \\
                      %
          comments left &&&& comments right \\
                      %
        \end{tabular}
      \end{center}
    \end{table}
1
  • Two questions: 1) do the images have the same height? 2) are the lines of text obtained with manual line breaks?
    – Bernard
    Oct 21, 2015 at 23:03

2 Answers 2

2

enter image description here

\documentclass{article}
\usepackage{graphicx}
\begin{document}

\begin{center}

\raisebox{-.5\height}{\includegraphics[width=4cm]{example-image}}
\parbox{2cm}{\centering some text some text}
\raisebox{-.5\height}{\includegraphics[width=4cm]{example-image-10x16}}
\end{center}

\end{document}
0

LaTeX output

\documentclass[11pt]{article}
\usepackage{multirow}
\usepackage{graphicx}

\begin{document}

\begin{table}[ht]
  \caption{Multirows table}
  \begin{center}
    \begin{tabular}{crclc}
        %
        \multirow{3}{*}{\includegraphics[ width = 2cm ]{A}} 
        & $a$ & = & $b + c$ & 
        \multirow{3}{*}{\includegraphics[ width = 2cm ]{B}} \\
        %
        & $b + c$ & = & $a$ \\
        %
        & $a - b$ & = & $c$ \\
        %
    \end{tabular}
  \end{center}
\end{table}

\end{document}

Thanks to David for teaching us a new trick.

You must log in to answer this question.

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