0

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

  • You don't need \usetheme{default}, as the name says this theme is loaded per default. – user36296 Jul 9 '18 at 9:30
0

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

  • 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. – Henry Jul 10 '18 at 3:39

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.