2

How do I make equal all the vertical spacings in the example below, as shown in the blue double arrows; and how do I globally let all equation to have the same font size?

I would like to achieve the layout such as this beamer presentation.

\documentclass[10pt]{beamer}  
\setbeamersize{text margin left=0.5em, text margin right=1em}
\usefonttheme[onlymath]{serif}

\makeatletter
\renewcommand\tagform@[1]{}
\makeatother

\begin{document}
\begin{frame}
\begin{itemize}
\item iterative minimization iterative minimization iterative minimization
\begin{equation}
Hv-\lambda Nv = 0
\end{equation}
\item generalized eigenvalue problem
\begin{equation}
Hv-\lambda Nv = 0
\end{equation}
\begin{itemize}
\item effective Hamiltonian matrix $H(\mathbf{x}_S)$ 
\begin{equation}
Hv-\lambda Nv = 0
\end{equation}
\item normalization matrix $N(\mathbf{x}_S)$
\end{itemize}
\end{itemize}
\end{frame}

\end{document}

enter image description here

EDIT

Based on the answer below, I've tried the following. A \vspace{-\baselineskip} is added between equation in the item and the first subitem below in order to remove a superfluous spacing, according to Beamer Block: White Space When Using Math. Also \renewcommand\tagform@[1]{} is removed since it will invalidate \belowdisplayskip.

\documentclass[10pt]{beamer}  
\usepackage{amsmath}
\setbeamersize{text margin left=0.5em, text margin right=1em}
\usefonttheme[onlymath]{serif}

\makeatletter
\g@addto@macro\normalsize{
\setlength\abovedisplayskip{5pt}
\setlength\belowdisplayskip{5pt}
\setlength\abovedisplayshortskip{5pt}
\setlength\belowdisplayshortskip{5pt}
}
\makeatother

\begin{document}
\begin{frame}
\begin{itemize}
\item iterative minimization iterative minimization iterative minimization
\begin{equation}
Hv-\lambda Nv = 0
\end{equation}
\item generalized eigenvalue problem
\begin{equation}
Hv-\lambda Nv = 0
\end{equation}
\vspace{-\baselineskip}
\begin{itemize}
\item effective Hamiltonian matrix $H(\mathbf{x}_S)$ 
\begin{equation}\normalsize
Hv-\lambda Nv = 0
\end{equation}
\item normalization matrix $N(\mathbf{x}_S)$
\end{itemize}
\end{itemize}
\end{frame}

\end{document}

enter image description here

raegakj
  • 45

1 Answers1

1

You can adjust the spacing above and below your equations by setting the lengths

\setlength\abovedisplayskip{20pt}
\setlength\belowdisplayskip{20pt}
\setlength\abovedisplayshortskip{20pt}
\setlength\belowdisplayshortskip{20pt}

according to your needs. If you want to do this globally, have a look at How to globally change the spacing around equations?

\documentclass[10pt]{beamer}  
\setbeamersize{text margin left=0.5em, text margin right=1em}
\usefonttheme[onlymath]{serif}

\makeatletter
\renewcommand\tagform@[1]{}
\makeatother

\begin{document}
\begin{frame}
\begin{itemize}
\setlength\abovedisplayskip{20pt}
\setlength\belowdisplayskip{20pt}
\setlength\abovedisplayshortskip{20pt}
\setlength\belowdisplayshortskip{20pt}
\item iterative minimization iterative minimization iterative minimization
\begin{equation}
Hv-\lambda Nv = 0
\end{equation}
\item generalized eigenvalue problem
\begin{equation}
Hv-\lambda Nv = 0
\end{equation}
\begin{itemize}
\setlength\abovedisplayskip{20pt}
\setlength\belowdisplayskip{20pt}
\setlength\abovedisplayshortskip{20pt}
\setlength\belowdisplayshortskip{20pt}
\item effective Hamiltonian matrix $H(\mathbf{x}_S)$ 
\begin{equation}
Hv-\lambda Nv = 0
\end{equation}
\item normalization matrix $N(\mathbf{x}_S)$
\end{itemize}
\end{itemize}
\end{frame}

\end{document}

enter image description here

  • 1
    Thanks, I've tried that, but the \belowdisplayskip does not work below 10 pt. Then I figured it is because of \renewcommand\tagform@[1]{} (don't know why). On the other hand, there will always be extra spaces between equation put on the item and the first subitem below. I get around this with \vspace{-\baselineskip} putting below the equation. – raegakj Jul 10 '18 at 03:39