Received: from mx0.gmx.net (mx0.gmx.net [213.165.64.100]) by h1439878.stratoserver.net (8.14.2/8.14.2/Debian-2build1) with SMTP id p8MJT01n030354 for ; Thu, 22 Sep 2011 21:29:01 +0200 Received: (qmail 15210 invoked by alias); 22 Sep 2011 19:28:55 -0000 Delivered-To: GMX delivery to rainer.schoepf@gmx.net Received: (qmail invoked by alias); 22 Sep 2011 19:28:54 -0000 Received: from relay.uni-heidelberg.de (EHLO relay.uni-heidelberg.de) [129.206.100.212] by mx0.gmx.net (mx043) with SMTP; 22 Sep 2011 21:28:54 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.94]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id p8MJQAkW018150 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 22 Sep 2011 21:26:10 +0200 Received: from listserv.uni-heidelberg.de (localhost.localdomain [127.0.0.1]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id p8MEdOU2003306; Thu, 22 Sep 2011 21:26:09 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 1650937 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Thu, 22 Sep 2011 21:26:09 +0200 Received: from relay.uni-heidelberg.de (relay.uni-heidelberg.de [129.206.100.212]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id p8MJQ9Vg024809 for ; Thu, 22 Sep 2011 21:26:09 +0200 Received: from lon1-post-1.mail.demon.net (lon1-post-1.mail.demon.net [195.173.77.148]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id p8MJPu93018120 for ; Thu, 22 Sep 2011 21:25:59 +0200 Received: from cremornelane.demon.co.uk ([80.177.25.195] helo=palladium.local) by lon1-post-1.mail.demon.net with esmtp (Exim 4.69) id 1R6ouC-0005iW-Wr for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Thu, 22 Sep 2011 19:25:56 +0000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2 MIME-Version: 1.0 References: <4E79D279.2050901@morningstar2.co.uk> <4E79E2B7.6080906@residenset.net> <4E79E8C1.8060107@morningstar2.co.uk> <4E79F0F7.7060400@residenset.net> <4E7A1579.1000009@morningstar2.co.uk> <4E7A2EBF.3070009@latex-project.org> <4E7A414B.2020900@morningstar2.co.uk> <4E7B6D5B.3030707@latex-project.org> X-Enigmail-Version: 1.3.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: <4E7B8BC3.8080408@morningstar2.co.uk> Date: Thu, 22 Sep 2011 20:25:55 +0100 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Joseph Wright Subject: Re: \interlinepenalties To: LATEX-L@listserv.uni-heidelberg.de In-Reply-To: <4E7B6D5B.3030707@latex-project.org> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-GMX-Antispam: 0 (Sender is in whitelist: joseph.wright@MORNINGSTAR2.CO.UK); Detail=5D7Q89H36p4L00VTXC6D4q0N+AH0PUCnBi0P5cROEGjO+pG7NAH/K+tf9SrVFtpLrKONl 2T9EL4W4U4jgzLbnCcGpk1z/zwmKT/K1fv3lD0=V1; X-Resent-By: Forwarder X-Resent-For: rainer.schoepf@gmx.net X-Resent-To: rainer@rainer-schoepf.de Status: R X-Status: X-Keywords: X-UID: 6898 On 22/09/2011 18:16, Frank Mittelbach wrote: >> 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 >> display >> display >> text text text text text >> text text text text text >> >> then how many lines does the display part count? > > In TeX the display counts as 3 lines (regardless of the number of real > lines it would occupy in a grid system). We should document that as part of the galley: I didn't know that :-) >> The >> \clubpenalty => \clubpenalties is easy to understand, as both are >> related to the start of a paragraph. > > not quite \clubpenalties refer to the beginning of every partial > paragraph. However \clubpenalty only refers to the penalty after the > first line of a paragraph. The interesting thing is that this is not the case. While I can't find it in The TeXbook or TeX by Topic, using \tracingall shows that, as the e-TeX manual says, \clubpenalty applies to each _partial_ paragraph. For example, try \documentclass{article} \usepackage{lipsum} \begin{document} Hello world Hello world Hello world Hello world Hello world Hello world Hello world Hello world Hello world Hello world Hello world Hello world Hello world Hello world Hello world Hello world Hello world Hello world \[ y = mx + c \] some more text some more text some more text some more text some more some more text some more text some more text some more text some more some more text some more text some more text some more text some more \tracingall \end{document} and look through the shipped-out box. So e-TeX\d generalisation is correct, its more that it's somewhat different to the one I expected :-) >> 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). > > the fact that people use it incorrectly doesn't mean we should continue > to do so. > > Point is when I want to have at least 3 lines after a heading I should set > > > \interlinepenalties = 3 10000 10000 1000 > > \interlinepenalties = 0 > > now if that para contains a display I still get only 3 lines fixed to > the heading. However if i would have used \clubpenalties instead above > it would have gotten the following situation: > > > \clubpenalties = 3 10000 10000 1000 > <1 line> %no break > <2 line> %no break > <3 line> > <4 line> > > <8 line> %no break <--- not desired > <9 line> %no break <--- not desired > <10 line> > <11 line> > <12 line> > \clubpenalties = 0 > > > you may of course want one or 2 lines after each display, but that is a > different use case above you get this only after a heading What it seems is needed is an interface that makes sense, i.e. which separates out: 1) The general interline penalty 2) The penalty for lines(s) at the start of the paragraph as a whole 3) The penalty for lines(s) at the end of the paragraph as a whole 4) The penalty for line(s) before display math 5) The penalty for line(s) after display math 6) Additional penalties between arbitrary lines or some such structure. This will require a bit of thought, as it means synchronising the various primitives in an ordered way. One additional note from my experiments is that \interlinepenalties is reset by \par, in the same way \parshape is. I can't see this mentioned anywhere. In contrast, neither \interlinepenalty nor \clubpenalties are! Quite surprising. -- Joseph Wright