Image 子图形的垂直对齐

Image 子图形的垂直对齐,image,latex,formatting,vertical-alignment,Image,Latex,Formatting,Vertical Alignment,我正在写我的论文,我正在努力把两幅图像放在一起,这样第二幅图像就可以沿着第一幅图像垂直居中。我还尝试使用subfigure而不是subfloat,但两者都不起作用 这就是它的样子 我的代码是: \begin{figure}[H] \centering \subfloat[H][sparse($\mathbf{A}$)]{\includegraphics[width=0.28\textwidth]{sparsesmall} \label{sparse}} \subfloat[H][ful

我正在写我的论文,我正在努力把两幅图像放在一起,这样第二幅图像就可以沿着第一幅图像垂直居中。我还尝试使用
subfigure
而不是
subfloat
,但两者都不起作用

这就是它的样子

我的代码是:

\begin{figure}[H]
\centering  \subfloat[H][sparse($\mathbf{A}$)]{\includegraphics[width=0.28\textwidth]{sparsesmall} \label{sparse}}
    \subfloat[H][full($\mathbf{A}$)]{\includegraphics[width=0.55\textwidth]{fullsmall}\label{full}}
  \caption{Representation of $\mathbf{A}$ in MATLAB}
  \label{schematic}
\end{figure}
有什么建议可以让它看起来比现在更好吗?Thx

编辑:似乎
子IG
软件包有问题,尤其是在使用hyperref时。在这种情况下,请尝试中提到的
子选项

如果使用
subfig
package,则可以轻松完成此操作。解决方案见以下第5.4节:


我还没有测试过它,可能有输入错误,但它应该可以工作。

你也可以使用
\raisebox{x}{\includegraphics[…]{…}
,其中
x
为负数表示向下移动,为正数表示向上移动。

我的方法是使用方形迷你页,将其内容集中在:

\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}
但是,这段代码是由LyX生成的,所以有点难看。

另一个解决方案(与
子选项
包一起使用)是

\begin{figure}[p]
        \centering
        \begin{subfigure}{.49\linewidth}
            \centering
            \caption{Large Picture}
            \includegraphics{LARGEPIC}
        \end{subfigure}
        \hfill
        \begin{subfigure}{.49\linewidth}
            \centering
            \caption{SMALL PIC}
            \includegraphics{small picture}
            \begin{minipage}{.1cm}
            \vfill
            \end{minipage}
        \end{subfigure} 
        \caption{Two pictures}
\end{figure}

\vfill
单独不起作用,这就是为什么它被放在
迷你页中的原因,第二个图的标题向右对齐。否则它工作得很好,谢谢。仅供参考,
子图
包现在已经过时了。因此,带有
子选项的答案()应该改为使用。谢谢,我不能使用subfig软件包,所以这是一种方式(至少对我来说)。
\begin{figure}[p]
        \centering
        \begin{subfigure}{.49\linewidth}
            \centering
            \caption{Large Picture}
            \includegraphics{LARGEPIC}
        \end{subfigure}
        \hfill
        \begin{subfigure}{.49\linewidth}
            \centering
            \caption{SMALL PIC}
            \includegraphics{small picture}
            \begin{minipage}{.1cm}
            \vfill
            \end{minipage}
        \end{subfigure} 
        \caption{Two pictures}
\end{figure}