I need a "\smartmedskip
" feature/macro in plain TeX which is in usual identical to \medskip
, however, if we are right after display math mode, then it should be just "disabled", i.e. it should then behave as \par
(or \vskip0pt
).
(I want to use this in a macro that inserts exercises to my exercise list. Now if the last line of an exercise is a math formula, then in sum I get too much space between this and the next exercise.)
Thanks in advance.
`
to mark your inline code as I did in my edit.