3

I have the following remark environment:

\newenvironment{rem}[1][]{%
\vspace{8pt}\small%
\begin{list}{}{%
      \setlength{\leftmargin}{\parindent}%
      \setlength{\rightmargin}{\parindent}}%
      \item[]%
}{%
\end{list}\vspace{8pt}}%

When used just after an equation, the separating vertical space shall be a bit to large. Is there a way to test if the previous line is an equation?

0

1 Answer 1

3

\addvspace{<dimen>} will check the magnitude of the previous vspace and insert (if necessary) the amount of space needed to result in a final space that is the larger of the two specified dimensions, not their sum.

\addvspace must be used in vertical mode, so if the current mode isn't clear, use \par\addvspace.

1
  • Now that I coming back to reality, it is probably recommended to locally set up the \topsep argument of the list embedded in the rem environment rather than adding two \vspace or \addvspace that are, in a sense, already part of the \topsep length.
    – pluton
    Commented Oct 29, 2013 at 17:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .