|
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>
>
> DSSSL:
> (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%)
0pt)
First child:
space-before: (if (absolute-first-sibling?)
(* 0.5 %para-sep%)
0pt)
Preceding element (untested):
space-before: (if (string=? (gi (ipreced (current-node)) "FOO"))
(* 0.5 %para-sep%)
0pt)
(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
12.5.4.1 of the standard.
Regards,
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: http://www.mulberrytech.com/dsssl/dssslist
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Paragraph spacing, Russell Steven Shawn | Thread | Books about DSSSL, Leen Smits |
| Re: Graphics in JadeTeX, Marcus G. Daniels | Date | Re: Processing fot, Graydon Hoare |
| Month |