[Top][All Lists]

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

Problems with @Break (inter-line gap ignored)

From: Valeriy E. Ushakov
Subject: Problems with @Break (inter-line gap ignored)
Date: Thu, 4 Sep 1997 18:55:09 +0400

On Sat, Aug 30, 1997 at 08:45:38PM +0200, address@hidden wrote:

The code sample was sent to me directly but I reply to the list as
this problem is of general interest.

> a small example of the code:

The problem with the following code is that the text within @Break is
still typeset with default inter-line gap.

    1.5fx @Break {
    # ...
    # some text here
    # ...

Well, here's why it does not work.

A bit of theory from Expert's Guide first:

| A sequence of two or more objects separated by "&" symbols is a
| paragraph.  Lout breaks paragraphs into lines automatically as
| required, by converting some of the "&" symbols into "//1vx".

| One "v" [unit] equals the current gap between lines introduced during
| paragraph breaking, as specified by the @Break symbol.

@PP is really a macro:

    # @ParaGap = 1.3vx and @ParaIndent = 2f are paramters to `dl'
    macro @PP { //@ParaGap @ParaIndent @Wide &{0i} }

Thus, assuming default values, after macro expansion your code looks
like (with some reformatting, comments and some implicit stuff made
explicit for clarity):

      # This is a paragraph object where inherited @Break settings are
      # still in effect

      # paragraph indentation: this is an empty object 2f wide
      { 2f @Wide {} }

      # this concatenates the indent with the rest of paragraph text

      # the rest of text that is actually a @Break symbol with some
      # new settings
      { 1.5cx @Break { your text } }

Now when you inline (concatenate with `&') @Break into paragraph, the
paragraph already has line break style and inter-line gap set.  So
Lout ignores all settings of the inner @Break except for hyphenation.
Indeed, one can hardly make any sense out of:

    { 1.2fx adjust hyphen } @Break { # default style
    { 1.3fx clines } @Break { text }
    { 1.4fx rright } @Break { text }
    and lots of text follows here.

Does the gap after the first line shoud be 1.2fx, 1.3fx or 1.4fx?
What line break style shoud be used: adjust, clines or rragged?

To make @Break settings make effect you have to apply @Break to the
whole paragraph:

    1.5fx @Break {
    2f @Wide {} &0i your text

Unfortunately, you cannot express this in in a user-friendly way with
standard Lout packages.  `dl' has "@LP" for paragraph gap without an
indent but doesn't have a symbol for indent without a gap.  One
solution is to add the following macro to your `mydefs.lt':

    # Paragraph indent
    import @DocumentLayout
    macro @PI { @ParaIndent @Wide &{0i} }

and rewrite your document as:

    1.5cx @Break { @PI your text }

This kludgery is a consequnce of the fact that @PP is a macro so
@Break behaviour in your original codes is not obvious and hence
surprising.  It's not a bug, rather a wart in user friendly input.
But this can't be fixed easily.

Hope it helps.

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]