[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Text line spacing
From: |
Valeriy E. Ushakov |
Subject: |
Re: Text line spacing |
Date: |
Tue, 2 Jan 2001 16:30:17 +0300 |
User-agent: |
Mutt/1.3.3i |
On Mon, Jan 01, 2001 at 10:53:30 +0100, Didier Carlier wrote:
> def @Subject {-ppp}
> def @Cc {-eeeppp, /1vx -xyz, /1vx -abc}
> def @Yref {-123}
> {Subject: | @Subject}/1vx
> {Cc: | @Cc}/1vx
> {Your ref: | @Yref}/1vx
> This almost looks good, except that the lines beginning with an
> hyphen are not evenly spaced.
The problem is that the row mark of @Cc protrudes through its first
line. As soon as you wrode def @Cc, lout treats @Cc as a single
object and the /1vx between the "Cc" field and "Your ref" field is
*not* between the "-abc" and "-123".
Since a picture is worth a 1K words, use this definition to visualize
what's going on
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
}
E.g.:
{Subject: | @Show @Subject }
/1vx {Cc: | @Show @Cc }
/1vx {Your ref: | @Show @Yref }
and see for yourself where the row mark protruding through "-eeeppp".
Since the distance between row marks of "-eeeppp" and "-123" is surely
larger than 1v, then 'x' mode adds a tiny whitespace.
Also note that if you move the row mark to the bottom ("-abc") you
will also move the problematic alignment to the top :-) as the object
only has one principal row mark that (some) concatenation modes refer
to.
> I've tried to use @High and various gaps like /1vo etc. but coudn't
> find how to force lout to put all the lines on a fixed grid.
Don't hide object you want on the grid inside definitions:
{Subject: | @Subject }
/1vx {Cc: | "-eeeppp," }
/1vx { | "-xyz," }
/1vx { | "-abc," }
/1vx {Your ref: | @Yref }
which can be done with macros:
macro @Subject { -ppp }
macro @Cc { -eeeppp, /1vx | -xyz, /1vx | -abc }
macro @Yref { -123 }
{Subject: | @Subject }
/1vx {Cc: | @Cc }
/1vx {Your ref: | @Yref }
But you should bear in mind that a macro in lout is just a list of
tokens, nothing else.
Alternatively, you can use 'e' (edge-to-edge) gap mode, or even
tables.
SY, Uwe
--
address@hidden | Zu Grunde kommen
http://www.ptc.spbu.ru/~uwe/ | Ist zu Grunde gehen
- Text line spacing, Didier Carlier, 2001/01/01
- Re: Text line spacing,
Valeriy E. Ushakov <=