So, I'm trying to make an environment that is always padded above and below by a certain vertical space, no more and no less (unless the previous or following elements require even more space). My attempt is
\newenvironment{hello}{\addvspace{\baselineskip}}{\addvspace{\baselineskip}}
If I then have two hello environments one after another, then the second \addvspace happily does nothing, as desired. Similarly, after a section title, I get the desired behavior.
\documentclass{article}
\usepackage{lipsum}
%\usepackage{titlesec}
\newenvironment{hello}{\addvspace{\baselineskip}}{\addvspace{\baselineskip}}
\begin{document}
\section{Hellos}
\begin{hello}
\lipsum[2]
\end{hello}
\begin{hello}
\lipsum[3]
\end{hello}
\end{document}
But when using titlesec, there is too much space between the section title and the first hello environment. It looks like there's a definite space that goes along with the title that isn't visible to the first \addvspace after it, so \addvspace adds more space.
Any ideas on how to fix this? (Reasons why my entire approach is crappy are also welcome.)

\vspaceinstead of\vskipso it also inserts a\vskip0ptwhich prevents\addvspaceto work correctly. – Philippe Goutet Dec 6 '11 at 5:57\addvspaceis not in fact a user-level command and there are some rather surprissing effects. – Javier Bezos Dec 9 '11 at 10:31\sectionare spaced. Is there a reason why you used\vspaceinstead of\vskip? The LaTeX kernel never uses\vspace. – Philippe Goutet Dec 10 '11 at 12:37\vspace(which, by the way, is used in\smallskip,\smallbreakand the like), can be more or less sensible and more or less questionable (and the same for\vskip, on the other hand), but it's not a bug. And the reason is I though lists after titles were better spaced (again, a questionable decision, but not a bug). – Javier Bezos Dec 11 '11 at 18:47\...skip(again, a questionable decision, but not a bug). – Javier Bezos Dec 11 '11 at 18:56