[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: forward references
From: |
Valery Ushakov |
Subject: |
Re: forward references |
Date: |
Sat, 21 Oct 2017 05:46:52 +0300 |
User-agent: |
Mutt/1.8.3 (2017-05-23) |
On Fri, Oct 20, 2017 at 11:28:00 -0700, kevinbanjo wrote:
> Hi, I'm trying to do a letter template that incorporates a footer
> which includes the sender's name and an abbreviated of the
> "regarding" field (see attached) but its giving me errors such
> things are not yet defined. How do I tell lout to use my values
> when it doesn't/can't know them yet?
Lout standard packages use "galleys" for this. I'm afraid that
requires reading the relevant parts of the Expert's Guide.
You can also find a couple of short examples of scoping rules in my
very old mails:
http://www.stderr.spb.ru/~uwe/lout/essays/496.scoping.txt
http://www.stderr.spb.ru/~uwe/lout/essays/636.scoping.txt
In your specific case you can probably use something like the
following. Invoke @Document inside your @MyLetter definition in a
context that you control with @Open, then you can pass the values from
@MyLetter parameters to @OddTop &c directly.
# ----8<-- LegalLetterMailPS.lt ----8<-----
@SysInclude { doc }
def @MyLetter
named @ShortRe {}
body @Body
@Begin
{
@BasicSetup
@InitialFont { Helvetica Base 24p }
}
@Open {
{
@DocumentSetup
@EvenFoot { @ShortRe }
@OddFoot { @Right @ShortRe }
}
@Open {
{
@OrdinarySetup
}
@Open {
@Document
}
}
}
//
@Text
@Begin
@Heading { Some Fixed Text }
//
@Body
//
@Display { More Fixed Text }
@End @Text
@End @MyLetter
# ----8<-- letter.lt ----8<-----
# @Include { LegalLetterMailPS }
@MyLetter
@ShortRe { My rights }
@Begin
@Display { Hello ! }
@PP Sample Text.
@NP New page
@End @MyLetter
-uwe