[Tex/LaTex] Aligning enumerate labels to top of image

#enumerategraphicslistsvertical alignment

I asked a question a while ago about vertically aligning enumerate labels to the top of table. Now I am having the same problem, but with images. Since my problem was solved in my previous thread, I tried sticking the image in a single-cell table and aligning that with the tabular's alignment parameter, but it seemed to have no effect.

Can someone explain what is the correct way to align this image and why didn't sticking it in a table work as expected? I am simply trying to align the enumerate label with the top of my image.

enter image description here

\begin{enumerate}[label=(\alph*)]
  \item\begin{tabular}[t]{l}\includegraphics[width=10cm]{13a.png}\end{tabular}
\end{enumerate}

Best Answer

Martin Scharrer's package adjustbox will help you:

\usepackage{adjustbox}
...
\begin{enumerate}[label=(\alph*)]
  \item\adjustbox{valign=t}{\includegraphics[width=10cm]{13a.png}}
\end{enumerate}

The image will be set so that its height will match that of words and it will stick below the baseline.


In case adjustbox is not available, one can do in a more complicated way; after loading the calc package

\usepackage{calc}

saying

\raisebox{-\height+\ht\strutbox}{\includegraphics[width=10cm]{13a.png}}

will have the same effect.