[texhax] Conditional control of paragraph spacing.

Uwe Lück uwe.lueck at web.de
Fri Sep 22 13:08:49 CEST 2006


A guess about your purpose leads me to a more legal and stable
solution of

At 09:25 19.09.06, Ben Whale wrote:

>I want to produce an environment so that when it follows anything but a
>chapter( or section, subsection, etc...) command it inserts a \smallskip.

Probably you don't want to \smallskip after a section heading
because the space under the heading is large enough already.
For this situation is \addvspace{<length>} which (some provisos;
contrary to its name) /ensures/ that at least the <length> space
is there, adding nothing when this is the case.

So perhaps

\newenvironment{Para}
{\addvspace{\smallskipamount}\noindent\ignorespaces}
{\ignorespacesafterend}

does what you want. And I am not sure whether you need the \noindent,
at least with Standard LaTeX classes. And maybe you don't even need
an environment, just \myskip with

\newcommand\myskip{\addvspace\smallskipamount}

Or what about

\newenvironment{Para}{\trivlist \item\relax}{\endtrivlist}

("center environment without centering"). This uses something like
\addvskip\topsep and ensures a vertical space of nearly
8pt (at 10pt design) instead of \smallskipamount's 3pt
above and below.

HTH -- Uwe.



More information about the texhax mailing list