# How to layout irregular paragraph shape

I have found this in the cover of seminar(one tool to make slide) document.

The final result I have captured below: I wonder how to make this. Is there any easy way?

• You could email the author for the source file. – Harry Gindi Oct 21 '11 at 9:00
• This is the document of seminar. And the document is distributed with source code. It is implemented with \parshape manually, you should read it first. – Leo Liu Oct 21 '11 at 11:09

Quoting from Chapter 14 of The TeXbook

You can specify an essentially arbitrary paragraph shape by saying \parshape= < number >, where the < number> is a positive integer n, followed by 2n < dimen > specifications. In general, '\parshape= n i1 l1 i2 l2... in ln' specifies a paragraph whose first n lines will have lengths l1, l2,...,ln, respectively, and the will be indented from the left margin by the respective amounts i1, i2,...,in

I went straight to the source http://ctan.mackichan.com/macros/latex/contrib/seminar/doc/ and found sem-user.tex. I was able to recreate the result: The code is below

\documentclass[12pt]{article}

\usepackage[textwidth=15cm,textheight=26cm]{geometry}
\setlength{\parindent}{0mm}

\begin{document}

\setlength{\unitlength}{1cm}
\thicklines
\centerline{\lower.8in\hbox{%
\begin{picture}(0,0)
\put(2,-11){\framebox(4,2){}}
\put(2,-11){\line(-2,3){1}}
\put(2,-9){\line(-2,3){1}}
\put(6,-9){\line(-2,3){1}}
\put(1,-9.5){\line(0,1){2}}
\put(1,-7.5){\line(1,0){4}}
\put(5.8,-8.7){\line(0,1){2}}
\put(5.0,-6.7){\oval(1.6,1.6)[tr]}
\put(5.0,-5.9){\line(-1,0){.7}}
\put(3.1,-6.4){\framebox(1.2,1){}}
\put(3.1,-6.4){\line(-1,2){.3}}
\put(3.1,-5.4){\line(-1,3){.3}}
\put(4.3,-5.4){\line(-1,3){.3}}
\put(2.8,-5.8){\line(0,1){1.3}}
\put(2.8,-4.5){\line(1,0){1.2}}
\put(0,6.2){\oval(14,10)}
\put(.02,6.18){\oval(14,10)}
\thinlines
\put(2.8,-5.8){\line(-4,3){9.6}}
\put(2.8,-4.5){\line(-3,5){9.35}}
\put(4,-4.5){\line(1,6){2.6}}
\put(6.8,1.4){\line(-1,-3){2.5}}
\end{picture}}}
\par
\bigskip
\rightskip=0pt plus 2em\relax
\parshape=20
0cm 2.3cm
0cm 2.9cm
0cm 3.5cm
0cm 4.1cm
0cm 4.7cm
0cm 5.3cm
0cm 5.9cm
0cm 6.5cm
0cm 7.1cm
0cm 7.7cm
0cm 8.3cm
0cm 8.3cm
0cm 8.3cm
0cm 7.3cm
0cm 7.3cm
0cm 7.3cm
0cm 7.3cm
0cm 7.3cm
0cm 7.3cm
0cm 7.3cm
seminar.sty is a \LaTeX\ style for typesetting slides or
transparencies, and accompanying notes. Here are some of its special features:
It is compatible with AmS-\LaTeX, and you can use PostScript and AmS
fonts. Slides can be landscape and portrait. There is support for color and
frames. The magnification can be changed easily.
Overlays can be produced from a single slide environment. Accompanying notes,
such as the text of a presentation, can be put
outside the slide environments. The slides, notes or both together
can then be typeset in a variety of formats.

\end{document}


Note that in reference to The TeXbook quote, each line is indented by 0cm, but each line has a different length. The paragraph is designed to be 20 lines long.

ConTeXt allows you to define a shape using metapost and then typeset any text using that shape. Behind the schemes, Metapost calculates the parameters for \parshape, writes them to an external file, TeX reads that file and sets \parshape. Below is an example:

\startuseMPgraphic{shape}
% Shape of the paragraph
path p ; p := ((0,1)..(-1,0)..(1,0)--cycle) scaled 5cm ;

build_parshape
( p,                     % shape path
.5*\baselinedistance,  % offset
.5*\baselinedistance,  % x offset
.5*\baselinedistance,  % y offset
\baselinedistance,     % distance between lines
\strutheight,          % height of a line
\strutdepth,           % depth of a line
\strutheight           % height of the first line
) ;

% For visualization purposes only
draw p ;
\stopuseMPgraphic

% For visualization purposes only
\defineoverlay[shape][\useMPgraphic{shape}]

\useMPlibrary[txt]
\setupshapetexts%
[bodyfont=10pt]

\starttext
\startshapetext[shape]
\input knuth \endgraf
\stopshapetext

% The \type{background} is set only to visualize the parshape
\startTEXpage[background=shape,offset=2mm]
{\getshapetext}
\stopTEXpage
\stoptext


which gives You could look at the shapepar package.

You can use \parshape primitive. The following example is a modification of Knuth example in his TeXBook. The commands are in Persian (I am not sure if this helps you at all): source and its PDF output