我有一张图和一个并排的方程式。代码如下:
\begin{figure}[H]
\begin{subfigure}{.5\textwidth}
\centering
\includegraphics[width=.8\linewidth]{cycle}
\caption{The opsin cycle. Clearly denoted are the parameters of the resistive model}
\label{fig:sfig1}
\end{subfigure}%
\begin{subfigure}{.5\textwidth}
\centering
\[S+E \xrightleftharpoons[k_{IS}]{k_{SI}} I \cdot E \xrightleftharpoons[k_{PI}]{k_{IP}} P+E\]
\caption{Reaction scheme for enzymatic model}
\label{fig:sfig2}
\end{subfigure}
\caption{Basis for the restive and enzymatic models, respectively.}
\label{fig:fig}
\end{figure}
产生
我怎样才能使标题对齐,但图形保持原样对齐?
答案1
编辑:假设您使用subcaption
包,但是没有完整的平均能量损失我不知道你使用哪个包。
编辑2:抱歉,我误读了问题,以下是正确的解决方案:
编辑3:现在它适用于不同行数的字幕。
\documentclass{article}
\usepackage{graphicx}
\usepackage{subcaption}
\begin{document}
\begin{figure}[!h]
\centering
\newlength{\MyHeight}
\settoheight{\MyHeight}{\includegraphics[scale=0.4]{example-image-a}}
\begin{subfigure}[t]{0.49\textwidth}
\centering
\includegraphics[scale=0.4]{example-image-a}
\caption{Lorem ipsum}
\end{subfigure}
\hfill
\begin{subfigure}[t]{0.49\textwidth}
\centering
\begin{minipage}[b][\MyHeight][c]{0.49\textwidth}
\includegraphics[scale=0.2]{example-image-b}
\end{minipage}
\caption{Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enimad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.}
\end{subfigure}
\end{figure}
\begin{figure}[!h]
\centering
\newlength{\MyOtherHeight}
\settoheight{\MyOtherHeight}{\includegraphics[scale=0.4]{example-image-a}}
\begin{subfigure}[t]{0.49\textwidth}
\centering
\includegraphics[scale=0.4]{example-image-a}
\caption{Lorem ipsum}
\end{subfigure}
\hfill
\begin{subfigure}[t]{0.49\textwidth}
\centering
\begin{minipage}[b][\MyOtherHeight][c]{0.49\textwidth}
\includegraphics[scale=0.2]{example-image-b}
\end{minipage}
\caption{Lorem ipsum dolor sit amet}
\end{subfigure}
\end{figure}
\end{document}
结果如下: