[Tex/LaTex] How to vertically center text with an image in the same row of a table

tablesvertical alignment

I want to create a table with multiple rows of the following form: a cell that contains text and then multiple cells that contain images. The text should be vertically centered and the contents of every column should also be centered horizontally. I am aware of the m{} column type but somehow this seems to fail if an image is contained in the row and determines the row height. Any ideas?

Minimal example:

\documentclass{article}
\usepackage{graphicx}
\usepackage{array}
\begin{document}
\begin{figure}
\begin{tabular}{m{3cm}c}
(a) & \includegraphics{some_picture.pdf}\\
\end{tabular}
\end{figure} 
\end{document}

Best Answer

The baseline of an image is at the bottom. You could use \raisebox to shift it up. Use half of \height, which stands for the height of the box to be raised.

\raisebox{-.5\height}{\includegraphics{some_picture}}

For example:

\documentclass{article}
\usepackage{mwe}
\begin{document}
\begin{tabular}{lll}
\raisebox{-.5\height}{\includegraphics[scale=0.25]{example-image}} & text & text\\
\end{tabular}
\end{document}

yields:

enter image description here