# Is it possible to put a block inside another block in Beamer?

Basically I want to insert two blocks within a bigger block. I've tried doing this:

\begin{block}{heading}
content
\end{block}
content
\end{block}
\end{block}


but it doesn't work. The error message is :

File ended while scanning use of \beamer@collect@@body.

I would like to add that this is the first time I've used the LaTeX language, so I'm basically a noob here =)

Blocks within blocks work best if you box them, since it gives you better control over their width and placement. This is easily achieved using minipages:

\documentclass{beamer}% http://ctan.org/pkg/beamer
\usetheme{Warsaw}
\begin{document}
\begin{frame}
Some filler text

\hspace*{.1\linewidth}\begin{minipage}{.8\linewidth}
content
\end{block}
\end{minipage}
\medskip

Some more filler text

\hspace*{.1\linewidth}\begin{minipage}{.8\linewidth}
content
\end{block}
\end{minipage}
\medskip

Some more filler text
\end{block}
\end{frame}
\end{document}


Since minipages tend to remove the appropriate paragraph skipping (above and below), an additional \medskip makes the separation more consistent. I've also added an indent of .1\linewidth, which technically centers the nested block since it's .8\linewidth wide.

• Wow. I didn't expect such a quick reponse. It works perfectly fine!! Many thanks Werner!! Jul 12, 2013 at 21:39
• I am not so sure of the boxing being required – your example as well as the OPs MWE both compile fine even if one removes the minipages. (For proper indenting they are necessary anyway, but that is another point). Jul 13, 2013 at 7:29