Received: from mail.proteosys.com ([62.225.9.49]) by nummer-3.proteosys with Microsoft SMTPSVC(5.0.2195.5329); Fri, 7 Mar 2003 17:32:29 +0100 Received: by mail.proteosys.com (8.12.3/8.12.2) with ESMTP id h27GWQa9010293 for ; Fri, 7 Mar 2003 17:32:27 +0100 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.27]) by relay2.uni-heidelberg.de (8.12.8/8.12.8) with ESMTP id h27GIhle027016; Fri, 7 Mar 2003 17:18:43 +0100 (MET) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C2E4C7.24FD4C80" Received: from listserv (listserv.uni-heidelberg.de [129.206.100.27]) by listserv.uni-heidelberg.de (8.12.3/8.12.3/SuSE Linux 0.6) with ESMTP id h270RlAS028465; Fri, 7 Mar 2003 17:18:21 +0100 Received: from LISTSERV.UNI-HEIDELBERG.DE by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 1.8d) with spool id 7321 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Fri, 7 Mar 2003 17:18:21 +0100 X-MimeOLE: Produced By Microsoft Exchange V6.5 Received: from relay2.uni-heidelberg.de (relay2.uni-heidelberg.de [129.206.210.211]) by listserv.uni-heidelberg.de (8.12.3/8.12.3/SuSE Linux 0.6) with ESMTP id h27GILwE002572 for ; Fri, 7 Mar 2003 17:18:21 +0100 Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.189]) by relay2.uni-heidelberg.de (8.12.8/8.12.8) with ESMTP id h27GIRle026972 for ; Fri, 7 Mar 2003 17:18:27 +0100 (MET) Received: from [212.227.126.162] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 18rKYF-0001vb-00 for LATEX-L@listserv.uni-heidelberg.de; Fri, 07 Mar 2003 17:18:27 +0100 Received: from [80.129.6.245] (helo=istrati.mittelbach-online.de) by mrelayng.kundenserver.de with asmtp (TLSv1:EDH-RSA-DES-CBC3-SHA:168) (Exim 3.35 #1) id 18rKYE-0005xU-00 for LATEX-L@listserv.uni-heidelberg.de; Fri, 07 Mar 2003 17:18:27 +0100 Received: (from frank@localhost) by istrati.mittelbach-online.de (8.11.2/8.11.2/SuSE Linux 8.11.1-0.5) id h27GHvg31789; Fri, 7 Mar 2003 17:17:57 +0100 In-Reply-To: References: <630BE70C8320D6118D240002A589ABB204A95102@DERUM201> Return-Path: X-Mailer: VM 6.96 under Emacs 20.7.1 X-OriginalArrivalTime: 07 Mar 2003 16:32:29.0647 (UTC) FILETIME=[256005F0:01C2E4C7] X-Authentication-Warning: istrati.mittelbach-online.de: frank set sender to frank@mittelbach-online.de using -f X-Scanned-By: MIMEDefang 2.28 (www . roaringpenguin . com / mimedefang) X-Spam-Score: -1 () IN_REP_TO,REFERENCES,SPAM_PHRASE_01_02,X_AUTH_WARNING Content-class: urn:content-classes:message Subject: Re: algorithm for \addvspace Date: Fri, 7 Mar 2003 17:17:57 +0100 Message-ID: A<15976.50741.35120.781089@istrati.mittelbach-online.de> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Re: algorithm for \addvspace Thread-Index: AcLkxyV6BeIXiyeER6WUWTSH6oluAg== From: "Frank Mittelbach" To: Reply-To: "Mailing list for the LaTeX3 project" Status: R X-Status: X-Keywords: X-UID: 4570 This is a multi-part message in MIME format. ------_=_NextPart_001_01C2E4C7.24FD4C80 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable > >yes, kind of, but this is really history and we can't change that = name for 2e > >not even the semantics i would guess (unless put into fixltx2e). > > Yes (you wouldn't have had to tell _me_ that; I know it is much too = late to > change such behaviour in the 2e core). that was a general remark, i believe that i don't have to tell _you_ :-) > > > \topsep-\parskip < \lastskip < \topsep > > > >yes again. but this is from around 1986 i fear. so you can claim it = is not > >wrong but strange you know: IBM ifyou can't fix it document it and call it a feature :-) = but yes, i agree with you. > I do claim that it is wrong, but cannot be fixed in the 2e core. It = could > be another candidate for fixltx2e.sty. indeed. > >the logic is still as strange as before in the case \lastskip is = negative and > >skip positive. > > I presume you meant to say something different here. The \lastskip < = 0 < > SKIP case was never questioned. well but i question it. i find its behaviour even stranger than the = (mis)use of a negative value to back up. my claim is that a negative skip in \lastskip is most likely there to = correct for some visual property. so as far as the visual space provided by the = object above it is likely equiv to 0pt and a following \addvspace should not = remove it and insert its SKIP but simply should add its SKIP to achive the = visual maximum. > >the if minipage flag is necessary or else you get strange and = unwanted effects > >at the beginning of a box, you really don't want to start there with = a space > >(normally) > > OK, I can't claim I have ever learnt what these flags signify anyway. = If > it's a "beginning of minipage" flag then it makes perfect sense. yes that is what it is, it is true at the beginning and reset in = \everypar > >i take my remark back from last night, I don't see how to easily = define the > >corrective action command. the above doesn't do the job (i think) > > We're thinking about different things, but I can see that your > \correctspace would be more useful. I was merely thinking about = preserving > the "invariant" that \lastskip is the effective total amount of = vertical > glue since the last non-discardable item, which is what \addvspace = and > \addvpentalty rely on. > > >reason: typical situation is like this > > > > > >\addvspace{8pt} % from the end of some object > >\correctspace{2pt} % what to put here to change the = spacing??????? > >\addvspace{10pt} % from the beginning of a new object > > > >eg end of list followed by \section > > > >now the place where the user can put in his/her correction command = is between > >the two \addvspace commands. so if one things the space is too small = and wants > >to change that, eg add 2pts then > > > >nothin there will give us 10pt total, ie max(8pt,10pt) > >\vspace{2pt} will give us 18pt total, ie 8pt + max(2pt,10pt) > >\AddVspace{2pt} will give us 10pt total, ie max(max(8pt,2pt),10pt) > > Don't you mean: max( 8pt+2pt, 10pt) ? yes sir. > How about > > \def\correctvspace#1{% > \relax % Won't hurt, and might help. > \ifvmode > \@tempskipb=3D\lastskip > \vskip-\@tempskipb > \vskip #1% > \vskip\@tempskipb > \else > \@noitemerr > \fi > } looks simple enough, but needs some further thought as well. the above = will violate the property of \addvspace and \addpenalty to properly interact = with each other, or so i would think > ? There is a slight imperfection in that if the break is taken at a > penalty abve the correction then it will disappear, whereas it will = not > disappear if the break is taken at a penalty below the correction, = but I > think that is reasonable behaviour. One could also provide for = inserting a > penalty just before the correction skip. well not quite, a later \addpenalty should move backwards past the = correction space (nominally) on the vertical list. have a look what \addvspace{10pt} \addpenalty{333} \addvspace{12pt} \addpenalty{222} \addvspace{13pt} does. a \correctvspace inbetween should not move the breakpoints but that makes programming a bit awkward i guess :-) as it besically = calls for some interaction that you so far was able to avoid frank ------_=_NextPart_001_01C2E4C7.24FD4C80 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Re: algorithm for \addvspace

 > >yes, kind of, but this is really = history and we can't change that name for 2e
 > >not even the semantics i would guess = (unless put into fixltx2e).
 >
 > Yes (you wouldn't have had to tell _me_ = that; I know it is much too late to
 > change such behaviour in the 2e = core).

