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 p8MLl2Ew029702 for ; Thu, 22 Sep 2011 23:47:03 +0200 Received: (qmail 24493 invoked by alias); 22 Sep 2011 21:46:57 -0000 Delivered-To: GMX delivery to rainer.schoepf@gmx.net Received: (qmail invoked by alias); 22 Sep 2011 21:46:57 -0000 Received: from relay2.uni-heidelberg.de (EHLO relay2.uni-heidelberg.de) [129.206.210.211] by mx0.gmx.net (mx049) with SMTP; 22 Sep 2011 23:46:57 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.94]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id p8MLicEp027078 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 22 Sep 2011 23:44:38 +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 p8MEdOWM003306; Thu, 22 Sep 2011 23:44:37 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 1651199 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Thu, 22 Sep 2011 23:44:37 +0200 Received: from relay2.uni-heidelberg.de (relay2.uni-heidelberg.de [129.206.210.211]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id p8MLibB5001007 for ; Thu, 22 Sep 2011 23:44:37 +0200 Received: from mail-fx0-f49.google.com (mail-fx0-f49.google.com [209.85.161.49]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id p8MLiWkC027058 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=FAIL) for ; Thu, 22 Sep 2011 23:44:36 +0200 Received: by fxg7 with SMTP id 7so4519829fxg.22 for ; Thu, 22 Sep 2011 14:44:32 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.46.89 with SMTP id i25mr3779208faf.34.1316727872881; Thu, 22 Sep 2011 14:44:32 -0700 (PDT) Received: by 10.152.23.67 with HTTP; Thu, 22 Sep 2011 14:44:32 -0700 (PDT) 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> <4E7B8BC3.8080408@morningstar2.co.uk> Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Whitelist: Message-ID: Date: Thu, 22 Sep 2011 17:44:32 -0400 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Bruno Le Floch Subject: Re: \interlinepenalties To: LATEX-L@listserv.uni-heidelberg.de In-Reply-To: <4E7B8BC3.8080408@morningstar2.co.uk> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-GMX-Antispam: 0 (BackTrace mail analyze); Detail=5D7Q89H36p4L00VTXC6D4q0N+AH0PUCnGL2vqOgpaBYL16oitsMrgDt/NQNpSCZFFjDOy 97xb7Zpf+wZnd5ZXNcvLDXR3Wg3wRjdQbwEMh8=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: 6900 On 9/22/11, Joseph Wright wrote: > 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. I'm afraid (3) doesn't exist (not sure). It would be \the\interlinepenalties -k, where is the number of lines in the paragraph. Since we have full control on all of the paragraph-breaking primitives, would it make sense to start a new TeX paragraph after each display (with no indentation, nor \everypar hook: the user should think that it is still the same paragraph), and thus be able to use \widowpenalties for the true end of the paragraph (checking whether the partial paragraph ends in \par or $$)? > 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. Surprising, indeed. Bruno