LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

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

Print Reply
Subject:
From:
Lars Hellström <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Date:
Tue, 4 Mar 2003 12:40:20 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (73 lines)
At 17.37 +0100 2003-03-03, Chris Rowley wrote:
>>
>> This needs not be related, but it sometimes leads to similar problems, and
>> I haven't seen an explanation anywhere: why is \addvspace discontinuous?
[snip]
>
>I never found any explanation of this algorithm, which comes from
>pre-2.09 LaTeX.  The documentation in ltspaces.dtx contains some
>relevant comments on this and related problems with vertical spacing.

Some comments, but apparently not the whole story.

>For SKIP < 0, the discontinuity wrt \lastskip (at \lastkip = 0) always
>worried me but no one else has noticed it in 15 years, or so it seems.

I've noticed it. If I remember it correctly I was trying to adjust some
list environment vertical spacing parameters at the time and found that
this dicontinuity meant there was no parameter value giving the result I
wanted, but it was a while ago and I'm not sure that I can reproduce the
circumstances.

>Note that when it is discontninuous it is, (IMO) worse, not even monotone!
>
>It is clear from the original code and documentation that \addvspace
>is only intended to be used with itself (and \addpenalty); thus it was
>never designed to work with spaces resulting from low-level TeX
>commands or processes.
>
>Thus any non-zero value of \lastskip is assumed to have come from an
>\addvspace command (not a very wise assumtion, I agree).

I think a lot of this needs to be written down in the source. Right now the
impression one gets (from the observation that \addvspace is heavily used
in the list environment stuff, and to some extent for the sectioning
commands) is that \addvspace is somehow an improved version of \vspace that
it is probably better to use. Copying and modifying the standard classes is
how most people write customized classes. If the pros and cons of
\addvspace (and in particular the strong need of the core to follow
tradition even when it doesn't necessarily make sense) was made more
explicit then people would have a better chance of forming their own
opinions about whether it is the right thing to use.

>Also, it does say (note the first word):
>
>  Extra vertical space is added by the command \addvspace{<skip>}.
>
>This implies that the PRE-CONDITION is perhaps that the argument (ie
>SKIP) is always positive.  But then why put in the bizarre code at all?

In the pseudocode for \@item one finds the line

                     \addvspace{-\parskip}   %% added 4 Sep 85

which has a fair chance of violating this "pre-condition".

>Isn't history fun?

Oh yes, and very enlightning!

However, if there is no known reason for this code and also an impression
that it usually isn't noticed, then maybe one should add a simplified form
(that really takes the maximum and nothing else) to fixltx2e.sty? (I notice
it already has a redefinition of \addpenalty.)

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).

Lars Hellström

ATOM RSS1 RSS2