[cl-typesetting-devel] typesetting a "text pyramid"

Marc Battyani marc.battyani at fractalconcept.com
Mon Dec 6 11:24:00 UTC 2004


"André Fatton" <a.fatton at unibas.ch> wrote:


>I'm not a Lisp- nor a typesetting-newbie, but I only recently
>discovered cl-typesetting. I was wondering about the following: I have
>a text file of a couple of thousands lines, sorted  #'< :key #'length
>on the line length. Each line is one or two chars longer than the
>previous one (but a lot are of equal length also). It's a sort of a
>text pyramid. Now, unless I'm using a monospaced font, it's not at all
>a smooth pyramid.

>How could I get an exact pyramid? How could I force a line to be
>typeset in a box that is a little bit longer than the previous one and
>pack this in a loop?

Just put each line in a paragraph where you set the left-margin and
right-margin to have the exact line position and size and the h-align to
:fill.
This should work IMO

>or is there another approach (measuring the natural size of the lines
>and sort then...? no...)

If the previous one is not enough you can use the lower level functions and
make one hbox for each line but it would be more work.

Marc





More information about the cl-typesetting-devel mailing list