\newcount\fignum
\fignum=1

\def\beginfigure{%
%   \goodbreak			% dunno if I really want this yet
    \midinsert
    \hrule
    \vskip\baselineskip
}

\def\endfigure#1{%
    \vskip\baselineskip		% 1 blank line
    \centerline{Figure \the\fignum: #1} % caption
    \medskip
    \hrule
    \vskip 1.5\baselineskip	% extra space after the line
    \advance\fignum by1
    \endinsert
}
