# beamer blocks in ordinary article-style document

Is there a way to emulate beamer blocks, e.g., alert/example, in ordinary pdflatex in article documents? Is there a pure tikz way of doing this?

-
What exactly do you want to achieve? Colored text? The box around theorem environments? –  Caramdir Aug 29 '10 at 19:23
Rounded corners, shadows, two colors (title/body). I have seen some tikz examples, but they are not 100% satisfactory. –  E.Verbitskiy Aug 29 '10 at 19:36

With version 2.00 of tcolorbox and its skin library it's possible to include beamer blocks in non-beamer documents. And now this blocks can break between columns and pages.

Here you have an example:

\PassOptionsToPackage{svgnames}{xcolor}
\documentclass[twocolumn,a4paper]{article}
\usepackage{tcolorbox}
\usepackage{lipsum}
\tcbuselibrary{skins,breakable}

\title{Beamer blocks in \texttt{article.cls} with \texttt{tcolorbox (v 2.00)}}
\author{xxxxxx}

\newenvironment{myexampleblock}[1]{%
\tcolorbox[beamer,%
noparskip,breakable,
colback=LightGreen,colframe=DarkGreen,%
colbacklower=LimeGreen!75!LightGreen,%
title=#1]}%
{\endtcolorbox}

\tcolorbox[beamer,%
noparskip,breakable,
colback=LightCoral,colframe=DarkRed,%
colbacklower=Tomato!75!LightCoral,%
title=#1]}%
{\endtcolorbox}

\newenvironment{myblock}[1]{%
\tcolorbox[beamer,%
noparskip,breakable,
colback=LightBlue,colframe=DarkBlue,%
colbacklower=DarkBlue!75!LightBlue,%
title=#1]}%
{\endtcolorbox}

\begin{document}
\maketitle

\section{Section}

\lipsum[2]

\begin{myblock}{Example of \texttt{myblock}}
\lipsum[2-3]
\end{myblock}

\begin{myexampleblock}{Example of \texttt{myexampleblock}}
\lipsum[2]
\end{myexampleblock}


It is relatively easy to reproduce similar boxes using TikZ in a non-beamer document. For example, see here. Do you really need it to look exactly the same as in beamer? If so, you can just look at how it is implemented within beamer; I think it is defined either in beamerbaselocalstructure.sty or beamerinnerthemeinmargin.sty.