[texhax] Equivalent of CSS "collapsing margins"?
will.adams at frycomm.com
Thu Oct 25 14:13:06 CEST 2007
On Oct 25, 2007, at 6:29 AM, Edsko de Vries wrote:
> Is there any way to collapse adjoining \vspace commands? Or better
> to define a command, say \vspace*, which behalves like \vspace but
> automatically collapse adjoining vertical spaces? For instances,
> should give a total vspace of 2em. If this is not possible at all,
> perhaps a poor-man's version would be a version of vspace where any
> subsequent vspace commands are ignored, so that
> gives a total vspace of 1em. This is not ideal, but better than
> :) Of course, when there is any text in between the two calls to
> \vspace, the second vspace command should not be ignored. I have
> searched for a solution but came up empty. Any hints would be
> (This kind of thing is very useful when defining macros for example:
> suppose one macro defines a vspace of 2em after the macro
> expansion, and
> another defines a vspace of 1em before the macro expansion; the total
> vspace should be 2em, not 3em).
I believe you'll find the macro \addvspace of interest.
senior graphic designer
More information about the texhax