In LaTeX I'm trying to put two figures next to each other, with captions below, where the captions might have unequal numbers of lines in them. The images are bottom-aligned, and the captions are top-aligned.

Figures 8, 9, 10, 11 in the floatrow documentation (p 20) illustrate what I'm hoping to do (using four figures), but the author gives only a partial example, which I cannot get to work:

enter image description here

Can anyone provide a minimum working example that produces Figures 8, 9, 10, 11 as shown in the document. For the filenames of the image files, you can use graphics/fig8.png, graphics/fig9.png, etc. And if it could be the complete LaTeX file, that would be preferable, so I could see the preamble, too.

One last thing: I'm using the style tufte-book -- I think it sometimes has conflicts with other packages, but I'll figure that out later. :-)

1 Answer 1


You can grab the floatrow documentation code:

      {\caption{Figure~I in the row (\texttt{floatrow}), ``column'' width}%

      {\caption{Figure~II in the row (\texttt{floatrow}), graphics width}%

      {\caption{Figure~III in the row, float's width box has the
       half of the rest space of row}%

      {\caption{Figure~IV in the row,
      occupies the rest space of row}%

where the pictures are contained within pictures.tex.

Either way, a package-less approach would be to set each inside a tabular:

enter image description here


\sloppy% Just for this example

  \begin{tabular}{ p{2.3cm} p{1.5cm} p{2.7cm} p{2.3cm} }
    \includegraphics[width=\linewidth]{example-image} &
    \includegraphics[width=\linewidth]{example-image-a} &
    \includegraphics[width=\linewidth]{example-image-b} &
    \caption{First figure in this row of figures} &
    \caption{Second figure in this row of figures} &
    \caption{Third figure} &
    \caption{Last figure that has a very long caption, stretching multiple rows}



Each image + caption falls within a fixed-width p-column, with each image set to the width of that column. It's similar to setting the image in the key-value settings for \includegraphics.

This works because images are naturally set on the baseline and take up exactly one line. Moreover, each cell within the tabular is set using a p-column, which has its alignment anchor set to be the baseline of the top line. As a result, the images are bottom-aligned, while the captions are top-aligned.

You can adjust the spacing between the figures and the captions as needed. The same goes for the gap between the images, which default to \tabcolsep in the above example. One could also use tabularx for spreading content out and/or making it stretch-and-fit within the text block.

  • Awesome. The tabular example worked fine. Couldn't get the floatrow solution to work. There appears to be a bracketing error with the \input for the cat picture. Also the \input statements didn't work (picture file was downloaded), but I didn't debug that problem because I need to include .png files. When I substituted \includegraphics{graphics/fig8.png} and the like, bad things happened. The captions end up on top, and the size of the images is unexplainable. It would really help to have a complete Latex file for the floatrow case, so I can debug conflicts with tufte-book. Thanks! Commented Feb 4, 2016 at 8:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .