lout-users
[Top][All Lists]
Advanced

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

Re: Problem with centered headings in @Tbl


From: Valeriy E. Ushakov
Subject: Re: Problem with centered headings in @Tbl
Date: Tue, 12 Oct 1999 13:02:37 +0400

On Sun, Oct 10, 1999 at 07:55:05PM -0700, James Ramsey wrote:

> I have the following as part of my document:
[...]
> Notice the "&1.3m" in the headings containing mu @R
> "in" slash "in". The reason it's there is so that that
> mu @R "in" slash "in" looks centered; otherwise it
> looks right-aligned. The rest of the heading looks
> fine and properly centered. If I change @E to @Eq, the
> heading centers correctly. If I add text behind
> @E{({mu @R "in"} slash @R "in" non)} (without the
> &1.3m) it also appears to center correctly.


You apply cragged @Break to your cells (bear this in mind).  Than
consider e.g. cell C (with @E macros expanded to @OneCol @Eq):

    C {
    Hoop strain according to gauge 2
    @OneCol @Eq { ({mu @R "in"} slash @R "in" non) }
    }

Now the @E{} (i.e. @OneCol @Eq {}) is a paragraph and it inherits the
cragged style from the cell.  This object is also part of the cell
paragraph (also cragged) so Lout centers this object, but within the
centered space allocated for this object, the equation itself is
centered as well.  Since the object is last in line, all the space to
the right is part of it and that's why things look ok when you add
text after the @E: the equation doesn't receive all the space to the
right and thus it's still centered but in the tight box.

Now, this probably sounds confusing.  A picture is worth a 1K words,
so try the following and it will become obvious.

Add this to mydefs, or at the very begining of the document.  It will
gray the object and draw the marks in red.

    def @Show right x {
      { 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto
        closepath 0.75 setgray fill
        1 0 0 setrgbcolor
        xmark 0 moveto xmark ysize lineto stroke
        0 ymark moveto xsize ymark lineto stroke
      } @Graphic x
    }

Now try the following cell C:

    C {
    Hoop strain according to gauge 2
    @Show {} # this one is just for reference
    @Show @E { ({mu @R "in"} slash @R "in" non) }
    }

Than try this one:

    C {
    Hoop strain according to gauge 2
    @Show {}
    @Show @E { ({mu @R "in"} slash @R "in" non) }
    @Show { . }  # this one is not a paragraph
    }


Than this one:

    C {
    Hoop strain according to gauge 2
    @Show {}
    @Show @E { ({mu @R "in"} slash @R "in" non) }
    @Show { . . } # but this one is paragraph, so cragged applies recursively
    }

I hope that the results will be selfevident.

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]