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:
Fri, 7 Mar 2003 20:39:56 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (67 lines)
At 17.17 +0100 2003-03-07, Frank Mittelbach wrote:
> > 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.

OK, I see your point. \vspace and \addvspace don't work well together, and
the _specifications_ (not just the implementations) of them are such that
they cannot work well together. Is this (when \addvspace is around, \vspace
might do the opposite to what you think) perhaps something that could use a
big warning in The LaTeX Companion?

> > How about
> >
> > \def\correctvspace#1{%
> >    \relax % Won't hurt, and might help.
> >    \ifvmode
> >       \@tempskipb=\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

Yes. I believe that was what I wrote:

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

I don't think there is enough information available to do that. In
principle, there could be a skip register which kept track of how much
correction space has been added since the last \par ending a paragraph or
\everypar, but that wouldn't handle \hrule or explicit \hbox'es correctly.
One could argue that these aren't proper LaTeX anyway, but they would cause
trouble in some cases.

Also, if one was to keep track of the amount of correction space added,
then one should perhaps also keep track of the space added by \addvspace,
so that it wouldn't mistake a user-supplied \vspace for some previous
\addvspace space. Or something. That too gets rather complicated.

As for \correctvspace, I think the above implementation would be OK if it
is only to be used for "late corrections" similar to those made using
\enlargethispage: We have already seen where the page breaks will go, and
that's not at the point where the command is used.

Lars Hellström

ATOM RSS1 RSS2