lout-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Section heading breaking and @Protect


From: Ludovic Courtès
Subject: Section heading breaking and @Protect
Date: Tue, 8 Feb 2005 17:03:09 +0100
User-agent: Mutt/1.5.6+20040907i

Hi,

Large scale structure headings sometimes appear as orphan, i.e. the
heading is printed at the bottom of a page or column while the body is
printed on the next page or column.  This has been discussed several
times in the past [1].

Conditional new page before section headings is implemented by @Protect
(in `dsf'):

  def @Protect right x { 3.0f @High //0io // x }

Indeed, 3.0f seems quite approximative since it does not account for the
height of the gap that occurs between the heading and the first line of
the body, nor does it account for the current vertical spacing.  I
thought about the following definition:

  def @Protect right x { @OneRow { 1.0f @High { } // @LP 2.0v @High } //0io // 
x }

The first address@hidden' is supposed to account for the heading font height.
We should rather use the actual heading font to be exact but this would
require adding an extra parameter to address@hidden' (in order to pass it,
e.g., `headingfont' from address@hidden').  Then address@hidden' accounts for a
paragraph symbol which is likely to occur at the beginning of the
structure's body.  Finally, `2.0v @High' is the height occupied by two
lines of regular text.  This is still approximative but probably one
step closer to the most common cases.

I tried this and it seems to give a reasonable result.  The attached
file is a simple test case.  When compiled with the current value of
address@hidden', the heading of section 8 (page 2) is orphan.  When using the
definition above, there is no orphan heading and the result looks good.

What do you think?

Thanks,
Ludovic.

[1] 
http://groups-beta.google.com/groups?hl=en&lr=&q=lout+%40Protect+group%3Afa.lout&qt_s=Search+Groups
    
http://groups-beta.google.com/groups?hl=en&lr=&q=page+breaking+group%3Afa.lout&qt_s=Search+Groups

Attachment: orphan-headings.lout
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]