doursat@yahoo.com (Rene Doursat) writes:
>I am sorry I don't seem to be finding an answer in the group log, so I
>resort to this posting. I have defined two new nested environments
>(for double-counter reasons), where the container environment opens
>and closes a tabbing around the contained sub-environment:
>
>\newenvironment{xxx}{%
> \par .........
> \begin{tabbing}%
> ..............}{\end{tabbing}}
>
>\newenvironment{subxxx}{%
> ..............}{.....}
>
>and I use them in the following way:
>
> ...end of previous paragraph.
> \\
> \begin{xxx}
> \begin{subxxx}.......\end{subxxx}\\ \>
> \begin{subxxx}.......\end{subxxx}\\ \>
> \begin{subxxx}.......\end{subxxx}\\
> \end{xxx}
>
> Start of new paragraph...
>
>Everything works very well within the xxx group, BUT there is an
>annoying extra amount of vertical space before and after the xxx group
>that separates it from the previous and next paragraphs. I suspect
>that this extra vertical space was introduced by the three consecutive
>begin's (xxx, tabbing, subxxx) and end's but I am not sure. Note that
>there was no extra vertical space when I only used the xxx environment
>without tabbing and subxxx.
>
>How can I get rid of this extra vertical space and just get a regular
>1-line skip before and after the xxx group?
first: there's no such thing as a 1-line skip in tex -- there are
vertical spaces of a certain size. what you're seeing are vertical
spaces of whatever size.
tabbing is implemented as a list. so, as a result, it gets the
vertical spacing around it that you see when you start or end a list.
the rules for lists are (a) there's always \topsep between the list
and surrounding material, and (b) if the list starts a new paragraph,
make that \topsep + \partopsep.
note that there's no check about how the list ends -- you cans start a
new paragraph _after_ a list, and the gap can still be \topsep if the
list started in horizontal mode. (actually, of course, the gap will
be \topsep + \parskip, but \parskip is usually 0pt, or 0pt plus 1pt,
so at most the difference will be a bit of stretchability.)
you, of course, introduce a \par token before the start of your
tabbing. (i really don't understand what that \\ is for ... apart
from being an attempt to confuse.)
so we have your answer -- you're getting \partopsep added, which makes
for the unwanted vertical space. just don't put that \par in, and
make sure there's no explicit or implicit paragraph end before the
tabbing starts.
see also the comments about compact lists in
http://www.tex.ac.uk/cgi-bin/texfaq2html?label=complist
(i've rewritten this answer, but not yet proof-read the result...it
contains more information now, and mentions more packages, but the
basic ideas are the same.)
--
Robin (the partially spineless) Fairbairns, Cambridge
|