[cl-typesetting-devel] Laying out sub-boxes?

Peter Seibel peter at gigamonkeys.com
Wed Jun 1 18:46:35 UTC 2005


"Marc Battyani" <marc.battyani at fractalconcept.com> writes:

> "Peter Seibel" <peter at gigamonkeys.com> writes:
>
>> Peter Seibel <peter at gigamonkeys.com> writes:
>>
>> > Peter Seibel <peter at gigamonkeys.com> writes:
>> >
>> >> So to layout, say, a business card using cl-typesetting (as opposed to
>> >> raw cl-pdf as I did before) it seems like it'd make some sense to
>> >> generate a few different chunks of content and then place them, as a
>> >> unit, the right places on the page. Are there any examples of this in
>> >> test.lisp or can someone explain how I might do it.
>> >
>> > As usual, right after I asked, I went back and figured it out, more or
>> > less. Anyway, if anyone has any advice or examples, I'm still
>> > interested but I did figure out you can compile different bits of text
>> > with compile-text and then draw them with draw-block.
>>
>> Okay, so now I've got a real question. In order to layout my boxes
>> correctly I need to know what their natural sizes are. But the values
>> returned by compute-boxes-natural-size don't make much sense to me.
>> For instance, the following code shows the natural heights of three
>> lines of text to be around 6 inches. Or do I have some units problem?
>
> You are doing something much to complex for such a simple layout.
> cl-typesetting is more high level than that... ;-)
>
> Here is how I would do it:

Excellent. I'll play with this later today--gotta go talk to some Java
guys about using Lisp. ;-)

-Peter

-- 
Peter Seibel                                     peter at gigamonkeys.com

         Lisp is the red pill. -- John Fraser, comp.lang.lisp



More information about the cl-typesetting-devel mailing list