From a.fatton at unibas.ch Mon Dec 6 10:26:47 2004 From: a.fatton at unibas.ch (=?ISO-8859-1?Q?Andr=E9_Fatton?=) Date: Mon, 6 Dec 2004 11:26:47 +0100 Subject: [cl-typesetting-devel] typesetting a "text pyramid" Message-ID: <55884244-4771-11D9-92ED-0003933EF948@unibas.ch> Hello, 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? or is there another approach (measuring the natural size of the lines and sort then...? no...) sincerely, Andr? Fatton From marc.battyani at fractalconcept.com Mon Dec 6 11:24:00 2004 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Mon, 6 Dec 2004 12:24:00 +0100 Subject: [cl-typesetting-devel] typesetting a "text pyramid" References: <55884244-4771-11D9-92ED-0003933EF948@unibas.ch> Message-ID: <0a0f01c4db86$166c1860$0a02a8c0@marcxp> "Andr? Fatton" 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