[Tex/LaTex] Centering description vertically

descriptionvertical alignment

I have a description environment and would like to center the descriptions vertically w.r.t respect to the items (which are images).

\begin{description}
    \item[\pict1] - Description
\end{description}

\pict1 is rather large compared to the height of the description text. As it is, it is put at the "base line" (the bottom of the image) and I would like it to be centered.

Best Answer

I'm not sure that description is the best way do to this; I'd use

\begin{flushleft}
\sbox0{\includegraphics{pict1}}
\raisebox{-.5\height}{\usebox0}\quad
\begin{minipage}{\dimexpr\textwidth-\wd0-1em}
Description
\end{minipage}
\end{flushleft}

The main problem is in fact that the description text height is not known in advance. This could be easily made up into a new environment.

Here's an example:

enter image description here

If your descriptions are only one line long, then a different and simpler approach can be used.

\documentclass{article}

\usepackage{enumitem}
\usepackage[export]{adjustbox}

\begin{document}

\begin{description}[labelwidth=3cm]

\item[{\includegraphics[valign=c,width=2.5cm]{a}}] Description a

\item[{\includegraphics[valign=c,width=1.5cm]{b}}] Description b

\item[{\includegraphics[valign=c,width=2cm]{b}}] Description c

\end{description}

\end{document}

Adjust the parameters to description to suit you. The key is valign=c provided by adjustbox.

enter image description here