# A block in beamer

I am unable to understand why this is not compiling,

\documentclass{beamer}
\begin{document}
\begin{frame}{}
\begin{block}
$$\phi (S) \geq \lambda (1 - \sqrt {C \delta})$$
\end{block}
\end{frame}
\end{document}

• Can someone help?
• The above code has no problem and works with me. Please post a complete MWE instead of code snippets to help us help you find the problem. I edited the code which works with me. Do you have any problem compiling that? – AboAmmar Mar 31 '15 at 2:37
• I just added \documentclass{beamer} \begin{document} ... \end{document} which works with me. Do you have any problem compiling that? – AboAmmar Mar 31 '15 at 2:43
• does it work on overleaf? – user6818 Mar 31 '15 at 2:49
• It doesn't work on overleaf. – user6818 Mar 31 '15 at 2:53
• Add {} after \begin{block}. And never use  in LaTeX. – cfr Mar 31 '15 at 3:03

The block environment expects a title. You can have it be empty, but it needs to be there:

\documentclass{beamer}
\begin{document}
\begin{frame}{}
\begin{block}{}
$\phi (S) \geq \lambda (1 - \sqrt {C \delta})$
\end{block}
\end{frame}
\end{document}


It has only to do with an empty {} after the \begin{block} even without a title. As another hack, you can only insert an empty line after \begin{block}. So this works:

\documentclass{beamer}
\begin{document}
\begin{frame}{}
\begin{block}{}
$\phi (S) \geq \lambda (1 - \sqrt {C \delta})$
\end{block}
\end{frame}
\end{document}


Also this:

\documentclass{beamer}
\begin{document}
\begin{frame}{}
\begin{block}

$\phi (S) \geq \lambda (1 - \sqrt {C \delta})$
\end{block}
\end{frame}
\end{document}