3

When I use the \exampleblock environment in Beamer, there is a lot of empty space between the title of the box and the content of the box. How can I remove this?

MWE:

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

Results in: Output

I would like the top line of the math to be close to the title, as in the answer to this question.

bcf
  • 195
  • Is this a duplicate? http://tex.stackexchange.com/questions/47400/remove-vertical-space-around-align – percusse Nov 11 '14 at 20:30
  • Switching to aligned improves the spacing: \begin{exampleblock}{Black-Scholes} \[ \begin{aligned} \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{aligned} \]\end{exampleblock} – Gonzalo Medina Nov 12 '14 at 00:18
  • @GonzaloMedina, using aligned is good. Rather than centered display \[ ... \] you can use \hfil $ ... $ to have less vertical space. It's also possible to change the values of the displayskips as mentioned in the link above tex.stackexchange.com/questions/47400/remove-vertical-space-around-align – corporal Dec 18 '14 at 06:14

1 Answers1

2

You can use \vspace before the align. Try this:

\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}
Smarzaro
  • 673