1

I have the following piece of code

\begin{figure*}
\centering
\subfloat[][]{\includegraphics[scale=0.9]{A_big_figure}
\label{fig:my_fig_1}}
\subfloat[][]{\includegraphics[scale=0.9]{A_small_figure} 
\label{fig:my_fig_2} } 
\label{my_fig_all}
\end{figure*}

with the second graphic being much smaller than the first one, but of the same width (i.e. just scaling it won't be useful for me). Currently, Latex aligns me the bottom of both figures i.e. there is a blank above the second figure. However, I would like the contrary, that is having the top of both figures aligned with a blank space below the small one. I tried byadding some negative white space before the second figure but this does not work.

Do you have any ideas ?

2 Answers2

0

You can do that with the floatrow package and its subfloatrow environment:

\documentclass[11pt]{book}
\usepackage{geometry}
\usepackage{floatrow, subcaption, graphicx}

\begin{document}

\begin{figure}[!ht] \floatsetup{style=plain, floatrowsep=qquad, heightadjust=object, valign=t, captionskip=3ex} \ffigbox[\FBwidth] {\begin{subfloatrow} \ffigbox[\FBwidth]{\caption{Traccia Table}\label{flt1}} {\includegraphics[scale=0.3]{traccia-table}} \ffigbox[\FBwidth]{\caption{Fur breakfast}\label{flt2}} {\includegraphics[scale=0.8]{dejeuner1}} \end{subfloatrow}}{\caption{Meret Oppenheim}\label{Meret}} \end{figure}

\end{document}

enter image description here

Mico
  • 506,678
Bernard
  • 271,350
0

With inserting images in table and for caption use of \subcaption{<caption text>}. With valign=t defined in \adjustbox` is moved images baseline to their top:

\documentclass[11pt]{book}
\usepackage{geometry}
\usepackage[font=small, labelfont=bf,
            skip=0.5ex,belowskip=1ex
            ]{caption}
\usepackage{subcaption}
\usepackage[export]{adjustbox}

\begin{document} \begin{figure}[ht] \setkeys{Gin}{width=\linewidth} \centering \begin{tabular}{p{0.45\linewidth} p{0.45\linewidth}} \includegraphics[valign=t]{example-image} & \includegraphics[valign=t]{example-image-duck} \ \subcaption{} \label{fig:my_fig_1} & \subcaption{} \label{fig:my_fig_1} \end{tabular}

\caption{My images} \label{my_fig_all} \end{figure} \end{document}

enter image description here

Zarko
  • 296,517