2

I got an error with the exampleblock environment:

\documentclass{beamer}
\usetheme{PaloAlto}

\begin{document}
\begin{frame}\frametitle{Title}
\begin{exampleblock}
\[
t = \frac{1}{\lambda}\mbox{ln}\left(\frac{N(t)-D(t)}{N(t)}\right)
\]
\end{exampleblock}
\end{frame}
\end{document}

Latex says "exempleblock environment undefined." Where is the problem?

  • 5
    Check your spelling: it's exampleblock and it's missing a second argument: it wants to be invoked as \begin{exampleblock}{title}. See beamer guide. – bloodworks Jan 19 '13 at 9:36
5

All blocks environments need a title, so the syntax

\begin{exempleblock}
stuff
\end{exempleblock}

is wrong. To fix the problem use:

\begin{exempleblock}{Title}
stuff
\end{exempleblock}

or at least:

\begin{exempleblock}{}
stuff
\end{exempleblock}

So your example is:

\documentclass{beamer}
\usepackage{lmodern} % to remove warnings of size substitution
\usetheme{PaloAlto}

\begin{document}
\begin{frame}\frametitle{My equation}
\begin{exampleblock}{title}
\[
t = \frac{1}{\lambda}\mbox{ln}\left(\frac{N(t)-D(t)}{N(t)}\right)
\]
\end{exampleblock}
\end{frame}
\end{document}

which produces:

enter image description here

Disclaimer

I'm sure we already had a similar question, but I cannot find it now.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.