I have a problem in Latex where \afterpage somehow seems to have problems with a split equation, so that the code does not compile. I use \afterpage to fill a page before a large landscape figure is presented, to avoid the whitespace that is produced otherwise. This is the MWE (comment out the \afterpage command and it will compile):
\documentclass[a4paper]{scrbook}
\usepackage{amsmath, amssymb}
\usepackage{graphicx}
\usepackage{pdflscape}
\usepackage{afterpage}
\usepackage{lipsum}
\begin{document}
\lipsum[1-2][1-20]
\afterpage{
\begin{landscape}
\begin{figure}
\includegraphics[width=\textwidth]{example-image-a}
\caption{Caption}
\end{figure}
\end{landscape}}
\lipsum[1-5]
\begin{equation}
\begin{split}
x&=\frac{\pi}{2}\
&=\frac{3}{2}
\end{split}
\end{equation}
\lipsum[1-2]
\end{document}
\renewcommand{\rmdefault}{qag}(as an example) in your preamble .... – koleygr Aug 18 '20 at 12:49