Fitting text to a shape
There are situations when text doesn’t have a strict rectangular shape. For example, if you want to print on a DVD or compact disc label, the whole text should fit within a circular boundary.
How to do it...
The shapepar package can typeset paragraphs in a particular shape, such as a circle, a hexagon, or a heart. The shape size will be automatically adjusted to accommodate the provided text. We will now try it with a heart:
- Start a small document, load the blindtext package for dummy text and the shapepar package:
\documentclass{article} \usepackage{blindtext} \usepackage{shapepar}
- In the document body, use the \shapepar command with a shape type argument, and then your text, as follows:
\begin{document} \shapepar{\heartshape}\blindtext[2] \end{document}
- Compile and have a look:
Figure 2.15 – Text in the shape of a heart
How it works...
We loaded the blindtext package, which provides filler...