[Top][All Lists]

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

Re: Paragraph wanted rather than long line

From: Reimer Behrends
Subject: Re: Paragraph wanted rather than long line
Date: Wed, 28 May 2003 17:25:32 -0400
User-agent: Mutt/1.5.4i

On Thu, May 22, 2003 at 06:28:34PM +0100, Barrie Stott wrote:
>       def @FF
>               left fontname
>               right face
>       {
>               { fontname face size } @Font { fixed paragraph of 6 lines, say }
>       }
> It turns out that the vertical spacing at the start is always //.5v so
> I would like to put it into the definition. Unfortunately, when I do,
> I get a long line instead of the paragraph. I've tried all the
> variations I can think of without any success.

Well, the following happens: When you type (without the ">" marks, of

> Some Text.
> { Helvetica } @FF { Base }

lout reads this as "Some Text &s { Helvetica } @FF { Base }". That is,
the @FF is joined to the previous text by a horizontal concatenation
operator. To have a vertical concatenation operator, you have to use a
macro, not def. Unfortunately, macros cannot have parameters, so you
have to do something else about it, like:

def @FFMain
  named @FontName { }
  right face
  { @FontName face 12p } @Font { fixed paragraph of 6 lines, say }

macro @FF
  //.5v @FFMain @FontName

And use it with:

Some Text.

@FF { Helvetica } { Base } 

This code is somewhat awkward (and worse, untested, but you should get
the idea), since the //.5v in the macro prevents you from using a left
parameter. An alternative is to use galleys, though they have their
own idiosyncrasies. For an example of how to use galleys to create
vertically concatenated items, look at the implementation of the @List

                        Reimer Behrends

reply via email to

[Prev in Thread] Current Thread [Next in Thread]