that was a general remark, i believe that i don't have = to tell _you_ :-)

 > > >     = \topsep-\parskip < \lastskip < \topsep
 > >
 > >yes again. but this is from around = 1986 i fear. so you can claim it is not
 > >wrong but strange

you know: IBM ifyou can't fix it document it and call = it a feature :-) but
yes, i agree with you.

 > I do claim that it is wrong, but cannot be = fixed in the 2e core. It could
 > be another candidate for = fixltx2e.sty.

indeed.

 > >the logic is still as strange as before = in the case \lastskip is negative and
 > >skip positive.
 >
 > I presume you meant to say something = different here. The \lastskip < 0 <
 > SKIP case was never questioned.

well but i question it. i find its behaviour even = stranger than the (mis)use
of a negative value to back up.

my claim is that a negative skip in \lastskip is most = likely there to correct
for some visual property. so as far as the visual = space provided by the object
above it is likely equiv to 0pt and a following = \addvspace should not remove
it and insert its SKIP but simply should add its SKIP = to achive the visual
maximum.

 > >the if minipage flag is necessary or = else you get strange and unwanted effects
 > >at the beginning of a box, you really = don't want to start there with a space
 > >(normally)
 >
 > OK, I can't claim I have ever learnt what = these flags signify anyway. If
 > it's a "beginning of minipage" = flag then it makes perfect sense.

