previous   Computing the Parameters forCreating Frames for Use   next


Computing the Parameters for shapepar

The \parshape command is fairly limited. You need the right amount of text in the paragraph to get the shape right, and you can't have cut out sections. These two things can be overcome using the \shapepar command defined in Donald Arseneau's shapepar package. The syntax for \shapepar is complex; those interested should read the shapepar documentation. As with \parshape, the shape is constructed using horizontal scan lines. If you want gaps to appear in your shape, make sure to set the winding rule to even-odd. If in doubt, give the a fill color; the area that is filled will contain the text of the paragraph, and the area that isn't filled won't.

To determine the parameters for a \shapepar, create your shape as a single path. Select this path, and use the menu item TeX/LaTeX->Shapepar.... As with \parshape, a dialog box will open allowing you to select whether you want to use the path itself to define the shape or whether you want to use the path's outline to define the shape. For example, Figure 10.3(a) shows a path with a 40bp line width. The \shapepar parameters were constructed first from the path (Figure 10.3(b)) and then from the outline (Figure 10.3(c)).

Figure 10.3: Shapepar example: (a) the path; (b) parameters constructed from the path and included in a LaTeX document to produce a shaped paragraph; (c) parameters constructed from the path's outline and included in a LaTeX document to produce a shaped paragraph.
    
 Image shapeparexa.png  
 (a)  
      
 Image shapeparexb.png Image shapeparexc.png  
 (b) (c)  

As with the parshape function, the horizontal scan lines used by Jpgfdraw will appear on screen, and if successful, a dialog box will appear for you to save the \shapepar command to a file. You can then input this file at the start of the appropriate paragraph in your TeX or LaTeX document. For example, if you save the \shapepar command to a file called, say, myshapepar.tex, then if you are using plain TeX you would need to do:

\input myshapepar
This is the start of the paragraph...
or if you are using LaTeX you would need to do:
\input{myshapepar}%
This is the start of the paragraph...
Remember to include the shapepar package:

See also:


previous   Computing the Parameters forCreating Frames for Use   next