Mime-Version: |
1.0 |
Content-Type: |
text/plain; charset="iso-8859-1" |
Date: |
Fri, 7 Mar 2003 11:18:59 +0100 |
Reply-To: |
|
Subject: |
|
From: |
|
In-Reply-To: |
|
Content-Transfer-Encoding: |
8bit |
Sender: |
|
Parts/Attachments: |
|
|
At 00.09 +0100 2003-03-07, Frank Mittelbach wrote:
>i starred at that definition once more (probably done so several times in the
>past :-) but i think it has some understandable logic (i'm not saying that it
>has the world's best implementation for it) after all.
>
>basically it goes like this:
>
>the main intention why the command was introduced in the first place to is the
>following:
>
> if there are two objects A and B that both want to
> produce some space after/before them then if both objects are directly
> after each other one usually does not want to put too much space between
> them, so a good approach is to use the maximum
Yes, that makes perfect sense (although the name does not).
>now an assumption that i think was made is that the skips that
>actually end up being on the galley are positive and in fact i
>think this is virtually always the the case. Note that i talk
>about the skips on the galley not the skip used the
>last time in an \addvspace command, e.g. the cited example
>
> \addvspace{-\parskip} %% added 4 Sep 85
>
>i actually one in a sequence
>
> \addpenalty\@beginparpenalty
> \addvspace\@topsep
> \addvspace{-\parskip}%
>
>and the net effect of \topsep-\parskip is normally positive.
Yes, but then it should have been
\addpenalty\@beginparpenalty
\@tempskipb=\@topskip
\advance \@tempskipb -\parskip
\addvspace\@tempskipb
because otherwise the net results will be wrong (less than \lastskip) when
\topsep-\parskip < \lastskip < \topsep
>so back to the theme if producing the maximum is sensible then what to do
>about
>
> SKIP < 0pt ?
>
>i think that Leslie thought this to be a good way to extend the command to
>allow for corrective actions if necessary
>
>why he additionally required \lastskip > 0pt is beyond me though.
>
>it means that SKIP < \lastskip < 0pt again uses the maximum principle but
>that doesn't make much sense to me.
>
>so much for how i read history two minutes before midnight (perhaps all
>rubbish)
>
>well, how could a simpler command look like?
A first approximation would be like this:
\def\MinimalVspace#1{%
\ifvmode
\if@minipage \else
\ifdim \lastskip =\z@
\vskip #1\relax
\else
\@tempskipb#1\relax
\ifdim \lastskip<\@tempskipb
\vskip-\lastskip
\vskip\@tempskip
\fi
\fi
\fi
\else
\@noitemerr
\fi
}
It is quite possible that the special code for \lastskip=\z@ should also be
removed, but with \parskip = 0pt plus 1pt being quite common, that change
could actually be noticable.
As for the name, I think this would be more intuitive. The user (or perhaps
rather class designer) is requesting that at least this amount of vspace
should appear at this point.
>>Also, it seems to me as if there could be a need for two commands here: one
>>which does what (the simplified) \addvspace does (guarantees that there is
>>at least a certain amount of vertical space in the last mix of penalties
>>and glue), and one which actually makes the vertical space a certain amount
>>larger (without messing it up for any subsequent \addvspace or
>>\addvpenalty).
>
>i can see how to define a user command for corrective actions always adjusts
>the space in either direction, the only problem is that its natural name
>(addvspace) is already taken
Well, there's always
\def\AddVspace#1{% Or maybe \reallyaddvspace
\ifvmode
\if@minipage \else
\@tempskipb#1\relax
\advance \@tempskipb \lastskip
\vskip-\lastskip
\vskip\@tempskip
\fi
\else
\@noitemerr
\fi
}
I'm not too certain about whether the minipage condition should be present
here, though.
Lars Hellström
|
|
|