[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: table rows in a galley
From: |
Valeriy E. Ushakov |
Subject: |
Re: table rows in a galley |
Date: |
Fri, 3 Oct 2008 20:40:13 +0400 |
User-agent: |
Mutt/1.4.2.3i |
On Fri, Oct 03, 2008 at 19:15:44 +0400, Valeriy E. Ushakov wrote:
> There are several problems with this (though my Lout is getting quite
> rusty, so take this with a grain of salt).
Something along the following lines might work, but I didn't really
try to make it foolproof or flexible. I have a vague feeling that you
are not splitting responsibilities between the generating program and
lout quite right and that makes you write lout code that is more
complex than necessary.
# "meta-galley", helps to get rid of hordes of
# trivial galley definitions
def @Send
left @Target
named @
right @Component
{ @Component }
right galley
{
def @Enclose right component { @ component }
galley
}
def @CPlace { @Galley }
def @PPlace { @Galley }
def @BounceRows { @Galley // @BounceRows }
def @MyTbl {
import @Tbl
def @RepeatRowa {
@Rowa A { @CPlace } B { @PPlace }
// @RepeatRowa
}
@BounceRows //
@Tbl rh { yes } w { expand }
aformat { @Cell { @Right A } | @Cell B }
{
@Rowa A { country } B { population }
// @RepeatRowa
}
}
def @Country named name {} named population {} {
{ @BounceRows&&preceding } @Send {
{ @CPlace&&following } @Send { name }
{ @PPlace&&following } @Send { population }
}
}
PS: http://www.stderr.spb.ru/~uwe/lout/essays/essays.html (*shamless
plug* :) has some examples that demonstrate how to work with scopes,
galleys and xrefs.
SY, Uwe
--
address@hidden | Zu Grunde kommen
http://snark.ptc.spbu.ru/~uwe/ | Ist zu Grunde gehen