OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Subject: DOCBOOK-APPS: jade/jadetex: section headings and rubber lengths


I've reported before on jadetex not respecting "keep-with-next" for
<sect2> section headings.  I _think_ I see what's going on, but I'd be
grateful if anyone can confirm or deny the diagnosis.

From inspection of jadetex.ltx, it looks as if the only effect of
specifying keep-with-next for a section heading is to assign a
negative TeX penalty to a page break prior to the heading, thus:

\def\QueryPageBreak{%
\ifBreakMe
 \ifvmode
    \penalty \@M
 \else
    \@bsphack
    \vadjust{\penalty \@M}%
    \@esphack
 \fi
\else
 \ifnum\KeepWithNext=1
   \penalty-600
 \else
   \penalty \z@
 \fi
\fi

The "-600" encourages TeX to break the page prior to the heading,
which will have the side-effect of averting a break between the
heading and its associated text.

But this is obviously a bodge: what we need is not just encouragement
for a break prior to a heading, but an absolute prohibition on a break
immediately following a heading.  I tried the experiment of copying
and pasting the above fragment into my jadetex.cfg then playing with
the size of the negative penalty.  By making it much bigger (e.g.
-6000) I could prevent some of the unacceptable breaks, but at a high
cost: now a lot of pages showed breaks prior to section headings (and
hence short pages) where the breaks were not in fact necessary to
prevent widow headings.  It seems like the -600 penalty is set a level
that will (a) not do too much damage in general while (b) producing a
keep-with-next effect under favorable circumstances!

I'm well aware that Sebastian Rahtz is a much cleverer TeX hacker than
I am, so I presume that if he didn't write a proper keep-with-next
routine for jadetex it must be extraordinarily difficult to do so --
which is bad news indeed.

One related observation.  The text that is breaking unacceptably is
admittedly a difficult one: I have a lot of short <sect2>s in
succession, so keeping section headings "with next" is likely to
produce short pages -- but the problem would not be so intractable if
the spaces before and after headings were rubber lengths, as in LaTeX.
So far as I can tell, in jade/jadetex these lengths are rigid.  At a
guess, there seems to be some sort of provision for rubber lengths in
jadetex, via the mechanism of (sbNom, sbMin, sbMax) and (saNom, saMin,
saMax), but I can't find a way of activating it; the "Nom", "Min" and
"Max" values are all the same for any given section in the
jade-produced tex file.  Is there in fact a way (at dsssl level I
suppose) of making such lengths rubber?

-- 
Allin Cottrell
Department of Economics
Wake Forest University, NC



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Powered by eList eXpress LLC