% ********
% Commands
% ********

% \figstart and \figend{label}{title} are used for fake
% figures, ie those chunks of source code to appear in tt typeface
% but too big to fit on a single page, so too big to appear in
% a figure environment.

\newcommand{\vfigstart}{
    \vspace{\intextsep}

    \noindent
    \rule{\textwidth}{1pt}
    \nopagebreak[3]
}

\newcommand{\vfigend}[2]{
    \rule{\textwidth}{1pt}
    \nopagebreak[4]
%    \vspace{6pt}
    \nopagebreak[4]
    \refstepcounter{figure}
    \begin{center}
    {\small {\bf Figure {\thefigure}} \hspace{1em} #2.}
    \end{center}
    \label{#1}
    \addcontentsline{lof}{figure}{
    \protect\numberline{\thefigure}{#2}
    }
    \vspace{\intextsep}
}

\newcommand{\figstart}{
    \begin{figure}

    \noindent
    \rule{\textwidth}{1pt}
}

\newcommand{\figend}[2]{
    \figurecap{#1}{#2}

    \noindent
    \rule{\textwidth}{1pt}
    \end{figure}
}
