TeX's built-in \penalty
command simply appends to the
current list, no matter what kind of list it is. You might intend a
particular penalty to always be a "vertical" penalty, however, i.e.,
appended to a vertical list. Therefore, Eplain provides
\vpenalty
and \hpenalty
which first leave the other mode and then do \penalty
.
More precisely, \vpenalty
inserts \par
if the current
mode is horizontal, and \hpenalty
inserts \leavevmode
if
the current mode is vertical. (Thus, \vpenalty
cannot be used in
math mode.)