previous   Editing Text AreasReducing to Grey Scale   next


Combining a Text Area and Path to Form a Text-Path

A and a can be combined to form a . The underlying path will not be visible (except in path edit mode) and the text will run along the path. The horizontal || determines whether the text should start at the first of the underlying path or if it should be centred along the path or if it should be right aligned at the end control point. The vertical anchor determines whether the base, bottom, top or middle of the text should be aligned on the path. Note that if the text is longer than the path, the text will be truncated to fit.

For example, the text area and path in Figure 8.10(a) are combined to form a text-path. The original text area's horizontal anchor was set to left, so the text along the path starts at the first in Figure 8.10(b). In Figure 8.10(c) the horizontal anchor has been changed to centre, and in Figure 8.10(c) the horizontal anchor has been changed to right.

textpath
(a)
textpathleft
(b)
textpathcentre
(c)
textpathright
(d)
Figure 8.10: Combining a text area and path to form a text-path: (a) the original text area and path; (b) the resulting text-path with left horizontal anchor; (c) centred anchor; (d) right anchor. (The text-paths are in edit mode to show the underlying path.)

Once a path has been combined with a text area, the path line style attributes are lost as the path is only used as a guide to position the text. Most path functions, such as ||, are applied to the underlying path and the text is adjusted to follow the new path. Transformations using the ||, || and || functions are applied to the underlying path not the text. You can either transform the text using the transformation functions before combining it with a path or transform it after combining by changing the ||.

Note the difference between applying || to a text-path and converting a text area and to a text-path. For example, consider the text area and path in Figure 8.11(a). If you first combine them to form a text-path (Figure 8.11(b)) and then add symmetry (Figure 8.11(c)), the result is a text-path where the text is reflected across the line of symmetry. Conversely, applying symmetry to the path first (Figure 8.11(d)) and then combining with the text area yields a text area where only the underlying path has symmetry (Figure 8.11(e)).

A similar effect applies with other types of .

textpath-syma
(a)
textpath-symb
(b)
textpath-symc
(c)
textpath-symd
(d)
textpath-syme
(e)
Figure 8.11: Symmetric text-paths: (a) original text area and path; (b) text area and path in (a) have been combined to form a text-path; (c) the text-path in (b) has had symmetry applied to it in edit path mode; (d) the path in (a) has had symmetry applied to it; (e) the text area and symmetric path in (d) have been combined to form a text-path.

Version 2.0 of the pgf package has limited text along a path support provided by the decorations.text library. This only supports the (left, base) anchor and doesn't support the font transformation. If you export an image containing a text-path to a pgfpicture environment, you must include the decorations.text library:

\usepackage{pgf}
\usepgflibrary{decorations.text}

Alternatively, you can either || or || before you export the image. See the pgf manual for further details on text along a path decorations.

See also:


previous   Editing Text AreasReducing to Grey Scale   next