Putting text into a colorful box
You often see important content put into a colored box, a common practice on posters and slides, although it’s also used in other documents. In this recipe, we will put a little text and whole paragraphs into a colored box, including making a title for the box.
How to do it...
We will use the tcolorbox package. It is based on the pgf bundle, so you need to have also that package installed.
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 class 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 will load it before. We also set English as the language. Furthermore, load the tcolorbox package. So, our base document...