lout-users
[Top][All Lists]
Advanced

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

Re: A couple of lout queries


From: Valeriy E. Ushakov
Subject: Re: A couple of lout queries
Date: Fri, 7 Aug 1998 22:54:06 +0400

On Fri, Aug 07, 1998 at 02:33:18PM +0100, address@hidden wrote:

> 1. Suppose I want to print the name and address twice: once as it stands and
> once with the first line, the name part, in a bold font. Is it possible to
> do this using something like the following in my letter or must I have
> separate definitions for @Name and @Address?
> 
> @NameAndAddress {
> Name part
> Address line 1
> ...
> Address line n
> }

You can't retrieve a part of an object, so the answer is no.

Perhaps a better bet would be 

    export @Name @Address
    def @Recepient
        named @Name {}
        named @Address {}
    {
        # ...
    }


> 2. If I have a long letter, I want to put the recipient's name as part of
> the heading on second and subsequent sheets. For now, I'll just consider the
> second sheet. The page header comes from @EvenTop, a named parameter in
> @DocumentLayout. I cannot simply set this to a new value since:
> (a) the setting must be done within @Use { @DocumentLayout @EvenTop ... } and
> (b) the information about what to put there is not known till after that
> point.

Use crossreferences, e.g. @Recipient&&preceding @Open address@hidden to
retrieve recepient name from an invocation of @Recepient in the body
of the letter.  Note, that this won't work for the first page header
since there's no @Recepient that precedes it.


> The next ploy was to `extend' @DocumentLayout and, within the extension,
> redefine @EvenTopHeader, which uses @EvenTop (as is done in the examples in
> latest/636 in the lout mail archive). The new @EvenTop can be made to use
> the the recipient's name but I suspect, from the experiments I've done, that
> the original @EvenTopHeader is being used. Hence the question: which version
> of @EvenTopHeader is being used?

Original one.  The example you refer to demonstrates this (@Bar from
@Base still uses @Foo from @Base despite redefined @Foo in @Derived).

<untested>
Take a look at Jeff's letter style.  Put name/address into paramters.
Invoke a symbol that you will xref to before @Document so that it
precedes all pages.  Wrap @Open (see above) in a convenince symbol.
Use this symbol in your letter setup file in headers/footers.
</untested>

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]