I would like to be able to write macros that approximate the behaviour of CSS's margin.
For example consider the following:
\newcommand{\marginspace}[1]{
% Defines some combinable margin
% This is what I'd like to know how to do
% A naive implementation would just be:
% \par\vspace{#1}
}
\newcommand{\lorem}{
\marginspace{\baselineskip}
Lorem
\marginspace{\baselineskip}
}
\newcommand{\ipsum}{
\marginspace{\baselineskip}
Ipsum
\marginspace{\baselineskip}
}
So then this document:
Foo
\lorem
\ipsum
Bar
Would be rendered something like:
Foo
Lorem
Ipsum
Bar
A naive implementation of \marginspace would just be \par\vspace{#1}, but this puts an extra line between "Lorem" and "Ipsum", where I'd like them combined:
Foo
Lorem
Ipsum
Bar
Is there any way to get the white space to be ignored if there's already sufficient whitespace above?

