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:

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

My DSL looks like:

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

(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))
	quadding: 
		(if (= ilevel 1)
		'center
		'start)
	keep: #t
	(process-children-trim)))))

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
...cdarney@xxxxxxxxxxxxxxxx


 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


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