Vertical alignment of subfigures LATEX

前端 未结 4 1058
执笔经年
执笔经年 2021-01-31 04:04

I am working on my thesis and I am struggling with placing 2 images next to each other, so that the second image would be centered vertically along the first one. I was also try

4条回答
  •  被撕碎了的回忆
    2021-01-31 04:39

    My method is using square minipage which centers its contents:

    \begin{figure}
    \subfloat[Figure a]{%
    \begin{minipage}[c][1\width]{0.5\textwidth}%
    \includegraphics[clip,width=1\textwidth]{figurea}%
    \end{minipage}}\subfloat[Figure b]{\centering{}%
    \begin{minipage}[c][1\width]{0.5\textwidth}%
    \begin{center}
    \includegraphics[clip,width=0.6\textwidth]{figureb}
    \par\end{center}%
    \end{minipage}}
    \caption{main caption}
    \end{figure}
    

    This code was generated by LyX, however, so it's a bit ugly.

提交回复
热议问题