-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

LaTeX Cookbook
By :

You often see important content put into a colored box, especially on posters and slides, although it's used in other documents, too. In this recipe, we will put a little text and also whole paragraphs into a colored box. They can also have titles.
We will use the tcolorbox
package. It is based on pgf
, so you need to have that package installed as well.
We will create a box with the defaults, a titled box with split content, and boxes placed inline that fit the width of the content. Proceed as follows:
Create a small document based on any document class. The article
package is a simple choice. Load the blindtext
package to generate dummy text. This time, we will use the pangram
option to create short pangrams as dummy text. The blindtext
package requires the babel
package, so we load it before. We also set English as the language. Furthermore, load the tcolorbox
package. Our base document looks like this:
\documentclass{article} \usepackage[english...