I am playing with floatrow
, however the images are not aligned at the top and I do not know what I am doing wrong.
\begin{figure}[H]
\begin{floatrow}
\floatbox{figure}[0.4\textwidth][\FBheight][t]
{\caption{first image positioned at the top}
\label{fig:floatrow:example:3:a}}
{\includegraphics[width=0.25\textwidth]{images/TestBild.png}}
%
\floatbox{figure}[0.4\textwidth][\FBheight][t]
{\caption{second image positioned at the top}
\label{fig:floatrow:example:3:b}}
{\includegraphics[width=0.2\textwidth]{images/TestBild.png}}
\end{floatrow}
\end{figure}
also I would like to add a defined spacing between the pictures, but have not found out how. Typically I add either \hspace{2em}
or \hfill
, but both do nothing if inserted between the commands (as expected).
Best Answer
You can use the option
heightadjust=object
for\floatsetup
, as I did in the following example:I used the
demo
option for thegraphicx
package to replace the images with black rectangles; do not use that option in your actual code.