Tables – How to Make a Table with Centered Images

graphicstablesvertical alignment

On page 6 in this PDF is there a table with centred pictures in the right column.

enter image description here

Does anyone know how to make such a table?

I am using pdflatex.

Best Answer

You need to change the baseline of the images. Usually you center it to the height of the lower case characters (1ex). This can be done using the \raisebox macro or using the valign=m key of the adjustbox package.

See also How to align picture top left in a table? and float left figure in titlepage which are similar.

Here my code which also shows some of the other elements like bold math and stacking:

\documentclass{article}

\usepackage{adjustbox}
\usepackage{booktabs}
\usepackage{amsmath}

\providecommand{\textsubscript}[1]{%
    \mbox{$_\text{#1}$}%
}

\newcommand{\mystack}[1]{%
   \mbox{$
    \vcenter{%
        \hbox{\shortstack{#1}}%
    }%
    \mathsurround=0pt
   $}
}


\begin{document}

\begin{tabular}{ccccc}
    \toprule
    \bfseries Scalar mode & 
    \bfseries Vector mode & 
    \bfseries Degeneracy & 
    $\mathbf{n_{\text{\bfseries eff}}}$ & 
    \bfseries Near field ($\mathbf{S_Z}$) \\
    \midrule
    LP\textsubscript{01} &
    HP\textsubscript{11} &
    2 & 1.44398 & \adjustimage{height=2cm,valign=m}{image1} \\
    LP\textsubscript{11} &
    \mystack{%
        HP\textsubscript{11} \\
        TE\textsubscript{01} \\
        TM\textsubscript{01}
    } &
    4 & 1.44381 & \adjustimage{height=2cm,valign=m}{image2} \\
    .. \\
    \midrule
    \multicolumn{5}{c}{\bfseries Originally cladding modes} \\
    \midrule
    .. \\
    \bottomrule
    \multicolumn{5}{l}{%
        *The LP\textsubscript{31} is four-fold ...
    }\\
\end{tabular}

\end{document}

Result

Related Question