Ver*_*a D 25 formatting latex image vertical-alignment
我正在研究我的论文,我正在努力将2个图像彼此相邻放置,以便第二个图像沿着第一个图像垂直居中.我也试图使用subfigure
而不是subfloat
但它们都不起作用.
这是它看起来如何alt文本http://img51.imageshack.us/img51/1174/screenshot20100224at712.png
我的代码是:
\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}
Run Code Online (Sandbox Code Playgroud)
有什么建议让它看起来比现在好吗?谢谢
Alo*_*hal 13
如果使用subfig
包装,则可以轻松完成.解决方案在手册的第5.4节中:
\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}
Run Code Online (Sandbox Code Playgroud)
我没有测试它,可能有拼写错误,但它应该工作.
另一个解决方案(与subcaption
包一起使用的是
\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}
Run Code Online (Sandbox Code Playgroud)
在\vfill
本身并不能工作,这就是为什么它被放入minipage
归档时间: |
|
查看次数: |
75767 次 |
最近记录: |