2

I have the following code in a beamer:

\begin{frame}
\frametitle{New frame}
\begin{block}{Distorsión radial}
\begin{gather*}
\delta_{ur}(u,v)=u(k_1\cdot r^2+k_2\cdot r^4),\\
\delta_{vr}(u,v)=v(k_1\cdot r^2+k_2\cdot r^4). 
\end{gather*}
\end{block}
\end{frame}

That's how it looks like: enter image description here

How could I remove that vertical space?

List of packages:

\usepackage{natbib}        
\usepackage{url}           
\usepackage[T1]{fontenc}   
\usepackage[utf8]{inputenc}
\usepackage[spanish]{babel}
\usepackage{numprint}      

\usepackage{amsmath}       
\usepackage{mathrsfs}      
\usepackage{amssymb}       
\usepackage{amsfonts}      

\usepackage{cancel}

\usepackage{etoolbox}


\usepackage{minted}
\usemintedstyle{friendly}

\usepackage{graphicx}
\usepackage{wrapfig}  

\usepackage{tikz}     

\usepackage[framemethod=TikZ]{mdframed}

\usepackage{caption}
\usepackage{subcaption}

Theme used: Warsaw

  • which vertical space are you concerned about -- the space between the rows of displaymath material, or the space between the title and the first row of displaymath material? – Mico Oct 19 '19 at 15:47
  • Could you please post a compilable code? – Bernard Oct 19 '19 at 15:48
  • @Mico, the space btw the first equation and the tittle of the block. – Sergio Cavero Oct 19 '19 at 15:49
  • @SergioCavero - You need to provide (a lot) more information, then. E.g., which beamer "theme(s)" do you employ? How did you change the font setup relative to the default? – Mico Oct 19 '19 at 15:50
  • @Bernard there you have. I just add the frame enviroment. – Sergio Cavero Oct 19 '19 at 15:50
4

Another possibility: the \useshortskip command from nccmath:

\documentclass{beamer}
\usetheme{Warsaw}
\usepackage{amsmath, nccmath}

\begin{document}

    \begin{frame}
    \frametitle{New frame}
    \begin{block}{Distorsión radial}\useshortskip
    \begin{gather*}
    \delta_{ur}(u,v)=u(k_1\cdot r^2+k_2\cdot r^4),\\
    \delta_{vr}(u,v)=v(k_1\cdot r^2+k_2\cdot r^4).
    \end{gather*}
    \end{block}
    \end{frame}

\end{document} 

enter image description here

4

A math display environment should never be used at the start of a paragraph, because it would add an empty line.

\documentclass{beamer}
\usetheme{Warsaw}

\begin{document}

\begin{frame}
\frametitle{New frame}
\begin{block}{Distorsión radial}
\centering

$\begin{aligned}
\delta_{ur}(u,v)&=u(k_1\cdot r^2+k_2\cdot r^4),\\
\delta_{vr}(u,v)&=v(k_1\cdot r^2+k_2\cdot r^4). 
\end{aligned}$

\end{block}
\end{frame}

\end{document}

Here aligned is better than gathered.

enter image description here

Of course, you could remove the space generated by the empty line:

\documentclass{beamer}
\usetheme{Warsaw}

\begin{document}

\begin{frame}
\frametitle{New frame}
\begin{block}{Distorsión radial}
\vspace{-\baselineskip}
\begin{align*}
\delta_{ur}(u,v)&=u(k_1\cdot r^2+k_2\cdot r^4),\\
\delta_{vr}(u,v)&=v(k_1\cdot r^2+k_2\cdot r^4).
\end{align*}

\end{block}
\end{frame}

\end{document}

The output is the same.

I actually see a missing space!

\documentclass{beamer}
\usetheme{Warsaw}

\begin{document}

\begin{frame}
\frametitle{New frame}
\begin{block}{Distorsión radial}

\begin{align*}
\delta_{ur}(u,v)&=u(k_1\cdot r^2+k_2\cdot r^4),\\
\delta_{vr}(u,v)&=v(k_1\cdot r^2+k_2\cdot r^4). 
\end{align*}
\mbox{}

\end{block}
\end{frame}

\end{document}

enter image description here

  • That works for me! Even it is not the answer I will use that. Many thanks – Sergio Cavero Oct 19 '19 at 16:03
  • 1
    @SergioCavero I added the trick for align or gather. Actually, in your picture I see a missing space. – egreg Oct 19 '19 at 16:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.