I have an figure*
environment with the following
\begin{figure*}
\centerline {
\subfloat[1]{...}
\subfloat[2]{...}
}
\end{figure*}
The images are different heights. How can I vertically align them? i.e. so the centre of each image is next to each other:
_____
| | _____
| | _ | |
| | |____|
|____|
Fig. 1
Best Answer
There are two different scenarios, independent of whether you use the
figure
orfigure*
environment (or any other float for that matter). The first allows you to move the entire label with the image, while the second keeps the image label at the same level as the other one:The idea is to store the largest image in a box (
\myimage
). Then you raise the smaller image (50% of the largest box) - (50% of the smaller box) or, in LaTeX terms,.5\ht\myimage
refers to 50% of the height of\myimage
, while.5\height
refers to 50% of the height of the current box (contained within the\raisebox
command). You first have to "create" a box using\newsavebox
, and assign something to it using\savebox
.In the example above,
graphicx
was not required since no images were included (I used\rule{<width>}{<height>}
). However, you'll need to use it if you include images.Other options might also be possible via
floatrow
.