I have the following figure:
\begin{figure}[ht!]
\centering
\begin{tabular}{|c|c|}
\includegraphics{combo} & \includegraphics{combomenu}
\end{tabular}
\caption{A combo box with and without showing the menu.}
\label{fig:combos}
\end{figure}
which produces:
The left image is significantly shorther than the right image. How do I vertically align the left image to the top of the cell?
I would already overheat Google with my searches on how to do it, if it would be possible. Nothing I do just seems to have any effect on it:
\includegraphics{combo}\hfill
does nothing\begin{tabular}{|p{3cm}|c|}
does nothing, apart from setting the columnt width\raisebox{4.5\height}{\includegraphics{combo}}
indeed moves the image up and down, but I just cannot seem to get the parameter right. Something between 5.5 and 6 it seems. But that's really not what I want, if I decide to change the second image, I would have to go through the painstaking alignment process again.- Using minipages aligns the image to the top, but also adds more space to the right from both images and maybe pushes the images too far up, so that the vertical lines begin slightly off:
I specified the images' width in pixels, they are both 82 pixels wide.
Best Answer
The simplest way is to use the
adjustbox
package:Without any package,
would do the same.