COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### Getting rid of extra vertical space introduced by new environments?

• Email
• Follow

Hi everyone,

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?

-Rene

 0
Reply doursat (1) 10/2/2003 8:16:06 AM

See related articles to this posting

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

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.

http://www.tex.ac.uk/cgi-bin/texfaq2html?label=complist

basic ideas are the same.)
--
Robin (the partially spineless) Fairbairns, Cambridge

 0
Reply rf53 (2582) 10/2/2003 10:17:57 PM

1 Replies
40 Views

Similar Articles

12/6/2013 6:53:47 AM
page loaded in 50497 ms. (0)