[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] figurate text in groff and TeX
From: |
carsten . kunze |
Subject: |
Re: [Groff] figurate text in groff and TeX |
Date: |
Fri, 25 Sep 2015 20:02:09 +0200 (CEST) |
Hello Doug,
> Examples of figurate text appear in Knuth's paper on
> the placement of line breaks. How would the changing indent
> and length parameters be expressed in TeX?
this is in general described in the TeXbook on page 101 for the \parshape
command.
There one can set \parshape=n i1 l1 i2 l2 ... where n is the number of lines
for the shape, i1 is the first line indent, l1 is the first line length and so
on.
On page 315 exercise 14.18. there is an example for automatic calculating the
shape of a triangle using \parshape where the text is to input at the end of
the second last line:
\setbox1=\hbox{I}
\setbox0=\vbox{\parshape=11 -0\x0\x -1\x2\x -2\x4\x -3\x6\x
-4\x8\x -5\x10\x -6\x12\x -7\x14\x -8\x16\x -9\x18\x -10\x20\x
\ifdim \x>2em \rightskip=-\wd1
\else \frenchspacing \rightskip=-\wd1 plus1pt minus1pt
\leftskip=0pt plus 1pt minus1pt \fi
\parfillskip=0pt \tolerance=1000 \noindent I turn, ... hand.}
\centerline{\hbox to \wd1{\box0\hss}}
--Carsten