Take the 2-minute tour ×
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

closed as too localized by bloodworks, Stefan Kottwitz Jan 19 '13 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, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

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
add comment

1 Answer

up vote 5 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
add comment

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