当我使用\exampleblock
Beamer 中的环境时,框的标题和框的内容之间有很多空白。我该如何删除它?
梅威瑟:
\documentclass{beamer}
\usetheme{Berkeley}
\begin{document}
\begin{frame}
\frametitle{GSA on the Black-Scholes Model}
\begin{exampleblock}{Black-Scholes}
\begin{align*}
\text{Call: } C & = S\mathcal{N}(d_1) - K\mathrm{e}^{-r\tau} \mathcal{N}(d_2), \\
\text{Put: } P & = -S\mathcal{N}(-d_1) + K\mathrm{e}^{-r\tau} \mathcal{N}(-d_2), \\
d_1 = d_2 + \sigma \sqrt\tau & = \frac{\log(S/K) + (r + \sigma^2 / 2)\tau}{\sigma \sqrt \tau}.
\end{align*}
\end{exampleblock}
\end{frame}
\end{document}
结果是:
我希望数学的顶行接近标题,就像在这个问题。
答案1
您可以\vspace
在 之前使用align
。试试这个:
\begin{frame}
\frametitle{GSA on the Black-Scholes Model}
\begin{exampleblock}{Black-Scholes}
\vspace{-.8cm}
\begin{align*}
\text{Call: } C & = S\mathcal{N}(d_1) - K\mathrm{e}^{-r\tau} \mathcal{N}(d_2), \\
\text{Put: } P & = -S\mathcal{N}(-d_1) + K\mathrm{e}^{-r\tau} \mathcal{N}(-d_2), \\
d_1 = d_2 + \sigma \sqrt\tau & = \frac{\log(S/K) + (r + \sigma^2 / 2)\tau}{\sigma \sqrt \tau}.
\end{align*}
\end{exampleblock}
\end{frame}