I have used this code to place two figures side by side.
However, the horizontal alignment is (by default I guess) at the last line of caption instead of the first. So if one caption has more lines the result is the other image to be moved upwards along with its caption, like:
*****img1*****...................
....................*****img2****
.................................
Fig1: foofoo foo.................
foofofofofo......................
foofofofofo.........Fig2:foofoo...
So the question is how to force the alignment at the caption first line, like:
*****img1*****......*****img2****
.................................
Fig1: foofoo foo....Fig2:foofoo..
foofofofofo......................
foofofofofo......................
Text Formatting ⇒ Minipage: align at 1st line of caption instead of last
Minipage: align at 1st line of caption instead of last
Last edited by yiorgosb on Wed Mar 02, 2011 5:11 pm, edited 1 time in total.
NEW: TikZ book now 40% off at Amazon.com for a short time.

Minipage: align at 1st line of caption instead of last
Hi,
you could use this code instead:
you could use this code instead:
Code: Select all
\begin{figure}[ht]
\begin{minipage}[t]{0.45\linewidth}
\centering
\includegraphics{filename1}
\caption{A test figure with a really long caption spanning several lines}
\label{fig:figure1}
\end{minipage}
\hfill
\begin{minipage}[t]{0.45\linewidth}
\centering
\includegraphics{filename2}
\caption{A test figure}
\label{fig:figure2}
\end{minipage}
\end{figure}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Minipage: align at 1st line of caption instead of last
so the alignment top or bottom is controlled by
begin{minipage}[ b/t ]
Thanks problem solved
begin{minipage}[ b/t ]
Thanks problem solved