yes that is what it is, it is true at the beginning = and reset in \everypar


 > >i take my remark back from last night, = I don't see how to easily define the
 > >corrective action command. the above = doesn't do the job (i think)
 >
 > We're thinking about different things, but = I can see that your
 > \correctspace would be more useful. I was = merely thinking about preserving
 > the "invariant" that \lastskip = is the effective total amount of vertical
 > glue since the last non-discardable item, = which is what \addvspace and
 > \addvpentalty rely on.
 >
 > >reason: typical situation is like = this
 > >
 > >
 > = >\addvspace{8pt}       % from the end = of some object
 > >\correctspace{2pt}    % = what to put here to change the spacing???????
 > = >\addvspace{10pt}       % from the = beginning of a new object
 > >
 > >eg end of list followed by = \section
 > >
 > >now the place where the user can put = in his/her correction command is between
 > >the two \addvspace commands. so if one = things the space is too small and wants
 > >to change that, eg add 2pts = then
 > >
 > >nothin there    will = give us 10pt total, ie  max(8pt,10pt)
 > >\vspace{2pt}    will = give us 18pt total, ie 8pt + max(2pt,10pt)
 > >\AddVspace{2pt} will give us 10pt = total, ie max(max(8pt,2pt),10pt)
 >
 > Don't you = mean:           &n= bsp;           &nb= sp;      max(   8pt+2pt,  10pt) = ?

yes sir.

 > How about
 >
 > \def\correctvspace#1{%
 >    \relax % Won't hurt, and = might help.
 >    \ifvmode
 >       = \@tempskipb=3D\lastskip
 >       = \vskip-\@tempskipb
 >       \vskip = #1%
 >       = \vskip\@tempskipb
 >    \else
 >       = \@noitemerr
 >    \fi
 > }

looks simple enough, but needs some further thought as = well. the above will
violate the property of \addvspace and \addpenalty to = properly interact with
each other, or so i would think


 > ?  There is a slight imperfection in = that if the break is taken at a
 > penalty abve the correction then it will = disappear, whereas it will not
 > disappear if the break is taken at a = penalty below the correction, but I
 > think that is reasonable behaviour. One = could also provide for inserting a
 > penalty just before the correction = skip.

well not quite, a later \addpenalty should move = backwards past the correction space
(nominally) on the vertical list.

have a look what

\addvspace{10pt}
\addpenalty{333}
\addvspace{12pt}
\addpenalty{222}
\addvspace{13pt}

does. a \correctvspace inbetween should not move the = breakpoints
but that makes programming a bit awkward i guess :-) = as it besically calls for
some interaction that you so far was able to = avoid

frank

------_=_NextPart_001_01C2E4C7.24FD4C80--