我使用以下代码将两个图形并排放置,并带有不同的标题,
\begin{figure*}[t!]
\centering
\begin{subfigure}[b]{0.5\textwidth}
\centering
\includegraphics[height=1.2in]{a}
\caption{Lorem ipsum}
\end{subfigure}%
~
\begin{subfigure}[b]{0.5\textwidth}
\centering
\includegraphics[height=1.2in]{b}
\caption{Lorem ipsum, lorem ipsum,Lorem ipsum, lorem ipsum,Lorem ipsum}
\end{subfigure}
\caption{Caption place holder}
\end{figure*}
我得到以下输出:
但是,我想将两幅图像垂直放置在相同的线上,如下所示:
期望输出:
答案1
使用t
选项来对齐子图:
\usepackage{subcaption}
\begin{figure*}[t!]
\centering
\begin{subfigure}[t]{0.5\textwidth}
\centering
\includegraphics[height=1.2in]{a}
\caption{Lorem ipsum}
\end{subfigure}%
~
\begin{subfigure}[t]{0.5\textwidth}
\centering
\includegraphics[height=1.2in]{b}
\caption{Lorem ipsum, lorem ipsum,Lorem ipsum, lorem ipsum,Lorem ipsum}
\end{subfigure}
\caption{Caption place holder}
\end{figure*}
使用此功能,两个图像将在顶部对齐: