This slide is showing compiling errors. I guess there isn't enough space. My question : a) Why isn't align working inside the alert block? b) Why isn't allowframebreaks working in my particular slide.

\author{Some Random Guy} 
\setbeamertemplate{enumerate items}[default]
\setbeamercolor{block title}{bg=blue!30,fg=black}
%\setbeamercolor{alertblock title}{bg=red!30,fg=black}
\setbeamertemplate{section in toc}{\hspace*   {2em}\inserttocsectionnumber.~\inserttocsection\par}
\setbeamertemplate{subsection in toc}{\hspace*{4em}\inserttocsectionnumber.\inserttocsubsectionnumber.~\inserttocsubsection\par}
\newcommand{\bbeta}[1]{\boldsymbol\beta_{\scriptscriptstyle #1}}
\newcommand{\undset}[2]{\underset{\scriptscriptstyle #1}{#2}}
\newcommand{\by}[1]{\mathbf Y_{\scriptscriptstyle #1}}
\newcommand{\bx}[1]{\mathbf x_{\scriptscriptstyle #1}}
\newcommand{\beps}[1]{\boldsymbol\epsilon_{\scriptscriptstyle #1}}
%\setbeamercolor {item}{fg=red}
%\setbeamercolor{itemize item}{fg=red} %\setbeamercolor{itemize subitem}{fg=blue}
\setbeameroption{show notes}
\addtobeamertemplate{block alerted begin}{
  \topsep 3\p@ \@plus2\p@ \@minus2.5\p@
  \parsep 0\p@
  \itemsep3\p@ \@plus2\p@ \@minus3\p@}


\section{Covariance matrix}
\begin{frame}[allowframebreaks]{Strategy - Start with the Covariance}
\item We can use the shortcut formula $\sigma_{Y_1Y_2}=E[Y_1Y_2]-E[Y_1]E[Y_2]$.
\item Recall $E[Y_1]=2/3$ from our previous lecture.
\item You should easily be able to verify that $E[Y_2]=4/3$.
\item \begin{alertblock}
E[Y_1] &= \int_{-\infty}^{\infty} \int_{-\infty}^{\infty} y_1 f(y_1,y_2) dy_1 dy_2 \\
 & =  \int_{-\infty}^{\infty} y_1 f_1(y_1) dy_1

\end{document}**strong text**

The error is - ! TeX capacity exceeded, sorry [input stack size=5000]. \end #1->\csname end#1 \endcsname \@checkend {#1}\expandafter \endgroup \if@e... l.176 \end{frame}

  • Do you mean \begin{frame}[allowframebreaks]\frametitle{Strategy - Start with the Covariance}?
    – Sigur
    Jul 14, 2014 at 23:39
  • yes! I used the shortcut method of writing Frametitle
    – EndLoop
    Jul 14, 2014 at 23:59
  • Please post a complete example beginning with \documentclass and ending with \end{document}. Compilable (or, in this case, non-compilable) code is much more useful than mere fragments. In any case, if I complete it myself, your code compiles fine. You need to show us what generates the error.
    – cfr
    Jul 15, 2014 at 0:47
  • Done! Sorry about that!
    – EndLoop
    Jul 15, 2014 at 1:07
  • 2
    alertblock needs an argument, the title of the block.
    – Dox
    Jul 15, 2014 at 2:24

1 Answer 1


The problem is that alertblock needs an argument, the title of the block.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .