LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Mailing list for the LaTeX3 project <[log in to unmask]>
Wed, 21 Sep 2011 20:55:55 +0100
Mailing list for the LaTeX3 project <[log in to unmask]>
text/plain; charset=ISO-8859-1
Joseph Wright <[log in to unmask]>
text/plain (77 lines)
On 21/09/2011 19:36, Frank Mittelbach wrote:
> Am 21.09.2011 18:48, schrieb Joseph Wright:
>> On 21/09/2011 17:34, Bruno Le Floch wrote:
>>> Context uses it in \keeplinestogether, but I don't see why they
>>> couldn't have used \clubpenalties instead. I don't understand the
>>> difference between \interlinepenalties and \clubpenalties as described
>>> in etex_man:
>>> - the ith interline penalty value is used after line i of the paragraph;
>>> - the ith club penalty value is used after line i of a partial
>>> paragraph;
>> My reading of this was that the variation comes down to whether there is
>> any display math about, but in such a case I'm doubtful you'd want to
>> 'keep together' in any case. As you say, in most realistic circumstances
>> \clubpenalties seems to be quite usable, as you have to start from line
>> 1 with \interlinepenalties too.
> I beg to disagree. The two arrays serve different purposes and in fact
> \insertpenalties is the one that is more useful (and was the original
> reason for providing the this additional functionality (the others are
> more an afterthought to make thing orthogonal).
> Main use case:
>   Ensure that after a section x lines are kept together with the section
> for this use have to use \insertpenalties as you do *not* want to
> restart counting after a displayed equation, but you just want x-lines
> once. (in that case you need a mechanism to restore the default status
> after the first paragraph, as LaTeX today does (or rather attempts as it
> not always works in TeX) with \clubpenalty for ensuring 2 lines after a
> heading)
> Minor use case:
>   At the beginning of a paragraph (or after a displayed equation as that
> is visually simiar) you want at least 2 lines but preferably 3) then
> something like
>  \clubpenalties = 2 10000 8000
> That would be a setting you could use for a whole range of paragraphs or
> even for a whole document.
> you can think of others also in combination with \insertpenalties

(I'm assuming you mean '\interlinepenalties' throughout.)

I guess this partly depends on your view on display stuff. For me, I'm
not sure how it fits into the concept of a 'line'. If I have a paragraph

   text text text text text
   text text text text text
   text text text text text
   text text text text text

then how many lines does the display part count? Do we go with a
grid-typesetting approach and measure its eight, divide by the text lien
height and use the result? Do we ignore it?

I guess the other problem I have is that the generalisation
\interlinepenalty => \interlinepenalties seems a bit odd. The
\clubpenalty => \clubpenalties is easy to understand, as both are
related to the start of a paragraph. On the other hand,
\interlinepenalty is a 'floating' idea with no link to the position in a
paragraph, whereas \interlinepenalties does have to start at the beginning.

I guess my overall concern is that I've not seen \interlinepenalties
used 'in the wild', whereas \clubpenalties and \widowpenalties do seem
to be in use. Perhaps that's because I'm not really involved in
typesetting maths (and so the effects of display environments pass me by).
Joseph Wright