3

After aligning a table and a plot horizontally I want them to be vertically aligned at the top of their captions(see last image). I have found solutions using subfigures or the floatrow package but both methods seem to be inappropriate here. This is my setup so far

\documentclass{article}
\usepackage[labelfont=bf]{caption}
\usepackage[demo]{graphicx}
\begin{document}

\begin{minipage}[b]{.4\linewidth}
\centering
\includegraphics[width=140pt]{test}
\captionof{figure}{First image with very very very very very very very very long caption}
\end{minipage}
\hfill
\begin{minipage}[b]{.5\linewidth}
\centering
\begin{tabular}[b]{cc}\hline
            Table head & Table head \\ \hline
            Some values & Some values \\
            Some values & Some values \\
            Some values & Some values \\
            Some values & Some values \\
            Some values & Some values \\
            Some values & Some values \\ \hline
        \end{tabular}
\captionof{table}{table with short caption}
\end{minipage}

\end{document}

enter image description here

I want them to be aligned like this, but use captions of different length:

enter image description here

  • You will probably have to use four minipages instead. Maybe the floatrow package may be useful. – daleif Jun 25 '14 at 13:48
4
\documentclass{article}
\usepackage[labelfont=bf]{caption}
\usepackage[demo]{graphicx}
\begin{document}

\begin{minipage}[b]{.4\linewidth}
\centering
\includegraphics[width=140pt]{test}
\captionof{figure}{First image with very very very very very very very very long caption}
\end{minipage}
\hfill
\begin{minipage}[b]{.5\linewidth}
\centering
\begin{tabular}[b]{cc}\hline
            Table head & Table head \\ \hline
            Some values & Some values \\
            Some values & Some values \\
            Some values & Some values \\
            Some values & Some values \\
            Some values & Some values \\
            Some values & Some values \\ \hline
        \end{tabular}
\captionof{table}[table with short caption]{table with short caption\\\mbox{}\\\mbox{}}
\end{minipage}

\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.