子图LATEX的垂直对齐 [英] Vertical alignment of subfigures LATEX

查看:1262
本文介绍了子图LATEX的垂直对齐的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究我的论文,我正在努力将两幅图像相邻放置,以便第二幅图像将沿着第一幅图像垂直居中。我还试图使用子图而不是 subfloat ,但它们都不起作用。



这就是它的样子 alt text http://img51.imageshack.us/img51/ 1174 / screenshot20100224at712.png



我的代码是:

  \begin {figure} [H] 
\centering \ subfloat [H] [sparse($ \mathbf {A} $)] {\includegraphics [width = 0.28\textwidth] {sparsemall} \ label {sparse}}
\ subfloat [H] [full($ \mathbf {A} $)] {\includegraphics [width = 0.55\textwidth] {fullsmall} \标记{full}}
\ caption {在MATLAB中表示$ \mathbf {A} $)
\标签{原理图}
\ end {图片}

有什么建议让它看起来比现在更好?如果你使用 subfig 包,你可以很容易的做到这一点。解决方案在手册的第5.4节中:

  \\\
ewsavebox {\tempbox}
\ begin {figure} [H]
\sbox { \tempbox} {\includegraphics [sparsemall}}
\ subfloat [sparse($ \mathbf {A} $)] {\usebox {\tempbox} \\ \\ label {sparse}}%
\qquad
\ subfloat [full($ \mathbf {A} $)] {\vbox to \ht\tempbox {%
\vfil
\includegraphics [width = 0.55 \textwidth] {fullsmall}
\vfil} \ label {full}}%
\ caption {表示$ \\ MATLAB中的\\ mathbf {A} $} \标签{原理图}
\ end {figure}

我没有测试过,可能会有拼写错误,但应该可以正常工作。

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 trying to use subfigure instead of subfloat but neither of them works.

This is how it looks alt text http://img51.imageshack.us/img51/1174/screenshot20100224at712.png

and my code is:

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

Any suggestions to make it look better than now? Thx

解决方案

If you use subfig package, you can do this easily. The solution is in section 5.4 of the manual:

\newsavebox{\tempbox}
\begin{figure}[H]
\sbox{\tempbox}{\includegraphics[width=0.28\textwidth]{sparsesmall}}
\subfloat[sparse($\mathbf{A}$)]{\usebox{\tempbox}\label{sparse}}%
\qquad
\subfloat[full($\mathbf{A}$)]{\vbox to \ht\tempbox{%
  \vfil
  \includegraphics[width=0.55\textwidth]{fullsmall}
  \vfil}\label{full}}%
  \caption{Representation of $\mathbf{A}$ in MATLAB}\label{schematic}
\end{figure}

I haven't tested it, and there may be typos, but it should work.

这篇关于子图LATEX的垂直对齐的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