1

I have a figure and an equation side by side. The code is as follows:

\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}

Which produces enter image description here

How can I make it so that the captions align, but the figures stay aligned as they are?

1 Answers1

0

Edit: This assumes that you are using the subcaption package, however, without a complete MWE I do not know which package you are using.

Edit2: Sorry for misreading the question, here comes the proper solution:

Edit3: Now it works for captions with different number of lines.

\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}

The result looks like this:

Example

elemakil
  • 1,319