在水平对齐表格和图表后,我希望它们在标题顶部垂直对齐(见最后一张图片)。我找到了使用 subfigures 或 floatrow 包的解决方案,但这两种方法似乎都不合适。这是我目前的设置
\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}
我希望它们像这样对齐,但使用不同长度的标题:
答案1
\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}