lout-users
[Top][All Lists]
Advanced

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

Re: How do I equally space?


From: Valeriy E. Ushakov
Subject: Re: How do I equally space?
Date: Fri, 22 Oct 1999 01:48:33 +0400

On Thu, Oct 21, 1999 at 01:23:49PM -0700, address@hidden wrote:

> Am I using @HAdjust correctly?

Yes.


>               def vs { "0.5w" @VShift { { strutval s  } @High } }
>               def hs {                { strutval sh } @Wide   }
> 
>               @OneCol @OneRow { ^| hs ^/ vs | x }
>           }
> 
> Seems like it would expand to this if I just want a vertical strut for my
> December heading:
> 
> ||0.5rx @OneCol @OneRow {^/ 0.5w @VShift 1.0f @High | {December 1999} }
> 
> Is that right? 

No.  See this, which is the same but spells out implicit empty
objects:

    def vs { "0.5w" @VShift { { strutval s  } @High {} } }
    def hs {                  { strutval sh } @Wide {}   }
    #                                             --^^-- !

So, when expanded (if both struts are on) it will be:

    @OneCol @OneRow {
        {
            {}                              ^| { 1f @Wide {} }
        }                                    # horizontal strut; vertically
        ^/                                   # aligns with parameter
        {
            { 0.5w @VShift { 1f @High {} } } | {December 1999}
            # vertical strut, horizontally
            # aligns with parameter
        }
    }

where

    { 0.5w @VShift { 1f @High {} } }

Is an empty object 1f high (vertical strut) and 0f wide; its
horizontal mark protruding thrugh its center (0.5w).

Concatentating this to the object will "strut" it:

    { 0.5w @VShift { 1f @High {} } } | { December 1999 }

has the same width as { December 1999 }, but its hight is 1f because
of the strut (which enshures that the hight is at least 1f, if the
hight of parameter object is less than 1f).

In the same way horizontal strut will allign with parameter object and
if parameter object is shorter than 1f it will ensure that the result
is at least 1f wide.

So for vertical strut only you will write:

    @OneCol { 0.5w @VShift 1f @Hight | { December 1999 } }


> Am I right in thinking that the @VShift and @High actually apply to
> the object {December 1999}?

No, see above.  In general, when you see a concatenation operator or a
closing brace and there's a symbol before it that requires right
parameter and there's no object in the right paramter position, an
empty object will be inferred for the right paramter.

So  1f @High | { ... } is in fact  1f @High {} | { ... }


HTH.

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]