Tell me more ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I got an error with the exempleblock 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?

share|improve this question
4  
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 at 9:36

closed as too localized by bloodworks, Stefan Kottwitz Jan 19 at 10:02

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.

1 Answer

up vote 3 down vote accepted

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.

share|improve this answer

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