Fitting text to a shape

There are occasions when text is not strictly arranged in a rectangular box. For example, if you would like to print a label for a DVD or compact disc, the text should be arranged in a circle.

How to do it...

The shapepar package can typeset paragraphs in a specific shape, such as a circle, a hexagon, or a heart. The shape size will be adjusted so the given text fits in. We will now try it with a heart:

  1. Make a small document, load the packages blindtext (for dummy text) and the shapepar package:
    \documentclass{article}
    \usepackage{blindtext}
    \usepackage{shapepar}
  2. In the document, use the \shapepar command with the shape argument, and then text as follows:
    \begin{document}
    \shapepar{\heartshape}\blindtext[2]
    \end{document}
  3. Compile ...

Get LaTeX Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.