TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If you're using beamer you can do some nice text boxes using:

\begin{block}{block title}content of block\end{block}

Which gives a text box something like this (the box with the header Esimerkki):

enter image description here

How can I do the same thing in a regular latex document (I really like the look of the beamer text boxes and would like as close to this as possible).

Minimal reproducible example:

I wish I were inside of a really super cool text box so all the word would stop and look at me and say wow that text is pretty.  But alas I am just ordinary \LaTeX{} text.  I am sad.
share|improve this question
up vote 37 down vote accepted

Try the tcolorbox package. A little example



\begin{tcolorbox}[colback=green!5,colframe=green!40!black,title=A nice heading]


enter image description here

The mdframed package can also be an option:




\begin{example}{The Title}


enter image description here

share|improve this answer
Perfect. Exactly what I was looking for. I'll mark it as correct as soon as the time limit expires. – Tyler Rinker Sep 25 '12 at 23:30
Using the mdframed package: how can we add "example chapter's number and a counting number : and then "The title"? – giannis Jun 18 '13 at 10:40
@giannis please open a fresh new question. – Gonzalo Medina Jun 18 '13 at 13:59

For the record, there is also the bclogo package. Can use PsTricks or Tikz as graphics engine. It has nice features, but unfortunatly, documentation is in french only. See code example and ouput below. (sorry for the poor colors choice, I am not good at that!)

enter image description here


couleur = blue!15!white,
couleurBord = red,
arrondi = 0.2,

\begin{bclogo}{The title}

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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