Subfig and subtable alignement with multiple caption line

1.3k views Asked by At

I'm trying to align a subfigure and a subtable and I found the following solution. Captions are aligned only if they have the same number of lines. Table caption is aligned at the bottom of the figure caption and changing [b] to [t] doesn't resolve the issue. How can I have the captions aligned at the top?

\documentclass[twocolumn]{article}
\usepackage[demo]{graphicx}
\usepackage{subcaption}

\begin{document}
    \begin{figure*}[!h]
        \centering
        \begin{subfigure}[b]{0.48\textwidth}
            \includegraphics[width=1.0\linewidth]{figure.png} 
            \caption{Caption 1 : this one is a very long two lines caption and is misaligned}
            \label{fig:fig1}
        \end{subfigure}
        %
        \begin{subtable}[b]{0.48\textwidth}
            \centering
            \begin{tabular}{|c|c|}
                1 & 2\\ \hline
                11 & 22\\ \hline
            \end{tabular}
            \caption{Caption 2}
            \label{table:table}
        \end{subtable}
        \caption{Caption 3}
        \label{fig:mainfigure}
    \end{figure*}
\end{document}

here's the issue

0

There are 0 answers