[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: IBM OEM Font followup, plus misc. Lout comments

From: Valeriy E. Ushakov
Subject: Re: IBM OEM Font followup, plus misc. Lout comments
Date: Wed, 3 Sep 1997 16:49:00 +0400

On Tue, Sep 02, 1997 at 02:53:19PM -0500, Frank Sergeant wrote:

> But, I was still getting behavior
> that I couldn't make sense of.  In particular, the boxes
> that I put the screen image figures into would sometimes
> come out right (tightly surrounding the screen image figure),
> but other times would take up much more space, more or
> less filling a page.  I suppose this problems stems from
> me not having a proper conceptual model of how Lout works,

"As wide as possible" rule in action.
This is another good candidate for a FAQ.

For conceptual model of how Lout works read the Expert Guide, at least
the part that describes the core language.  It's concise and clear.
The section on "The style and size of objects" explains you particular

You problem stems from not recognizing the Lout "as wide as possible"
rule.  You want a boxed object.  The code for boxing just uses
object's coordinates as calculated by Lout and draws a line around the
object, this is done by directly inserting PostScript code with
@Graphics.  Now I can guess that when Lout determines the size of your
object it can see that a lot of space is available and makes your
object that wide.  Your picture is probably centered within that
object and it comes out centered, but what you are actually boxing is
the whole object with your picture in the center, not just the

Another manifestation of this "as wide as possible" rule that may
surprise you is when you ask Lout to center the object or flush it to
the right but see no visible changes in the output.  In fact Lout has
centered/flushed your object but it has done it in a space equal to
the size of the object itself.  This means that Lout's idea of what
space is available differs from yours.  Probably there is another
object that has eaten up the free space.  And this is probably because
objects are concatenated in the order that differs from what you think
they are.

When it comes to the low level Lout, think about concatenating objects
and how the space is shared among them.  This is how Lout works and
once you master its simple rules, you will see how to fix this kind of
problems.  Most often they result from overlooking the order in which
objects will be concatenated by Lout and once you see what's going on,
it's very easy to fix this.  This kind of problems can perhaphs be
compared to dangling `else' in C, or semicolon behaviour in Pascal
(where, to much surpise of seasoned C programmers it's a separator not
a delimiter).

Hope it helps.

PS: Please fix the the href to my Lout page by prepending http://

SY, Uwe
address@hidden                         |       Zu Grunde kommen
http://www.ptc.spbu.ru/~uwe/            |       Ist zu Grunde gehen

reply via email to

[Prev in Thread] Current Thread [Next in Thread]