我有一个beamer
由两列(顶部对齐)组成的框架,使用了该[T]
选项。第二列包含一个align
方程块。即使我使用了该[T]
选项,包含方程的列也会不是与左列中的文本对齐。当在等式前面放置一行文本时,对齐效果很好。那么我遗漏了什么?
这是 MWE
\documentclass{beamer}
\DeclareMathOperator{\IM}{Im}
\begin{document}
\newcommand{\highlight}[1]{\colorbox{yellow}{$\displaystyle #1$}}
\begin{frame}
\begin{columns}[T]
\column{0.4\textwidth}
Transverse MO Kerr effect
{\tiny [Zvezdin, Modern Magnetooptics, IOP 1999]}
\column{0.6\textwidth}
%\centering test
\begin{align*}
r_p(M) &= r^0_p\left(1+i\rho_p(M)\right)\\
\rho_p(M) &=\frac{-ir_p^0\epsilon_g(M)/\epsilon_z\sin\varphi}{2(\eta^2-\sin^2\varphi)^{1/2}}\\
[r_s(M) &= r^0_s\quad\eta =n/n_\mathrm{inc}]\\
\delta_p &= \frac{I(M)-I_0}{I_0} = \highlight{2\IM(\rho_p)} %\quad \textcolor{red}{\textbf{\only on lossy MO materials}}
\end{align*}\par
\centering$\color{red}\Rightarrow$ \textcolor{red}{\textbf{only on lossy MO materials}}
\end{columns}
\end{frame}
\begin{frame}
\begin{columns}[T]
\column{0.4\textwidth}
Transverse MO Kerr effect
{\tiny [Zvezdin, Modern Magnetooptics, IOP 1999]}
\column{0.6\textwidth}
\centering test
\begin{align*}
r_p(M) &= r^0_p\left(1+i\rho_p(M)\right)\\
\rho_p(M) &=\frac{-ir_p^0\epsilon_g(M)/\epsilon_z\sin\varphi}{2(\eta^2-\sin^2\varphi)^{1/2}}\\
[r_s(M) &= r^0_s\quad\eta =n/n_\mathrm{inc}]\\
\delta_p &= \frac{I(M)-I_0}{I_0} = \highlight{2\IM(\rho_p)} %\quad \textcolor{red}{\textbf{\only on lossy MO materials}}
\end{align*}\par
\centering$\color{red}\Rightarrow$ \textcolor{red}{\textbf{only on lossy MO materials}}
\end{columns}
\end{frame}
\end{document}
答案1
align
在\abovedisplayskip
其顶部上方。你必须去掉它。另外,由于将其设为零会将方程式带到下一行(显示方程式!)
\setlength{\abovedisplayskip}{-\baselineskip}
就可以了。此外,你需要在
{\tiny [Zvezdin, Modern Magnetooptics, IOP 1999]\par}
代码:
\documentclass{beamer}
\DeclareMathOperator{\IM}{Im}
\begin{document}
\newcommand{\highlight}[1]{\colorbox{yellow}{$\displaystyle #1$}}
\begin{frame}
\begin{columns}
\column[t]{0.4\textwidth}
Transverse MO Kerr effect
{\tiny [Zvezdin, Modern Magnetooptics, IOP 1999]\par} %% you need a \par here
\column[t]{0.6\textwidth}
\setlength{\abovedisplayskip}{-\baselineskip}
%\centering test
\begin{align*}
r_p(M) &= r^0_p\left(1+i\rho_p(M)\right)\\
\rho_p(M) &=\frac{-ir_p^0\epsilon_g(M)/\epsilon_z\sin\varphi}{2(\eta^2-\sin^2\varphi)^{1/2}}\\
[r_s(M) &= r^0_s\quad\eta =n/n_\mathrm{inc}]\\
\delta_p &= \frac{I(M)-I_0}{I_0} = \highlight{2\IM(\rho_p)} %\quad \textcolor{red}{\textbf{\only on lossy MO materials}}
\end{align*}\par
\centering$\color{red}\Rightarrow$ \textcolor{red}{\textbf{only on lossy MO materials}}
\end{columns}
\end{frame}
\end{document}