Re: Paragraph spacing

Subject: Re: Paragraph spacing
From: Tony Graham <tgraham@xxxxxxxxxxxxxxxx>
Date: Mon, 22 Jun 1998 11:30:22 -0400 (EDT)
At 17 Jun 1998 14:23 -0400, Russell Steven Shawn O'Connor wrote:
 > How do I change (eliminate) the spacing between successive paragraphs.
 > Source:
 > <foo>foo</foo>
 > <bar>bar</bar>
 > (foo (make paragraph (process-children)))
 > (bar (make paragraph (process-children)))
 > result:
 > foo
 > bar
 > I want to eliminate the space in 1 case, and change it to 1/2 the ammount
 > in another case.

Your example, presumably, doesn't match your stylesheet, since
paragraph flow objects default to having no space before or after.

It is relatively simple to choose the value of the space-before and
space-after characteristics based upon position or precedence:

First in a sequence of the same element:

       space-before: (if (first-sibling?)
                         (* 0.5 %para-sep%)

First child:

       space-before: (if (absolute-first-sibling?)
                         (* 0.5 %para-sep%)

Preceding element (untested):

       space-before: (if (string=? (gi (ipreced (current-node)) "FOO"))
                         (* 0.5 %para-sep%)

(You can get a definition of ipreced from the DSSSL standard, the
DSSSL procedure library, or the DSSSList archive.)

One thing to remember is that the DSSSL engine will use the greater of
the space-after characteristic of the preceding paragraph and the
space-before characteristic of the current paragraph.  See section of the standard.


Tony Graham
Tony Graham
Mulberry Technologies, Inc.                         Phone: 301-315-9632
17 West Jefferson Street, Suite 207                 Fax:   301-315-8285
Rockville, MD USA 20850                 email: tgraham@xxxxxxxxxxxxxxxx

 DSSSList info and archive:

Current Thread
  • Paragraph spacing
    • Russell Steven Shawn O'Connor - from mail1.ability.netby (8.8.5/8.6.12) with ESMTP id OAA09474Wed, 17 Jun 1998 14:30:30 -0400 (EDT)
      • Tony Graham - from mail1.ability.netby (8.8.5/8.6.12) with ESMTP id LAA03394Mon, 22 Jun 1998 11:41:42 -0400 (EDT) <=