This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[docbook-apps] thinking about sections, sub-sections and pagebreaks


  (this has *some* connection to just plain docbook semantics, but i
thought it was more appropriate here.  i've posted on this before but i've
had more time to think about it.)

  i'm curious about how one should view the connection between sections,
subsections and page breaks.  consider the fairly straightforward docbook
markup which represents a section and a number of subsections (where i'll
use abbreviations for section and title for brevity):

 <s><t>Major section</t>
  <s><t>Subsection 1</t>
  </s>
  <s><t>Subsection 2</t>
  </s>
  ... and so on ...
 </s>

obviously, the semantics are that we're defining a section that itself
consists of a number of subsections, which is perfectly reasonable.  the
problem comes with wanting to render this so that each subsection starts
on a new page, something that is fairly common with printed output.

  if you use a stylesheet addition that defines a "break-before" for those
sections, the problem is that your printed output will have page breaks in
the following places:

 <s><t>Major section</t>
----- break -----
  <s><t>Subsection 1</t>
   ...
----- break -----
  <s><t>Subsectino 2</t>
   ...
----- break -----
 
and so on.  in other words, the Major section starts on a new page (good),
but the immediately following subsection *also* jumps to a new page, which
leaves pertty much a blank page after the Major section title (not so
good).

  now, semantically, it is sometimes reasonable to have the text
immediately following a Major section represent some kind of lead-up or
intro to the upcoming subsections, and that's what would appear on that
first page:

  <s><t>Major section</t>
   <p> ... some intro here to lay the groundwork for the subsections
    to follow ...
   </p>
----- page break here, which would be acceptable -----
   <s><t>Subsection 1</t>
   ...
  </s>

but it's not always appropriate to do this -- there may not be anything
you want to say before the first subsection -- you just want to get right
down to business and you're back where you started.

  OTOH, you can look at the markup just above, where the text underneath
the "Major section" *is* what you want as the first subsection.  this is
one way to fake the final effect, but it breaks the obvious semantics.

  what seems to be required is some kind of stylesheet transform that says
"break-before page", *unless* you're just immediately starting a new
subsection with no intervening text.

  does this make sense?  is this what others would try to do? or am i not
looking at this the right way?

  (and if it's the correct solution, anyone care to provide the stylesheet
fragment for it?  i mean, i'm getting better at this, but it's still early
and i'm open to suggestions.)

rday

p.s.  and i'm still struggling with how to best render a set of
"exercises".  argh.


---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]