I have an figure* environment with the following

    \centerline {

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

There are two different scenarios, independent of whether you use the figure or figure* 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:

enter image description here

\usepackage{graphicx}% http://ctan.org/pkg/graphicx
\usepackage{subfig}% http://ctan.org/pkg/subfig
  \savebox{\myimage}{\hbox{\rule{150pt}{150pt}}}% Store largest image
  \subfloat[First]{\usebox{\myimage}} \quad
  \caption{This is a figure.}

  \savebox{\myimage}{\hbox{\rule{150pt}{150pt}}}% Store largest image
  \subfloat[First]{\usebox{\myimage}} \quad
  \caption{This is a figure.}

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.