Keeping Text Together

Subject: Keeping Text Together
From: Chuck Darney <cdarney@xxxxxxxxxxxxxxxx>
Date: Thu, 26 Feb 1998 09:17:06 -0500
If, in my SGM document I use sections like so:

<title>First level Title</title>
<p>This is the first paragraph.</p>
   <title>Second Level Title</title>
   <p>This is the 1st paragraph of the 2nd level.</p>
      <title>Third Level Paragraph</title>
      <p>This is the 1st paragraph of the 3rd level.</p>

My DSL looks like:

(element (SECTION)
  (let ((ilevel 
	 (length (hierarchical-number-recursive "SECTION"))))
    (make paragraph
	  keep: #t
	  use: para-style
		(if (< ilevel 2)
		(+ (inherited-start-indent)(PROCSTEP ilevel)))

(element (SECTION TITLE))
   (let ((ilevel (length (hierarchical-number-recursive "SECTION"))))
	 (let ((hs (HSIZE (- 4 ilevel))))
  (make paragraph
	start-indent: (+ (inherited-start-indent)(PROCSTEP ilevel))
	first-line-start-indent: (- (PROCSTEP ilevel))
		(if (= ilevel 1)
	keep: #t

While it does a pretty good job of keeping text together, I want to be
sure that each subordinate "SECTION" is all on one page if possible. 
For example, if all of section levels 1, 2 and 3 can remain on a single
page, good.  If not, level 3 would move to the next page to provide room
for 1 & 2.  At the very least, I need to make sure that the SECTION
TITLE stays with the following paragraphs.  The above code has left the
TITLE on one page and subsequent paragraph on the next.

Any suggestions on how I can control the breaking better?

...Chuck Darney

 DSSSList info and archive:

Current Thread
  • Keeping Text Together
    • Chuck Darney - from mail1.ability.netby (8.8.5/8.6.12) with ESMTP id JAA25967Thu, 26 Feb 1998 09:19:50 -0500 (EST) <=
      • Richard Light - from mail1.ability.netby (8.8.5/8.6.12) with ESMTP id NAA00383Thu, 26 Feb 1998 13:13:47 -0500 (EST)
      • Dave Love - from mail1.ability.netby (8.8.5/8.6.12) with ESMTP id NAA01411Thu, 26 Feb 1998 13:55:41 -0500 (EST)